mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-27 23:44:04 +00:00
community/couchdb to 2.0.0-15
This commit is contained in:
parent
60e4204277
commit
2682935486
4 changed files with 43 additions and 50 deletions
|
@ -1,4 +1,3 @@
|
|||
# $Id$
|
||||
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
|
||||
# Contributor: Vitaliy Berdinskikh ur6lad[at]i.ua
|
||||
# Contributor: Michael Fellinger <m.fellinger@gmail.com>
|
||||
|
@ -8,34 +7,34 @@
|
|||
|
||||
pkgname=couchdb
|
||||
pkgver=2.0.0
|
||||
pkgrel=14
|
||||
pkgrel=15
|
||||
pkgdesc="A document-oriented database that can be queried and indexed in a MapReduce fashion using JSON"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://couchdb.apache.org"
|
||||
license=('APACHE')
|
||||
depends=('icu' 'erlang-nox' 'js185' 'openssl' 'curl' 'util-linux')
|
||||
makedepends=('autoconf-archive' 'git')
|
||||
install=couchdb.install
|
||||
depends=('icu' 'js185' 'openssl' 'zlib')
|
||||
makedepends=('erlang19-nox')
|
||||
install=${pkgname}.install
|
||||
backup=('etc/couchdb/local.ini'
|
||||
'etc/couchdb/vm.args')
|
||||
validpgpkeys=('E0AF0A194D55C84E4A19A801CDB0C0F904F4EE9B'
|
||||
'D2B17F9DA23C0A10991AF2E3D9EE01E47852AEE4')
|
||||
source=("http://www.eu.apache.org/dist/couchdb/source/$pkgver/apache-couchdb-$pkgver.tar.gz"{,.asc}
|
||||
'etc/couchdb/vm.args')
|
||||
source=("http://www-eu.apache.org/dist/couchdb/source/${pkgver}/apache-couchdb-${pkgver}.tar.gz"{,.asc}
|
||||
"https://github.com/rebar/rebar/commit/f9b850c428dae6cf6673ff076d863d5b6c343569.patch"
|
||||
"couchdb.service"
|
||||
"couchdb.tmpfiles"
|
||||
"datadirs.ini")
|
||||
md5sums=('402fc02df28a5297a56cedebbae42524'
|
||||
'SKIP'
|
||||
'ed7d01517ab6bc82fce1871715046ae4'
|
||||
'38cea6d9b533a22dadc22538a921c282'
|
||||
'1e254ebe32eeb061be64193bafa35dbf'
|
||||
'cd649a705805e6193ae72aea33a2e4bd')
|
||||
'couchdb.service'
|
||||
'couchdb.sysusers'
|
||||
'couchdb.tmpfiles'
|
||||
'datadirs.ini')
|
||||
sha256sums=('ccaf3ce9cb06c50a73e091696e557e2a57c5ba02c5b299e1ac2f5b959ee96eca'
|
||||
'SKIP'
|
||||
'b658af33dcd5e7f90b42ba1b65b61905b818103f0a9fa85f15f3bfec216c7435'
|
||||
'3ed1ad2a37a068ce194b03fb72eb35285d60fa7faf2d2c2bb710703d229108a8'
|
||||
'0ce806cbc5e18e60b17be9fd2cdbd4c7f12cc84ca95b079efdede16ddb5f3efd'
|
||||
'937ca3498aab47b3f2226d027fa8a1a95de55cbb463373099e28cb9a6c7046ac')
|
||||
validpgpkeys=('E0AF0A194D55C84E4A19A801CDB0C0F904F4EE9B'
|
||||
'D2B17F9DA23C0A10991AF2E3D9EE01E47852AEE4')
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir/apache-couchdb-$pkgver"
|
||||
cd apache-couchdb-${pkgver}
|
||||
sed -i 's|$ROOTDIR/etc/vm.args|/etc/couchdb/vm.args|' rel/overlay/bin/couchdb
|
||||
sed -i 's/17|18|19/&|20/' rebar.config.script src/snappy/rebar.config
|
||||
|
||||
if [[ $CARCH == aarch64 ]]; then
|
||||
cd src/rebar
|
||||
|
@ -46,26 +45,23 @@ prepare() {
|
|||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/apache-couchdb-$pkgver"
|
||||
cd apache-couchdb-${pkgver}
|
||||
./configure
|
||||
make release
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/apache-couchdb-$pkgver"
|
||||
install -dm0755 "$pkgdir"/usr/lib/
|
||||
install -dm0755 "$pkgdir"/etc/couchdb/
|
||||
install -dm0755 "$pkgdir"/var/lib/couchdb/
|
||||
cd apache-couchdb-${pkgver}
|
||||
install -dm755 "${pkgdir}"/usr/lib/
|
||||
install -dm755 "${pkgdir}"/etc/couchdb/
|
||||
|
||||
cp -r rel/couchdb "$pkgdir"/usr/lib/couchdb
|
||||
mv "$pkgdir"/usr/lib/couchdb/etc/local.ini "$pkgdir"/etc/couchdb/local.ini
|
||||
mv "$pkgdir"/usr/lib/couchdb/etc/vm.args "$pkgdir"/etc/couchdb/vm.args
|
||||
cp -r rel/couchdb "${pkgdir}"/usr/lib/couchdb
|
||||
mv "${pkgdir}"/usr/lib/couchdb/etc/local.ini "${pkgdir}"/etc/couchdb/local.ini
|
||||
mv "${pkgdir}"/usr/lib/couchdb/etc/vm.args "${pkgdir}"/etc/couchdb/vm.args
|
||||
|
||||
# use system erts
|
||||
# rm -rf "$pkgdir"/usr/lib/couchdb/erts-*
|
||||
# _erts=$(cd /usr/lib/erlang/ && ls -1d erts-*)
|
||||
# ln -s /usr/lib/erlang/${_erts} "$pkgdir"/usr/lib/couchdb/${_erts}
|
||||
|
||||
install -Dm0644 "$srcdir"/$pkgname.service "$pkgdir"/usr/lib/systemd/system/$pkgname.service
|
||||
install -Dm0644 "$srcdir"/datadirs.ini "$pkgdir"/usr/lib/couchdb/etc/datadirs.ini
|
||||
cd "${srcdir}"
|
||||
install -Dm644 ${pkgname}.service -t "${pkgdir}"/usr/lib/systemd/system/
|
||||
install -Dm644 ${pkgname}.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname}.conf
|
||||
install -Dm644 ${pkgname}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf
|
||||
install -Dm644 datadirs.ini -t "${pkgdir}"/usr/lib/couchdb/etc/
|
||||
}
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
post_install() {
|
||||
id couchdb &>/dev/null || \
|
||||
useradd -r -c "CouchDB daemon" -g daemon -d /var/lib/couchdb -s /bin/false couchdb
|
||||
chown couchdb.daemon /etc/couchdb/local.ini
|
||||
chown -R couchdb.daemon /var/lib/couchdb
|
||||
}
|
||||
|
||||
pre_upgrade() {
|
||||
id couchdb &>/dev/null || \
|
||||
useradd -r -c "CouchDB daemon" -g daemon -d /var/lib/couchdb -s /bin/false couchdb
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
chown couchdb.daemon /etc/couchdb/local.ini
|
||||
chown -R couchdb.daemon /var/lib/couchdb
|
||||
if [ $(vercmp $2 2.0.0-15) -lt 0 ] ; then
|
||||
cat << EOF
|
||||
|
||||
Since 2.0.0-15, couchdb user now defaults to couchdb group (it used to be in the daemon group).
|
||||
You might want to change couchdb user to this new group and fix ownership of its files.
|
||||
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
|
1
community/couchdb/couchdb.sysusers
Normal file
1
community/couchdb/couchdb.sysusers
Normal file
|
@ -0,0 +1 @@
|
|||
u couchdb - "CouchDB daemon" /var/lib/couchdb
|
|
@ -1 +1,3 @@
|
|||
d /run/couchdb 0755 couchdb daemon -
|
||||
d /var/lib/couchdb 0755 couchdb couchdb
|
||||
x /var/lib/couchdb
|
||||
z /etc/couchdb/local.ini - couchdb couchdb
|
||||
|
|
Loading…
Reference in a new issue