summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore5
-rw-r--r--LICENSE13
-rw-r--r--PKGBUILD62
4 files changed, 58 insertions, 38 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5a261a327a54..798898732a23 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,17 @@
pkgbase = kcgi
pkgdesc = Minimal CGI and FastCGI library
- pkgver = 0.10.7
+ pkgver = 0.13.3
pkgrel = 1
url = http://kristaps.bsd.lv/kcgi/
arch = i686
arch = x86_64
- license = custom
+ license = custom:ISC
+ makedepends = git
+ makedepends = bmake
+ makedepends = libseccomp
+ makedepends = libmd
depends = glibc
- depends = libbsd
- source = https://kristaps.bsd.lv/kcgi/snapshots/kcgi-0.10.7.tgz
- source = LICENSE
- sha512sums = 56a8fe804dc39bf89f8d6a54b7a6d7217d6337a6277592c9d2746a46f7d9e1433aa2b4918d826525f80d852c710d3c6a775dc6c6aea6264f6510f7f3d4f31369
- sha512sums = b040c157fe8b95a41a0375d2cd3cc4e6406a988ed5f337b0c6dd15f1ea08344196018a5c2353c2acfbde7858ca5e0f2bf00d1cc4890661effadf39e239a95520
+ source = git+https://github.com/kristapsdz/kcgi.git#commit=e97370540b4917c78bf3405ddc821ffad8407d69
+ b2sums = SKIP
pkgname = kcgi
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..8ee164282868
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*
+!/LICENSE
+!/PKGBUILD
+!/.SRCINFO
+!/.gitignore
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 1c75a83662f0..000000000000
--- a/LICENSE
+++ /dev/null
@@ -1,13 +0,0 @@
-Copyright (c) 2012--2016, Kristaps Dzonsons <kristaps@bsd.lv>
-
-Permission to use, copy, modify, and/or distribute this software for any purpose
-with or without fee is hereby granted, provided that the above copyright notice
-and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
-INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
diff --git a/PKGBUILD b/PKGBUILD
index 565b5edb3d95..5c1a93bddf29 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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
+}