]>
Commit | Line | Data |
---|---|---|
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 | ||
5 | pkgname=st-git | |
6 | _pkgname=st | |
549b41de | 7 | pkgver=0.7.1.g023225e |
d24ea821 GB |
8 | pkgrel=1 |
9 | pkgdesc='Simple virtual terminal emulator for X' | |
41774076 | 10 | url='http://st.suckless.org/' |
89c41b34 | 11 | arch=('i686' 'x86_64') |
d24ea821 | 12 | license=('MIT') |
278ae332 | 13 | options=('zipman') |
d24ea821 GB |
14 | depends=('libxft') |
15 | makedepends=('ncurses' 'libxext' 'git') | |
549b41de | 16 | epoch=1 |
278ae332 | 17 | # include config.h and any patches you want to have applied here |
70b10beb | 18 | source=('git://git.suckless.org/st') |
19 | sha1sums=('SKIP') | |
d24ea821 GB |
20 | |
21 | provides=("${_pkgname}") | |
22 | conflicts=("${_pkgname}") | |
23 | ||
24 | pkgver() { | |
dc05f486 | 25 | cd "${_pkgname}" |
549b41de | 26 | git describe --tags |sed 's/-/./g' |
d24ea821 GB |
27 | } |
28 | ||
29 | prepare() { | |
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 | ||
56 | build() { | |
dc05f486 | 57 | cd "${_pkgname}" |
d24ea821 GB |
58 | make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 |
59 | } | |
60 | ||
61 | package() { | |
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 | } |