summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Wozniak2015-08-22 22:41:05 +0200
committerPatrick Wozniak2015-08-22 22:41:05 +0200
commitcaa333956c45be0a5fd7ee33ff50ee3cabcc716a (patch)
treef75736e851aba6e552306df4730e3b6326553d09
downloadaur-caa333956c45be0a5fd7ee33ff50ee3cabcc716a.tar.gz
Initial import
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD37
-rw-r--r--kwakd.install31
3 files changed, 83 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1db28da54869
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = kwakd
+ pkgdesc = A web server serving blank html pages
+ pkgver = 0.5
+ pkgrel = 2
+ url = https://code.google.com/p/kwakd/
+ install = kwakd.install
+ arch = any
+ license = GPL
+ makedepends = git
+ depends = bash
+ source = kwakd::http://kwakd.googlecode.com/files/kwakd-0.5.tar.gz
+ sha256sums = ee87691c4ea971273a3c8926ee6f0cc754094567e27f165f890f2ce306f2afa4
+
+pkgname = kwakd
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3930e502ae85
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Contributor: Tom Vincent <http://tlvince.com/contact>
+# Maintainer: Patrick Wozniak <hello@patwoz.de>
+
+pkgname=kwakd
+pkgver=0.5
+pkgrel=2
+pkgdesc="A web server serving blank html pages"
+
+url="https://code.google.com/p/kwakd/"
+arch=( 'any' )
+license=( "GPL" )
+
+depends=( 'bash' )
+makedepends=(
+ 'git'
+)
+
+source=(
+ "$pkgname::http://kwakd.googlecode.com/files/$pkgname-$pkgver.tar.gz"
+)
+install="$pkgname.install"
+
+sha256sums=(
+ 'ee87691c4ea971273a3c8926ee6f0cc754094567e27f165f890f2ce306f2afa4'
+)
+
+build() {
+ cd "$pkgname-$pkgver"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ make DESTDIR=$pkgdir install
+ install -Dm644 "$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
+}
diff --git a/kwakd.install b/kwakd.install
new file mode 100644
index 000000000000..dc67f9300e15
--- /dev/null
+++ b/kwakd.install
@@ -0,0 +1,31 @@
+#!/bin/sh
+# kwakd.install file.
+# Copyright 2012 Tom Vincent <http://tlvince.com/contact/>
+
+add_user() {
+ getent group kwakd &>/dev/null || groupadd -r kwakd >/dev/null
+ getent passwd kwakd &>/dev/null || \
+ useradd -r -g kwakd -d / -s /bin/false -c kwakd kwakd >/dev/null
+}
+
+# Allow kwakd to bind to port 80 without root permissions
+# See: http://stackoverflow.com/a/10552029
+grant_bind() {
+ setcap cap_net_bind_service=ep /usr/bin/kwakd
+}
+
+post_install() {
+ add_user
+ grant_bind
+}
+
+post_upgrade() {
+ add_user
+ grant_bind
+}
+
+post_remove() {
+ getent passwd kwakd &>/dev/null && userdel kwakd >/dev/null
+ getent group kwakd &>/dev/null && groupdel kwakd >/dev/null
+ true
+}