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