dev-db/couchdb: new package, add 3.5.1

Signed-off-by: Liv <maw@mawile.net>
This commit is contained in:
Liv
2026-05-07 18:49:29 +02:00
parent 7e1748c564
commit 30835f75aa
5 changed files with 101 additions and 0 deletions

1
dev-db/couchdb/Manifest Normal file
View File

@@ -0,0 +1 @@
DIST apache-couchdb-3.5.1.tar.gz 25006439 BLAKE2B 1129897da42ae8a5c77b5f52fe256ebd2d75f38a634152b597be64e26190f45e713a55730d840655a09ba0ec70cf06f329a2ead1fa1a7b93009d115ce9e2bb80 SHA512 f0539b2bae11ae339e8db5497b6fdfcc11953017a5104011fc41fdeb4cab180c98a5195e92746d5f23bdc9eef299fffe172a7d3f36c38cb781577123555bee5d

View File

@@ -0,0 +1,70 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Document-oriented NoSQL database"
HOMEPAGE="https://couchdb.apache.org"
SRC_URI="https://apache.org/dist/${PN}/source/${PV}/apache-${PN}-${PV}.tar.gz"
S="${WORKDIR}/apache-${PN}-${PV}"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
QA_PREBUILT="
/usr/lib/${PN}/lib/**/*
/usr/lib/${PN}/erts-*/bin/*
"
RDEPEND="
>=dev-libs/openssl-3.5.6
>=dev-libs/icu-78.3
>=sys-libs/ncurses-6.5_p20251220
>=virtual/zlib-1.3.1
acct-user/couchdb
acct-group/couchdb
"
DEPEND="
${RDEPEND}
>=dev-lang/erlang-28.1
"
src_prepare() {
# Change CouchDB's data directory to /var/lib/couchdb
sed -i 's|./data|/var/lib/couchdb|' "${S}"/configure
eapply_user
}
src_configure() {
./configure \
--js-engine=quickjs \
--disable-spidermonkey || die
}
src_compile() {
emake release
}
src_install() {
# CouchDB doesn't provide a helpful `make install`, so we have to manually copy
# most things over to ${D}
mkdir -p "${D}"/usr/lib/${PN} "${D}"/etc/${PN}
cp -vr "${S}"/rel/${PN} "${D}"/usr/lib/
mv -v "${D}"/usr/lib/${PN}/etc/{default.ini,local.ini,vm.args} "${D}"/etc/${PN}/
# Scope ownership of CouchDB directories to the couchdb user
fowners -R couchdb:couchdb /usr/lib/${PN}
fowners -R couchdb:couchdb /etc/${PN}
find "${D}"/usr/lib/${PN} -type d -exec chmod 0770 {} \;
fperms 0644 /etc/${PN}/*
# Install scripts
newinitd "${FILESDIR}"/couchdb-init.d couchdb
newconfd "${FILESDIR}"/couchdb-conf.d couchdb
# Remove some cruft
rm -vr "${D}"/usr/lib/${PN}/erts-*/{doc,include,lib,man,src}
rm -vr "${D}"/usr/lib/${PN}/etc/
rm -vr "${D}"/usr/lib/${PN}/lib/couch-${PV}/priv/couch_{ejson_compare,js}
}

View File

@@ -0,0 +1,5 @@
# Path to the OTP arguments
#COUCHDB_ARGS_FILE=/etc/couchdb/vm.args
# Path to CouchDB configuration files
#COUCHDB_INI_FILES="/etc/couchdb/default.ini /etc/couchdb/local.ini"

View File

@@ -0,0 +1,17 @@
#!/sbin/openrc-run
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
export COUCHDB_ARGS_FILE=${COUCHDB_ARGS_FILE:-/etc/couchdb/vm.args}
export COUCHDB_INI_FILES=${COUCHDB_INI_FILES:-"/etc/couchdb/default.ini /etc/couchdb/local.ini"}
pidfile="/run/${RC_SVCNAME}.pid"
command="/usr/lib/couchdb/bin/couchdb"
command_args="${COUCHDB_OPTS}"
command_background="true"
command_user="couchdb"
name="CouchDB Database"
depend() {
use net
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>maw@mawile.net</email>
<name>Liv</name>
</maintainer>
</pkgmetadata>