diff options
author | Quint Guvernator | 2016-07-26 20:23:15 -0400 |
---|---|---|
committer | Quint Guvernator | 2016-07-26 20:23:15 -0400 |
commit | a2a92304f17525e96f1993fcc6edaef8b994c553 (patch) | |
tree | d374d6a9def56145c016efd6514e2329f1146caf /PKGBUILD | |
download | aur-a2a92304f17525e96f1993fcc6edaef8b994c553.tar.gz |
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..30821623fb04 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,60 @@ +# Maintainer: Quint Guvernator <quint@guvernator.net> +# Contributor: mar77i <mysatyre at gmail dot com> +# Contributor: Gaetan Bisson <bisson@archlinux.org> +# Contributor: Scytrin dai Kinthra <scytrin@gmail.com> + +pkgname=st-qguv-git +_pkgname=st +pkgver=20160725.642a678 +pkgrel=1 +pkgdesc='Simple virtual terminal emulator for X' +url='http://git.suckless.org/st/' +arch=('i686' 'x86_64') +license=('MIT') +depends=('libxft') +makedepends=('ncurses' 'libxext' 'git' 'xurls' 'xdg-utils') +source=('git+https://github.com/qguv/st.git#branch=patchset') +sha1sums=('SKIP') + +provides=("${_pkgname}") +conflicts=("${_pkgname}") + +pkgver() { + cd "${srcdir}/${_pkgname}" + git log -1 --format='%cd.%h' --date=short | tr -d - +} + +prepare() { + local file + cd "${srcdir}/${_pkgname}" + sed \ + -e 's/CPPFLAGS =/CPPFLAGS +=/g' \ + -e 's/CFLAGS =/CFLAGS +=/g' \ + -e 's/LDFLAGS =/LDFLAGS +=/g' \ + -e 's/_BSD_SOURCE/_DEFAULT_SOURCE/' \ + -i config.mk + sed '/@tic/d' -i Makefile + for file in "${source[@]}"; do + if [[ "$file" == "config.h" ]]; then + # add config.h if present in source array + # Note: this supersedes the above sed to config.def.h + cp "$srcdir/$file" . + continue + elif [[ "$file" == *.diff ]]; then + # add all patches present in source array + patch -Np1 <"$srcdir/$file" + fi + done +} + +build() { + cd "${srcdir}/${_pkgname}" + make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 +} + +package() { + cd "${srcdir}/${_pkgname}" + make PREFIX=/usr DESTDIR="${pkgdir}" install + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm644 README "${pkgdir}/usr/share/doc/${pkgname}/README" +} |