diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2016-06-24 13:35:44 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2016-06-24 13:35:48 +0000 |
commit | a43164fdf714535edbd6c83f467eb41c123ba37f (patch) | |
tree | f196a4bb03f98158c2138adb83ebce24783039d1 /testing | |
parent | 49ffc7a9a06911b8b05a9b011195e42072bd279d (diff) | |
download | aports-a43164fdf714535edbd6c83f467eb41c123ba37f.tar.bz2 aports-a43164fdf714535edbd6c83f467eb41c123ba37f.tar.xz |
testing/beanstalkd: new aport. Fixes #5743
Diffstat (limited to 'testing')
-rw-r--r-- | testing/beanstalkd/APKBUILD | 49 | ||||
-rw-r--r-- | testing/beanstalkd/alpine.patch | 12 | ||||
-rw-r--r-- | testing/beanstalkd/beanstalkd.confd | 21 | ||||
-rw-r--r-- | testing/beanstalkd/beanstalkd.initd | 27 | ||||
-rw-r--r-- | testing/beanstalkd/beanstalkd.pre-install | 3 |
5 files changed, 112 insertions, 0 deletions
diff --git a/testing/beanstalkd/APKBUILD b/testing/beanstalkd/APKBUILD new file mode 100644 index 0000000000..b7d1636cee --- /dev/null +++ b/testing/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/testing/beanstalkd/alpine.patch b/testing/beanstalkd/alpine.patch new file mode 100644 index 0000000000..5983192616 --- /dev/null +++ b/testing/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/testing/beanstalkd/beanstalkd.confd b/testing/beanstalkd/beanstalkd.confd new file mode 100644 index 0000000000..47a42c75c1 --- /dev/null +++ b/testing/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/testing/beanstalkd/beanstalkd.initd b/testing/beanstalkd/beanstalkd.initd new file mode 100644 index 0000000000..475f102568 --- /dev/null +++ b/testing/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/testing/beanstalkd/beanstalkd.pre-install b/testing/beanstalkd/beanstalkd.pre-install new file mode 100644 index 0000000000..ccc280b573 --- /dev/null +++ b/testing/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 |