]> git.immae.eu Git - perso/Immae/Config/AUR.git/blob - PKGBUILD
b9a9f9aeddefdf183e68b0d732ca95cf4adedd02
[perso/Immae/Config/AUR.git] / PKGBUILD
1 # Maintainer: mar77i <mysatyre at gmail dot com>
2 # Past Maintainer: Gaetan Bisson <bisson@archlinux.org>
3 # Contributor: Scytrin dai Kinthra <scytrin@gmail.com>
4
5 pkgname=st-git
6 _pkgname=st
7 pkgver=20160309.3996461
8 pkgrel=1
9 pkgdesc='Simple virtual terminal emulator for X'
10 url='http://git.suckless.org/st/'
11 arch=('i686' 'x86_64')
12 license=('MIT')
13 options=('zipman')
14 depends=('libxft')
15 makedepends=('ncurses' 'libxext' 'git')
16 # include config.h and any patches you want to have applied here
17 source=('git://git.suckless.org/st')
18 sha1sums=('SKIP')
19
20 provides=("${_pkgname}")
21 conflicts=("${_pkgname}")
22
23 pkgver() {
24 cd "${_pkgname}"
25 git log -1 --format='%cd.%h' --date=short | tr -d -
26 }
27
28 prepare() {
29 local file
30 cd "${_pkgname}"
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
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
42 sed '/@tic/d' -i Makefile
43 for file in "${source[@]}"; do
44 if [[ "$file" == "config.h" ]]; then
45 # add config.h if present in source array
46 # Note: this supersedes the above sed to config.def.h
47 cp "$srcdir/$file" .
48 elif [[ "$file" == *.diff || "$file" == *.patch ]]; then
49 # add all patches present in source array
50 patch -Np1 <"$srcdir/$(basename ${file})"
51 fi
52 done
53 }
54
55 build() {
56 cd "${_pkgname}"
57 make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
58 }
59
60 package() {
61 cd "${_pkgname}"
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 }