diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 62 |
1 files changed, 45 insertions, 17 deletions
@@ -1,34 +1,62 @@ -# Maintainer: Wilhelm Schuster <wilhelm [aT] wilhelm [.] re> +# Maintainer: Adrian Perez de Castro <aperez@igalia.com> +# Contributor: George Rawlinson <grawlinson@archlinux.org> +# Contributor: Wilhelm Schuster <wilhelm [aT] wilhelm [.] re> + pkgname=kcgi -pkgver=0.10.7 +pkgver=0.13.3 pkgrel=1 pkgdesc="Minimal CGI and FastCGI library" arch=('i686' 'x86_64') url="http://kristaps.bsd.lv/kcgi/" -license=('custom') -depends=('glibc' 'libbsd') -source=("https://kristaps.bsd.lv/kcgi/snapshots/$pkgname-$pkgver.tgz" - "LICENSE") -sha512sums=('56a8fe804dc39bf89f8d6a54b7a6d7217d6337a6277592c9d2746a46f7d9e1433aa2b4918d826525f80d852c710d3c6a775dc6c6aea6264f6510f7f3d4f31369' - 'b040c157fe8b95a41a0375d2cd3cc4e6406a988ed5f337b0c6dd15f1ea08344196018a5c2353c2acfbde7858ca5e0f2bf00d1cc4890661effadf39e239a95520') +license=('custom:ISC') +depends=('glibc') +makedepends=('git' 'bmake' 'libseccomp' 'libmd') +_commit='e97370540b4917c78bf3405ddc821ffad8407d69' +source=("git+https://github.com/kristapsdz/kcgi.git#commit=$_commit") +b2sums=('SKIP') + +pkgver() { + cd kcgi + + git describe --tags | sed -e 's/VERSION_//' -e 's/_/./g' +} + +prepare() { + cd kcgi + + ./configure \ + PREFIX=/usr \ + MANDIR=/usr/share/man \ + SBINDIR=/usr/bin \ + LDFLAGS="$LDFLAGS" + + # This is a bit hackish, but it manages to add the linker flags for kfcgi. + # The "configure" script picks LDFLAGS from the environment, but then it + # does not use the variable in the target ¯\_(ツ)_/¯ + echo 'LDADD_LIB_SOCKET += $(LDFLAGS)' >> Makefile.configure + + # enable seccomp filter + sed -i 's/#CPPFLAGS/CPPFLAGS/' Makefile +} + build() { - cd $pkgname-$pkgver + cd kcgi - ./configure PREFIX=/usr MANDIR=/usr/share/man SBINDIR=/usr/bin - make + bmake } check() { - cd $pkgname-$pkgver + cd kcgi - make regress + bmake regress } package() { - cd $pkgname-$pkgver + cd kcgi - make DESTDIR="$pkgdir" install + bmake DESTDIR="$pkgdir" install - install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" -} + strip -x --strip-unneeded "$pkgdir/usr/bin/kfcgi" + install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.md +} |