aboutsummaryrefslogtreecommitdiffstats
path: root/main/darkhttpd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-03-05 13:05:19 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-03-05 13:05:59 +0000
commit34bb9471c2e890af271fa44be12d10bd7e338fc7 (patch)
treee549ee16e97fef6f70ef6a301a50816c388361c2 /main/darkhttpd
parenta5ac58262ab0318bc181c18c069d65325460d58b (diff)
downloadaports-34bb9471c2e890af271fa44be12d10bd7e338fc7.tar.bz2
aports-34bb9471c2e890af271fa44be12d10bd7e338fc7.tar.xz
main/darkhttpd: moved from testing
fixes #2538
Diffstat (limited to 'main/darkhttpd')
-rw-r--r--main/darkhttpd/APKBUILD50
-rw-r--r--main/darkhttpd/darkhttpd.initd8
-rw-r--r--main/darkhttpd/darkhttpd.pre-install8
3 files changed, 66 insertions, 0 deletions
diff --git a/main/darkhttpd/APKBUILD b/main/darkhttpd/APKBUILD
new file mode 100644
index 0000000000..2aa35ecaff
--- /dev/null
+++ b/main/darkhttpd/APKBUILD
@@ -0,0 +1,50 @@
+# Contributor: Alan Messias Cordeiro <alancordeiro@gmail.com>
+# Maintainer: Alan Messias Cordeiro <alancordeiro@gmail.com>
+pkgname=darkhttpd
+pkgver=1.9
+pkgrel=2
+pkgdesc="A simple, single-threaded, static content webserver"
+url="http://unix4lyfe.org/darkhttpd/"
+arch="all"
+license="BSD"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install="$pkgname.pre-install"
+subpackages=""
+source="http://unix4lyfe.org/darkhttpd/darkhttpd-$pkgver.tar.bz2
+ $pkgname.initd"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ # install binary
+ cd "$_builddir"
+ install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname || return 1
+ install -d "$pkgdir"/var/www/localhost/htdocs \
+ "$pkgdir"/var/log/darkhttpd || return 1
+
+ # install init.d
+ install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname || return 1
+}
+
+md5sums="156f239af542028c3fb5c2248aa0db8d darkhttpd-1.9.tar.bz2
+ca1ef549dd1a18d3e3614e6c466ba898 darkhttpd.initd"
+sha256sums="33ef622069dc167bcf85e46482388f2d6555e25796f64a6c5b215d939f2b41c8 darkhttpd-1.9.tar.bz2
+cb6e4ccda90337f660c19f011c0c474aa9fcd6f93b93e675cafd5cabbc7f99a5 darkhttpd.initd"
+sha512sums="dba843a5cdd1825666f1a4f2ae578e694c69f6f3d4e72586ab6cb96ef35e5581295ccbdff80bb8f58aba91f4c3342fe213604cb8eac5cbbd49d34bc8a0d795e4 darkhttpd-1.9.tar.bz2
+771d31ff90f78266f616b875366171f7b29bb91d7a2774bf4eb4c4d808ccd5348bae595433d27307a725072f96dd8a4827db5d2bc23669448a605c731dfde177 darkhttpd.initd"
diff --git a/main/darkhttpd/darkhttpd.initd b/main/darkhttpd/darkhttpd.initd
new file mode 100644
index 0000000000..a7efb16605
--- /dev/null
+++ b/main/darkhttpd/darkhttpd.initd
@@ -0,0 +1,8 @@
+#! /sbin/runscript
+
+description="darkhttpd web server"
+command="/usr/bin/darkhttpd"
+command_args="${document_root:-/var/www/localhost/htdocs} --chroot --daemon --uid darkhttpd --gid www-data --log /var/log/darkhttpd/access.log"
+procname="darkhttpd"
+pidfile=""
+stopsig="SIGTERM"
diff --git a/main/darkhttpd/darkhttpd.pre-install b/main/darkhttpd/darkhttpd.pre-install
new file mode 100644
index 0000000000..2ba71fbbe5
--- /dev/null
+++ b/main/darkhttpd/darkhttpd.pre-install
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+addgroup -g 82 -S www-data 2>/dev/null
+adduser -S -H -h /var/www/localhost/htdocs -s /sbin/nologin -D darkhttpd \
+ 2>/dev/null
+addgroup darkhttpd www-data 2>/dev/null
+
+exit 0