diff options
author | Christophe Robin | 2015-11-02 23:27:41 +0900 |
---|---|---|
committer | Christophe Robin | 2015-11-02 23:27:41 +0900 |
commit | ff425031ae3aa1bc603041285effceaa20c403e7 (patch) | |
tree | 9c5b81b744732c1d9fe0e3db5ee3ad6c471f4d09 | |
download | aur-ff425031ae3aa1bc603041285effceaa20c403e7.tar.gz |
Initial package version
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 26 | ||||
-rw-r--r-- | couchbase-server.install | 40 | ||||
-rw-r--r-- | couchbase-server.service | 20 |
5 files changed, 111 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..68fe0e2082f4 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = couchbase-server-community + pkgdesc = A document database featuring a powerful query language and unrivaled performance at scale. + pkgver = 4.0.0 + pkgrel = 1 + url = http://www.manager.io + install = couchbase-server.install + arch = x86_64 + depends = glibc + depends = gcc-libs + depends = sqlite + depends = openssl + depends = libtinfo + depends = zlib + source = couchbase-server-community-v4.0.0.deb::http://packages.couchbase.com/releases/4.0.0/couchbase-server-community_4.0.0-ubuntu14.04_amd64.deb + source = couchbase-server.service + md5sums = 950bf7eeebc139c1602d322d675e6d98 + md5sums = d6d13dde7d40fb31e786623f3f16c3c2 + +pkgname = couchbase-server-community + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..c62f07a76fda --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/pkg +/src +*.tar.xz +*src.tar.gz +/couchbase-server-community-*.deb diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..893a4b62987e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,26 @@ +# Maintainer: Christophe Robin <crobin at nekoo a-dot com> + +pkgname=couchbase-server-community +pkgver=4.0.0 +pkgrel=1 +pkgdesc="A document database featuring a powerful query language and unrivaled performance at scale." +arch=('x86_64') +url="http://www.manager.io" +source=( + "${pkgname}-v${pkgver}.deb::http://packages.couchbase.com/releases/${pkgver}/${pkgname}_${pkgver}-ubuntu14.04_amd64.deb" + "couchbase-server.service" +) +install=couchbase-server.install +depends=(glibc gcc-libs sqlite openssl libtinfo zlib) + +package() { + msg2 "Extracting the data.tar.gz" + tar -xf data.tar.xz -C "${pkgdir}/" + + # remove init.d and replace by systemd definition + rm -Rf "${pkgdir}/etc" + install -D couchbase-server.service "${pkgdir}/usr/lib/systemd/system/couchbase-server.service" +} + +md5sums=('950bf7eeebc139c1602d322d675e6d98' + 'd6d13dde7d40fb31e786623f3f16c3c2') diff --git a/couchbase-server.install b/couchbase-server.install new file mode 100644 index 000000000000..1164304a4393 --- /dev/null +++ b/couchbase-server.install @@ -0,0 +1,40 @@ +# adapted from preinst/postinst from the original package +post_install() { + # create cb user and group + getent group couchbase >/dev/null || \ + groupadd -r couchbase || exit 1 + getent passwd couchbase >/dev/null || \ + useradd -r -g couchbase -d /opt/couchbase -s /usr/sbin/nologin \ + -c "couchbase system user" couchbase || exit 1 + + chown -R couchbase:couchbase /opt/couchbase + + cat <<EOF + +You have successfully installed Couchbase Server. +Start it by running the couchbase-server service via systemd. +Please browse to http://`hostname`:8091/ to configure your server. +Please refer to http://couchbase.com for additional resources. + +Please note that you have to update your firewall configuration to +allow connections to the following ports: 11211, 11210, 11209, 4369, +8091, 8092, 8093,9100 to 9105, 9998, 18091, 18092, 11214, 11215 and +from 21100 to 21299. +EOF + + cat <<EOF + +By using this software you agree to the End User License Agreement. +See /opt/couchbase/LICENSE.txt. + +EOF + +} + +post_upgrade() { + chown -R couchbase:couchbase /opt/couchbase + + echo Upgrading couchbase-server-community ... + echo " /opt/couchbase/bin/install/cbupgrade -c /opt/couchbase/var/lib/couchbase/config -a yes" + /opt/couchbase/bin/install/cbupgrade -c /opt/couchbase/var/lib/couchbase/config -a yes 2>&1 +} diff --git a/couchbase-server.service b/couchbase-server.service new file mode 100644 index 000000000000..c3f57c629816 --- /dev/null +++ b/couchbase-server.service @@ -0,0 +1,20 @@ +# -*- mode: conf-unix; -*- +[Unit] +Description = Couchbase Server +Documentation = http://docs.couchbase.com +After = network.target remote-fs.target nss-lookup.target + +[Service] +SyslogIdentifier = couchbase +User = couchbase +Type = forking +PIDFile=/opt/couchbase/var/lib/couchbase/couchbase-server.pid +WorkingDirectory = /opt/couchbase/var/lib/couchbase +LimitNOFILE = 40960 +LimitCORE = unlimited +LimitMEMLOCK = unlimited +ExecStart = /opt/couchbase/bin/couchbase-server -noinput -detached > /opt/couchbase/var/lib/couchbase/logs/start.log 2>&1 +ExecStop = /opt/couchbase/bin/couchbase-server -k + +[Install] +WantedBy = multi-user.target |