Skip to content

Instantly share code, notes, and snippets.

@emoryy
Created May 15, 2017 07:50
Show Gist options
  • Save emoryy/517d8643fe9648d16b700eb8aff789a6 to your computer and use it in GitHub Desktop.
Save emoryy/517d8643fe9648d16b700eb8aff789a6 to your computer and use it in GitHub Desktop.
# $Id$
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Vitaliy Berdinskikh ur6lad[at]i.ua
# Contributor: Michael Fellinger <m.fellinger@gmail.com>
pkgname=couchdb-git-peruser-git-test
pkgver=2.0.0_test
pkgrel=13
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')
conflicts=('couchdb')
depends=('icu' 'erlang-nox' 'js185' 'openssl' 'curl' 'util-linux')
makedepends=('autoconf-archive' 'git')
install=couchdb.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}
"git+https://github.com/apache/couchdb"
"git+https://github.com/guillett/couchdb-peruser.git#branch=test"
"couchdb.service"
"couchdb.tmpfiles"
"datadirs.ini")
md5sums=(
# '402fc02df28a5297a56cedebbae42524'
'SKIP'
'SKIP'
'38cea6d9b533a22dadc22538a921c282'
'1e254ebe32eeb061be64193bafa35dbf'
'cd649a705805e6193ae72aea33a2e4bd')
prepare() {
cd "$srcdir/couchdb"
cp -R ../couchdb-peruser/src ./src/couch_peruser
cp -R ../couchdb-peruser/test ./src/couch_peruser
sed -i 's|$ROOTDIR/etc/vm.args|/etc/couchdb/vm.args|' rel/overlay/bin/couchdb
}
build() {
cd "$srcdir/couchdb"
./configure --disable-docs
make release
}
package() {
cd "$srcdir/couchdb"
install -dm0755 "$pkgdir"/usr/lib/
install -dm0755 "$pkgdir"/etc/couchdb/
install -dm0755 "$pkgdir"/var/lib/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
# 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"/couchdb.service "$pkgdir"/usr/lib/systemd/system/couchdb.service
install -Dm0644 "$srcdir"/datadirs.ini "$pkgdir"/usr/lib/couchdb/etc/datadirs.ini
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment