aboutsummaryrefslogtreecommitdiffstats
path: root/community/beanstalkd
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-08-25 07:34:47 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-08-25 07:55:48 +0000
commit9994bb8b5c328ba14a44119d774fba884c74faaa (patch)
tree3726d173a73a435b6b1551bff8cd6962c541ec83 /community/beanstalkd
parentde9872306f88b5f382d832d9ba200443364b5697 (diff)
downloadaports-9994bb8b5c328ba14a44119d774fba884c74faaa.tar.bz2
aports-9994bb8b5c328ba14a44119d774fba884c74faaa.tar.xz
community/beanstalkd: moved from testing
Diffstat (limited to 'community/beanstalkd')
-rw-r--r--community/beanstalkd/APKBUILD49
-rw-r--r--community/beanstalkd/alpine.patch12
-rw-r--r--community/beanstalkd/beanstalkd.confd21
-rw-r--r--community/beanstalkd/beanstalkd.initd27
-rw-r--r--community/beanstalkd/beanstalkd.pre-install3
5 files changed, 112 insertions, 0 deletions
diff --git a/community/beanstalkd/APKBUILD b/community/beanstalkd/APKBUILD
new file mode 100644
index 0000000000..b7d1636cee
--- /dev/null
+++ b/community/beanstalkd/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=beanstalkd
+pkgver=1.10
+pkgrel=0
+pkgdesc="Beanstalk is a simple, fast work queue"
+url="http://kr.github.io/beanstalkd/"
+arch="all"
+license="MIT"
+depends=""
+makedepends="clang"
+install="$pkgname.pre-install"
+pkgusers="beanstalk"
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/kr/$pkgname/archive/v$pkgver.tar.gz
+ alpine.patch
+ $pkgname.confd
+ $pkgname.initd"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ make || return 1
+}
+
+package() {
+ cd "$builddir"
+ mkdir -p "$pkgdir"/var/lib/beanstalkd
+ chown $pkgusers "$pkgdir"/var/lib/beanstalkd
+ make PREFIX="$pkgdir"/usr install
+ install -Dm755 "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+ install -Dm644 "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname || return 1
+ install -D -m644 "doc/beanstalkd.1" "${pkgdir}/usr/share/man/man1/beanstalkd.1"
+}
+
+md5sums="0994d83b03bde8264a555ea63eed7524 beanstalkd-1.10.tar.gz
+5a0879a6019e1dfb2c1e86ccd9c25dec alpine.patch
+34f82111d964733fc17b002b86f158a3 beanstalkd.confd
+f2ac6c87e91e14310f24b6a6956b06ac beanstalkd.initd"
+sha256sums="923b1e195e168c2a91adcc75371231c26dcf23868ed3e0403cd4b1d662a52d59 beanstalkd-1.10.tar.gz
+7fb20ed1108a82adbc159dd033e7e27d875e40d28b1bf2d13c0515cb6e1cb57c alpine.patch
+d6171d865c438d51f3aa7e22333e90b4f11545d95be25edba9eca9f1e0031685 beanstalkd.confd
+d9002202904ed5b88140cbc9ab9e519f6a97b4aa1d544d5e6739619484fc07db beanstalkd.initd"
+sha512sums="db85e4a32c686330e50d64d497a39bb9806de42a2c2d2c84eb260ae8cfad91b4c99eef6a8f0ab3e62d0ca71a31837778ec68a4299899ac5a9d94a5a4403d673b beanstalkd-1.10.tar.gz
+a7c63512a61b5f9bb2bb04e89d56471983620b6b501f4a98dd87e2299596d147484ffcb85b6f98164adb2f7373a5adf4821be5f76dd35891c3dfc5a3623c01f5 alpine.patch
+0460ba20e5596308a1a07ce50a8e431de6a86d557e0b4c63097c8d5998dc5704b56bec573fce37619cc4f5c0e7abf28ad251b4279fd6ad7fceb0e93b49d221fe beanstalkd.confd
+6b665411341033c16781f8ef254a527ff60629860fd649bb7aa4b79dabbd87edee8d33a4579a4f451eb8a5fbb979d2cc3f8a23d4c5e2eaa18c7225362f94df3e beanstalkd.initd"
diff --git a/community/beanstalkd/alpine.patch b/community/beanstalkd/alpine.patch
new file mode 100644
index 0000000000..5983192616
--- /dev/null
+++ b/community/beanstalkd/alpine.patch
@@ -0,0 +1,12 @@
+--- ./sd-daemon.c
++++ ./sd-daemon.c
+@@ -32,7 +32,7 @@
+ #include <sys/stat.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
+-#include <sys/fcntl.h>
++#include <fcntl.h>
+ #include <netinet/in.h>
+ #include <stdlib.h>
+ #include <errno.h>
+
diff --git a/community/beanstalkd/beanstalkd.confd b/community/beanstalkd/beanstalkd.confd
new file mode 100644
index 0000000000..47a42c75c1
--- /dev/null
+++ b/community/beanstalkd/beanstalkd.confd
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/beanstalkd/files/conf-1.9,v 1.1 2014/03/31 06:34:28 patrick Exp $
+
+BEANSTALKD_BINARY="/usr/bin/beanstalkd"
+PIDFILE="/run/beanstalkd.pid"
+
+# User to run as
+USER="beanstalk"
+
+# Port to listen on
+PORT="11300"
+
+# Address to listen on
+ADDR="127.0.0.1"
+
+# Datadir (where to store queue)
+DATADIR="/var/lib/beanstalkd"
+
+# Max job size
+JOB_SIZE="65536"
diff --git a/community/beanstalkd/beanstalkd.initd b/community/beanstalkd/beanstalkd.initd
new file mode 100644
index 0000000000..475f102568
--- /dev/null
+++ b/community/beanstalkd/beanstalkd.initd
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of MIT
+# $Header: /var/cvsroot/gentoo-x86/app-misc/beanstalkd/files/init-1.9,v 1.1 2014/03/31 06:34:28 patrick Exp $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting beanstalkd"
+ /sbin/start-stop-daemon --start \
+ --background \
+ --pidfile ${PIDFILE} --make-pidfile \
+ --exec ${BEANSTALKD_BINARY} \
+ -- -b ${DATADIR} -p ${PORT} -l ${ADDR} -u ${USER} -z ${JOB_SIZE}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping beanstalkd"
+ start-stop-daemon --stop --quiet \
+ --pidfile ${PIDFILE} \
+ --exec ${BEANSTALKD_BINARY}
+ eend $?
+}
+
diff --git a/community/beanstalkd/beanstalkd.pre-install b/community/beanstalkd/beanstalkd.pre-install
new file mode 100644
index 0000000000..ccc280b573
--- /dev/null
+++ b/community/beanstalkd/beanstalkd.pre-install
@@ -0,0 +1,3 @@
+#!/bin/sh
+adduser -S -D -H -h /dev/null -s /sbin/nologin -G daemon beanstalk 2>/dev/null
+exit 0