PKGBUILDs/extra/couchdb/PKGBUILD

92 lines
3.4 KiB
Bash
Raw Normal View History

2022-05-28 19:22:37 +00:00
# Maintainer: Bruno Pagani <archange@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Vitaliy Berdinskikh ur6lad[at]i.ua
# Contributor: Michael Fellinger <m.fellinger@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2023-06-30 00:09:21 +00:00
# - patch to disable LTO
2022-05-28 19:22:37 +00:00
pkgname=couchdb
2023-06-29 03:20:01 +00:00
pkgver=3.3.2
pkgrel=1
2022-05-28 19:22:37 +00:00
pkgdesc="Document-oriented database that can be queried and indexed in a MapReduce fashion using JSON"
arch=(x86_64)
url="https://couchdb.apache.org"
license=(Apache)
depends=(icu js91 zlib)
optdepends=('erlang-nox: for weatherreport')
makedepends=(erlang-nox)
2023-06-29 03:20:01 +00:00
options=(!makeflags)
2022-05-28 19:22:37 +00:00
backup=(etc/couchdb/local.ini
etc/couchdb/vm.args
etc/default/couchdb)
source=("https://archive.apache.org/dist/${pkgname}/source/${pkgver}/apache-${pkgname}-${pkgver}.tar.gz"{,.asc}
2022-10-22 14:42:51 +00:00
https://github.com/davisp/jiffy/archive/1.1.1/jiffy-1.1.1.tar.gz
2023-06-29 03:20:01 +00:00
erlang-26.patch
erlang-26-compatibilty.patch
2022-05-28 19:22:37 +00:00
couchdb.default
couchdb.service
couchdb.sysusers
couchdb.tmpfiles
arm.patch)
2023-06-29 03:20:01 +00:00
sha256sums=('3d6823d42d10cf0d4f86c9c4fe59c9932c89d68578fcb6c4b4278dc769308daa'
2022-05-28 19:22:37 +00:00
'SKIP'
2022-10-22 14:42:51 +00:00
'a999351d956d3ed10c33a6dd7e9435e674e519b5b82a46d60361afdb83062fd8'
2023-06-29 03:20:01 +00:00
'06782fccf44ad0463f55f0d9edc03c3ba05958471811bc38c1a155d322e09fa5'
'ec18cdf8b0e7287db0467385797b5fe11f17701ab10df631cb74b6e56099bf5e'
2022-05-28 19:22:37 +00:00
'0d21fdd7851b3a6fa099b030cab0e96705b1d5a3a83a4ff1c871814d8742cae9'
'6ab3d362f3fcd9079036c883dc09dc597584cb627831460f2e0c68a31aa052ae'
'3ed1ad2a37a068ce194b03fb72eb35285d60fa7faf2d2c2bb710703d229108a8'
'7331b9675e3668c5f0d632bee5d154c061cc3e60d451bef3dc0d0ab2dadfa006'
2023-06-30 00:09:21 +00:00
'2da85e0107a9dc6606dc349e7f89d5634749e54890905cd76a062ac53dc205f9')
2022-07-03 20:43:50 +00:00
# https://downloads.apache.org/couchdb/KEYS
2022-05-28 19:22:37 +00:00
validpgpkeys=(2EC788AE3F239FA13E82D215CDE711289384AE37 # Joan Touzet (CODE SIGNING KEY) <wohali@apache.org>
D2B17F9DA23C0A10991AF2E3D9EE01E47852AEE4 # Jan Lehnardt <jan@apache.org>
0BD7A98499C4AB41C910EE65FC04DFBC9657A78E) # Nick Vatamaniuc <vatamane@gmail.com>
prepare() {
cd apache-couchdb-${pkgver}
sed -i 's|./data|/var/lib/couchdb|' configure
2022-10-22 14:42:51 +00:00
# force recompilation of "rebar" with current erlang
rm bin/rebar
# use newer jiffy which doesn't ship an "enc" binary
rm -r src/jiffy
mv ../jiffy-1.1.1 src/jiffy
2023-06-29 03:20:01 +00:00
patch -Np1 <../erlang-26.patch
# make it compile against erlang 26
# part of https://github.com/apache/couchdb/pull/4581
patch -Np1 <../erlang-26-compatibilty.patch
2022-10-22 14:42:51 +00:00
2022-05-28 19:22:37 +00:00
patch -p1 -i ../arm.patch
}
build() {
cd apache-couchdb-${pkgver}
2023-06-29 03:20:01 +00:00
./configure --spidermonkey-version 91 #--help
2022-05-28 19:22:37 +00:00
make release
}
package() {
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/{default.ini,local.ini,vm.args} "${pkgdir}"/etc/couchdb/
cd "${srcdir}"
install -Dm644 ${pkgname}.default "${pkgdir}"/etc/default/${pkgname}
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
# Remove some cruft
2023-06-29 03:20:01 +00:00
rm -r "${pkgdir}"/usr/lib/couchdb/erts-14.0.1/{doc,include,lib,man,src}
2022-05-28 19:22:37 +00:00
rm -rv "${pkgdir}"/usr/lib/couchdb/etc/
rm -rv "${pkgdir}"/usr/lib/couchdb/lib/couch-${pkgver}/priv/couch_{ejson_compare,js}
}