diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-02-22 22:43:50 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-02-22 22:43:50 +0100 |
commit | f887ecc2402c17ad27ccae2ff7e4d5e33162d9ee (patch) | |
tree | 4cf94ca4be8e1ea0809729229ce9453acc2a943d /st-git/PKGBUILD | |
parent | b720d343f3ee3492d8027450a4636dc8a52793e0 (diff) | |
parent | a148393242d40e0d28d5f1216962c543cbcc6b1f (diff) | |
download | AUR-f887ecc2402c17ad27ccae2ff7e4d5e33162d9ee.tar.gz AUR-f887ecc2402c17ad27ccae2ff7e4d5e33162d9ee.tar.zst AUR-f887ecc2402c17ad27ccae2ff7e4d5e33162d9ee.zip |
Add 'st-git/' from commit 'a148393242d40e0d28d5f1216962c543cbcc6b1f'
git-subtree-dir: st-git
git-subtree-mainline: b720d343f3ee3492d8027450a4636dc8a52793e0
git-subtree-split: a148393242d40e0d28d5f1216962c543cbcc6b1f
Diffstat (limited to 'st-git/PKGBUILD')
-rw-r--r-- | st-git/PKGBUILD | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/st-git/PKGBUILD b/st-git/PKGBUILD new file mode 100644 index 0000000..7d9b4df --- /dev/null +++ b/st-git/PKGBUILD | |||
@@ -0,0 +1,66 @@ | |||
1 | # Maintainer: mar77i <mar77i at mar77i dot ch> | ||
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=0.7.9.g8c99915 | ||
8 | pkgrel=1 | ||
9 | pkgdesc='Simple virtual terminal emulator for X' | ||
10 | url='http://st.suckless.org/' | ||
11 | arch=('i686' 'x86_64') | ||
12 | license=('MIT') | ||
13 | options=('zipman') | ||
14 | depends=('libxft') | ||
15 | makedepends=('ncurses' 'libxext' 'git') | ||
16 | epoch=1 | ||
17 | # include config.h and any patches you want to have applied here | ||
18 | source=('git://git.suckless.org/st') | ||
19 | sha1sums=('SKIP') | ||
20 | |||
21 | provides=("${_pkgname}") | ||
22 | conflicts=("${_pkgname}") | ||
23 | |||
24 | pkgver() { | ||
25 | cd "${_pkgname}" | ||
26 | git describe --tags |sed 's/-/./g' | ||
27 | } | ||
28 | |||
29 | prepare() { | ||
30 | local file | ||
31 | cd "${_pkgname}" | ||
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 | ||
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 | ||
43 | sed '/@tic/d' -i Makefile | ||
44 | for file in "${source[@]}"; do | ||
45 | if [[ "$file" == "config.h" ]]; then | ||
46 | # add config.h if present in source array | ||
47 | # Note: this supersedes the above sed to config.def.h | ||
48 | cp "$srcdir/$file" . | ||
49 | elif [[ "$file" == *.diff || "$file" == *.patch ]]; then | ||
50 | # add all patches present in source array | ||
51 | patch -Np1 <"$srcdir/$(basename ${file})" | ||
52 | fi | ||
53 | done | ||
54 | } | ||
55 | |||
56 | build() { | ||
57 | cd "${_pkgname}" | ||
58 | make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 | ||
59 | } | ||
60 | |||
61 | package() { | ||
62 | cd "${_pkgname}" | ||
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 | } | ||