diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2014-01-24 12:14:48 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2014-01-24 12:15:03 +0000 |
commit | ae2516fadcb423b79d86e6d7f1ec495d6d09dd86 (patch) | |
tree | c9e91d129c64fb5290cbaf3cee935a8f9e9cc040 /testing | |
parent | 7fca2157cceacb723a8d803174e2c6e914186db4 (diff) | |
download | aports-ae2516fadcb423b79d86e6d7f1ec495d6d09dd86.tar.bz2 aports-ae2516fadcb423b79d86e6d7f1ec495d6d09dd86.tar.xz |
testing/couchdb: new aport
Diffstat (limited to 'testing')
-rw-r--r-- | testing/couchdb/APKBUILD | 57 | ||||
-rw-r--r-- | testing/couchdb/apache-couchdb.confd | 9 | ||||
-rw-r--r-- | testing/couchdb/apache-couchdb.initd | 50 | ||||
-rwxr-xr-x | testing/couchdb/apache-couchdb.post-install | 3 |
4 files changed, 119 insertions, 0 deletions
diff --git a/testing/couchdb/APKBUILD b/testing/couchdb/APKBUILD new file mode 100644 index 0000000000..44944e75b2 --- /dev/null +++ b/testing/couchdb/APKBUILD @@ -0,0 +1,57 @@ +# Contributor: Leonardo Arena <rnalrd@gmail.com> +# Maintainer: +pkgname=apache-couchdb +pkgver=1.5.0 +pkgrel=0 +pkgdesc="A database for the web" +url="http://couchdb.apache.org/" +arch="all" +license="Apache License 2.0" +depends="erlang" +depends_dev= +makedepends="$depends_dev curl-dev erlang-dev js-dev icu-dev openssl-dev" +install= +pkgusers="couchdb" +pkggroups="couchdb" +subpackages="$pkgname-dev $pkgname-doc" +source="http://apache.fastbull.org/couchdb/source/1.5.0/$pkgname-$pkgver.tar.gz + apache-couchdb.initd + apache-couchdb.confd + " + + +_builddir="$srcdir"/$pkgname-$pkgver + +prepare() { + cd "$_builddir" + return 0 +} + +build() { + cd "$_builddir" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install + install -m755 -D ../../$pkgname.initd "$pkgdir"/etc/init.d/couchdb + install -m644 -D ../../$pkgname.confd "$pkgdir"/etc/conf.d/couchdb + chown couchdb:couchdb "$pkgdir"/var/log/couchdb + find "$pkgdir" -name *.la -delete +} + +md5sums="55a2f86469e0697817da8defee730f04 apache-couchdb-1.5.0.tar.gz +1c20f57fcdf1e3cac3f1ffd814fcbe70 apache-couchdb.initd +86ae8d25d121e5ce6a15ee2d8c52aa47 apache-couchdb.confd" +sha256sums="abbdb2a6433124a4a4b902856f6a8a070d53bf7a55faa7aa8b6feb7127638fef apache-couchdb-1.5.0.tar.gz +b7d72e64aa36021527a0af1f094ebfd36b107bd4fd0ab3f5e599d3993b3cd484 apache-couchdb.initd +056042951c9314feab924d707bf347b2ef265f10e90bec847315d9c0156f700a apache-couchdb.confd" +sha512sums="557f712cf927b8713285e716a9dce624960316af0c481c98553c12b310fc228d30b585d25bf2c3e3debde5b25fc3d94dbbedaf79a7ae480e92a847abff73c2de apache-couchdb-1.5.0.tar.gz +83dac6ff44b1d6f02c2def4836602798171c96fb47795820dc6187323daeb015d897b5a8d4727fbc1f4b56dc7bf3d07732dead1512137b7a087fef85bb5a6ec9 apache-couchdb.initd +5c40927957362a7431be6980be3a239e4ee0ca47d28f1b4d4fb3014b307e459eb429f5b50e0c8aa58b3e9f2285371616a58f06207e272feae1bed33f8c32d836 apache-couchdb.confd" diff --git a/testing/couchdb/apache-couchdb.confd b/testing/couchdb/apache-couchdb.confd new file mode 100644 index 0000000000..94d50b35f3 --- /dev/null +++ b/testing/couchdb/apache-couchdb.confd @@ -0,0 +1,9 @@ +# Options for CouchDB + +EXEC="/usr/bin/couchdb" +COUCHDB_USER="couchdb:couchdb" +COUCHDB_PID_FILE="/var/run/couchdb/couchdb.pid" +COUCHDB_STDOUT_FILE="/dev/null" +COUCHDB_STDERR_FILE="/dev/null" +#COUCHDB_RESPAWN_TIMEOUT= +#COUCHDB_OPTIONS= diff --git a/testing/couchdb/apache-couchdb.initd b/testing/couchdb/apache-couchdb.initd new file mode 100644 index 0000000000..c3a136dfb8 --- /dev/null +++ b/testing/couchdb/apache-couchdb.initd @@ -0,0 +1,50 @@ +#!/sbin/runscript +# Copyright 1999-2013 Dirkjan Ochtman +# Distributed under the terms of the Apache License, Version 2.0 + +depend() { + need net + after firewall +} + +start() { + ebegin "Starting ${SVCNAME}" + + args="-b" + if test -n "$COUCHDB_STDOUT_FILE"; then + args="$args -o $COUCHDB_STDOUT_FILE" + fi + if test -n "$COUCHDB_STDERR_FILE"; then + args="$args -e $COUCHDB_STDERR_FILE" + fi + if test -n "$COUCHDB_RESPAWN_TIMEOUT"; then + args="$args -r $COUCHDB_RESPAWN_TIMEOUT" + fi + if test -n "$COUCHDB_OPTIONS"; then + args="$args $COUCHDB_OPTIONS" + fi + if test -n "$COUCHDB_PID_FILE"; then + args="$args -p $COUCHDB_PID_FILE" + else + echo "* ERROR: COUCHDB_PID_FILE must be set" + return -1 + fi + if test -z "$COUCHDB_USER"; then + echo "* ERROR: COUCHDB_USER must be set" + return -1 + fi + + checkpath --directory --owner ${COUCHDB_USER} ${COUCHDB_PID_FILE%/*} + + start-stop-daemon --start --exec ${EXEC} --name ${COUCHDB_BEAM} \ + --user ${COUCHDB_USER} --pidfile ${COUCHDB_PID_FILE} -- $args + + eend $? "Failed to start ${SVCNAME}" +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --exec ${EXEC} --name ${COUCHDB_BEAM} \ + --pidfile ${COUCHDB_PID_FILE} + eend $? "Failed to stop ${SVCNAME}" +} diff --git a/testing/couchdb/apache-couchdb.post-install b/testing/couchdb/apache-couchdb.post-install new file mode 100755 index 0000000000..0f6c62a3b0 --- /dev/null +++ b/testing/couchdb/apache-couchdb.post-install @@ -0,0 +1,3 @@ +#!/bin/sh +addgroup -S couchdb +adduser -h /var/run/couchdb -s /bin/false -G couchdb -S -D couchdb |