]> git.immae.eu Git - perso/Immae/Config/AUR.git/blame - PKGBUILD
remove scrollback patch on the AUR branch.
[perso/Immae/Config/AUR.git] / PKGBUILD
CommitLineData
d24ea821
GB
1# Maintainer: Gaetan Bisson <bisson@archlinux.org>
2# Contributor: Scytrin dai Kinthra <scytrin@gmail.com>
3
4pkgname=st-git
5_pkgname=st
6pkgver=20150603.71fa10f
7pkgrel=1
8pkgdesc='Simple virtual terminal emulator for X'
9url='http://git.suckless.org/st/'
10arch=('i686' 'x86_64' 'armv7h')
11license=('MIT')
12depends=('libxft')
13makedepends=('ncurses' 'libxext' 'git')
70b10beb 14source=('git://git.suckless.org/st')
15sha1sums=('SKIP')
d24ea821
GB
16
17provides=("${_pkgname}")
18conflicts=("${_pkgname}")
19
20pkgver() {
21 cd "${srcdir}/${_pkgname}"
22 git log -1 --format='%cd.%h' --date=short | tr -d -
23}
24
25prepare() {
0df21d83 26 local file
d24ea821 27 cd "${srcdir}/${_pkgname}"
d24ea821
GB
28 sed \
29 -e '/char font/s/= .*/= "Fixed:pixelsize=13:style=SemiCondensed";/' \
30 -e '/char worddelimiters/s/= .*/= " '"'"'`\\\"()[]{}<>|";/' \
31 -e '/int defaultcs/s/= .*/= 1;/' \
32 -i config.def.h
27aad93a 33 sed \
34 -e 's/CPPFLAGS =/CPPFLAGS +=/g' \
35 -e 's/CFLAGS =/CFLAGS +=/g' \
36 -e 's/LDFLAGS =/LDFLAGS +=/g' \
37 -e 's/_BSD_SOURCE/_DEFAULT_SOURCE/' \
38 -i config.mk
7f2c13ce 39 sed '/@tic/d' -i Makefile
0df21d83 40 for file in "${source[@]}"; do
41 if [[ "$file" != *.diff ]]; then
c5b97b9a 42 # add config.h if present in source array
43 # Note: this supersedes the above sed to config.def.h
44 [[ "$file" == "config.h" ]] && cp "$SRCDEST/$file" .
0df21d83 45 continue
46 fi
47 # add all patches present in source array
48 patch -Np1 <"$SRCDEST/$file"
49 done
d24ea821
GB
50}
51
52build() {
53 cd "${srcdir}/${_pkgname}"
54 make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
55}
56
57package() {
58 cd "${srcdir}/${_pkgname}"
d24ea821
GB
59 make PREFIX=/usr DESTDIR="${pkgdir}" install
60 install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
61 install -Dm644 README "${pkgdir}/usr/share/doc/${pkgname}/README"
7f2c13ce 62 tic -s -o "${pkgdir}/usr/share/terminfo" st.info
d24ea821 63}