Subject: [alpine-devel] [PATCH] testing/monkey: updated version and added SSL support.

From: ScrumpyJack <[email-masked]>
Date: Thu, 05 Mar 2015 09:19:55 +0000 (GMT)

here is a sprunge if the patch fails http://sprunge.us/HIYS

Monkey is a lightweight and powerful web server
http://monkey-project.com/
---
 testing/monkey/APKBUILD     | 85 ++++++++++++++++++++++-----------------------
 testing/monkey/monkey.confd |  5 ---
 testing/monkey/monkey.initd | 25 -------------
 3 files changed, 41 insertions(+), 74 deletions(-)
 delete mode 100644 testing/monkey/monkey.confd
 delete mode 100644 testing/monkey/monkey.initd

diff --git a/testing/monkey/APKBUILD b/testing/monkey/APKBUILD
index b3f2d75..d9be9d9 100644
--- a/testing/monkey/APKBUILD
+++ b/testing/monkey/APKBUILD
@@ -1,55 +1,52 @@
-# Maintainer: Bartłomiej Piotrowski <[email-masked]>
-
+# Contributor: Bartłomiej Piotrowski <[email-masked]>
+# Maintainer: ScrumpyJack <[email-masked]>
 pkgname=monkey
-pkgver=1.4.0
+pkgver=1.5.5
 pkgrel=0
-pkgdesc='Fast and lightweight HTTP server designed for embedded devices'
-url='http://monkey-project.com'
-license='GPL2'
-arch='all'
-makedepends='bash findutils'
-subpackages="$pkgname-doc $pkgname-dev"
-source="$url/releases/${pkgver%.*}/monkey-$pkgver.tar.gz
-        monkey.initd
-        monkey.confd"
-
-_builddir="$srcdir"/$pkgname-$pkgver
-
+pkgdesc="Monkey is a lightweight and powerful web server "
+url="http://monkey-project.com/"
+arch="all"
+license="ASL 2.0"
+depends=""
+depends_dev=""
+makedepends="bash polarssl-dev findutils"
+install=""
+subpackages="$pkgname-doc"
+source="http://monkey-project.com/releases/1.5/${pkgname}-${pkgver}.tar.gz"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
 prepare() {
-  cd "$_builddir"
-  sed -i -e '737s/nobody/http/' -e '/create_banana_script bindir/d' \
-    -e '/Creating bin\/banana/d' configure || return 1
-  sed -i '1i #define NO_BACKTRACE' src/mk_utils.c || return 1
+	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"
-
-  ./configure --prefix=/usr \
-    --bindir=/usr/bin \
-    --sysconfdir=/etc/$pkgname \
-    --mandir=/usr/share/man \
-    --datadir=/var/www \
-    --logdir=/var/log/$pkgname \
-    --plugdir=/usr/lib/$pkgname \
-    || return 1
-
-  make || return 1
+	cd "$_builddir"
+	./configure \
+	--musl-mode \
+	--no-backtrace \
+	--enable-plugins=polarssl \
+	--prefix=/usr \
+	--mandir=/usr/share/man \
+	--sysconfdir=/etc/$pkgname \
+	--datadir=/var/$pkgname \
+	--logdir=/var/log/$pkgname \
+	--plugdir=/etc/$pkgname \
+	--pidfile=/var/run/${pkgname}.pid  || return 1
+	make
 }
 
 package() {
-  cd "$_builddir"
-  make DESTDIR="$pkgdir" install || return 1
-  install -Dm755 "$srcdir"/monkey.initd "$pkgdir"/etc/init.d/monkey || return 1
-  install -Dm0644 "$srcdir"/monkey.confd "$pkgdir"/etc/conf.d/monkey || return 1
+	cd "$_builddir"
+	make DESTDIR=$pkgdir install
+	install -Dm 755 "$pkgdir/usr/bin/banana" "$pkgdir/etc/init.d/banana"
 }
 
-md5sums="c17e394b985ead873fc7e7cb2a05cef7  monkey-1.4.0.tar.gz
-6630131d3ea75dbbf1033a4acc8cf983  monkey.initd
-71805f446a12d747c52e18b8ac4b4704  monkey.confd"
-sha256sums="b2e3578819abb558ee5e449b8c4aa323b69f52cd8f2c8f061a78e2f0b18675e7  monkey-1.4.0.tar.gz
-00a880f8f8190649642a99939180e6b987706712b9b2479b7ec74311a31ca34d  monkey.initd
-bfd675e83ea839282fa60ff7b137933b47e4beeed3f22703a79d4201580de508  monkey.confd"
-sha512sums="ab52e158a4b4954d4e72dc0687b2a22b5ced75ad5ca93ee5533d81ab1eb24101919e87917fdd89570de537167fafb2e0c448765b24f472715556a41e2c0a8390  monkey-1.4.0.tar.gz
-2ec82ae2b76dcc0a792c12b3cee57feedfdb34117975cf5f245e90775e0543ddd8c072ac935de57d6e37753e92a8019e699d636d7f7aaebecb612dbcbf6f5bc0  monkey.initd
-8ca7312a80440e908ef8c6297870411f4978c56fe8ad09589d1bb56e9d545d086a53f07120d5cc14c6042a83755730ac6fc4839020a5159eb054eb34d3f264e7  monkey.confd"
+md5sums="bd2410f6612ec4a9076c3921145e4b75  monkey-1.5.5.tar.gz"
+sha256sums="5a0554fdb4d8746f5eb665f305bd120c8f2bef3e7fea2a43be6b472461b45b05  monkey-1.5.5.tar.gz"
+sha512sums="faf86a36a91c8b1e47f3a2ea7f19aee98eada6f3348ff64f160fc388c268a146d49ad9434043731cf928fca6708db40fa5e1daedc41d4b8cce671f98d590b920  monkey-1.5.5.tar.gz"
diff --git a/testing/monkey/monkey.confd b/testing/monkey/monkey.confd
deleted file mode 100644
index 818957c..0000000
--- a/testing/monkey/monkey.confd
+++ /dev/null
@@ -1,5 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# Add any additional command line arguments here
-MONKEY_ARGS=""
diff --git a/testing/monkey/monkey.initd b/testing/monkey/monkey.initd
deleted file mode 100644
index 7ab26aa..0000000
--- a/testing/monkey/monkey.initd
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-DAEMON="/usr/bin/monkey"
-CONFFILE="/etc/monkey/monkey.conf"
-
-depend() {
-	use net
-}
-
-start() {
-	ebegin "Starting monkey"
-	start-stop-daemon --start --exec "${DAEMON}" -- "-D" "${MONKEY_ARGS}" >/dev/null
-	eend $?
-}
-
-stop() {
-	ebegin "Stopping monkey"
-	local PORT=$(awk '/^ *Port/ { print $2 }' "${CONFFILE}")
-	local PIDFILE=$(awk '/^ *PidFile/ { print $2 }' "${CONFFILE}")
-	PIDFILE="${PIDFILE}"."${PORT}"
-	start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
-	eend $?
-}
-- 
2.2.2