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