Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] couchdb: update to 3.0.1
@ 2020-05-06 16:59 arete
  2020-05-18  8:31 ` [PR PATCH] [Updated] " arete
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: arete @ 2020-05-06 16:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 308 bytes --]

There is a new pull request by arete against master on the void-packages repository

https://github.com/arete/void-packages couchdb301
https://github.com/void-linux/void-packages/pull/21696

couchdb: update to 3.0.1


A patch file from https://github.com/void-linux/void-packages/pull/21696.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-couchdb301-21696.patch --]
[-- Type: text/x-diff, Size: 5896 bytes --]

From e0df65639bf47b2651d52698131086aafcfba8d6 Mon Sep 17 00:00:00 2001
From: Gerardo Di Iorio <arete74@gmail.com>
Date: Wed, 6 May 2020 18:57:42 +0200
Subject: [PATCH] couchdb: update to 3.0.1

---
 srcpkgs/couchdb/INSTALL           |   2 +-
 srcpkgs/couchdb/files/couchdb/run |   5 +-
 srcpkgs/couchdb/template          | 109 ++++++++++++++++++++++++------
 3 files changed, 93 insertions(+), 23 deletions(-)

diff --git a/srcpkgs/couchdb/INSTALL b/srcpkgs/couchdb/INSTALL
index 753e71b95d6..84b0d08ab87 100644
--- a/srcpkgs/couchdb/INSTALL
+++ b/srcpkgs/couchdb/INSTALL
@@ -1,6 +1,6 @@
 case "$ACTION" in
         post)
-                chown -R couchdb /var/lib/couchdb/ /var/log/couchdb/
+		chown -R couchdb:couchdb var/lib/couchdb/ var/log/couchdb/ usr/lib/couchdb/
         ;;
 esac
 
diff --git a/srcpkgs/couchdb/files/couchdb/run b/srcpkgs/couchdb/files/couchdb/run
index 25d1abb8272..72d76191f51 100755
--- a/srcpkgs/couchdb/files/couchdb/run
+++ b/srcpkgs/couchdb/files/couchdb/run
@@ -1,6 +1,5 @@
 #!/bin/sh
 export HOME=/var/lib/couchdb
 mkdir -p /var/run/couchdb
-chown couchdb /var/run/couchdb
-exec chpst -u couchdb:couchdb couchdb -r 5 -o /dev/null  -e /dev/null
-
+chown couchdb:couchdb /var/run/couchdb
+exec chpst -u couchdb:couchdb couchdb
diff --git a/srcpkgs/couchdb/template b/srcpkgs/couchdb/template
index 5ca5eacbaab..ef04f02173a 100644
--- a/srcpkgs/couchdb/template
+++ b/srcpkgs/couchdb/template
@@ -1,40 +1,111 @@
 # Template file for 'couchdb'
 pkgname=couchdb
-version=1.7.1
-revision=2
+version=3.0.1
+revision=1
 wrksrc="apache-couchdb-${version}"
-build_style=gnu-configure
-conf_files="/etc/couchdb/default.ini /etc/couchdb/local.ini"
-hostmakedepends="erlang pkg-config"
-makedepends="libressl-devel icu-devel js-devel libcurl-devel"
+build_style=gnu-makefile
+make_build_args="V=1"
+make_build_target="release"
+configure_args="--user couchdb --with-curl --spidermonkey-version 60"
+conf_files="/etc/couchdb/*.ini"
+hostmakedepends="erlang help2man"
+makedepends="libressl-devel icu-devel mozjs60-devel libcurl-devel"
 depends="erlang"
-short_desc="A document-oriented database"
+short_desc="Document-oriented database"
 maintainer="Gerardo Di Iorio <arete74@gmail.com>"
 license="Apache-2.0"
 homepage="http://couchdb.apache.org/"
-distfiles="https://dist.apache.org/repos/dist/release/couchdb/source/${version}/apache-couchdb-${version}.tar.gz"
-checksum=91200aa6fbc6fa5e2f3d78ef40e39d8c1ec7c83ea1c2cd730d270658735b2cad
-broken="unsupported version upstream, broken distfiles"
+distfiles="https://downloads.apache.org/couchdb/source/${version}/apache-couchdb-${version}.tar.gz"
+checksum=08d61d5c779957d074d5097f28a2dfc9eb518af3c479d5318135ff31212cc522
 
 system_accounts="couchdb"
 couchdb_homedir="/var/lib/couchdb"
+couchdb_shell="/bin/sh"
+couchdb_descr="CouchDB Administrator"
 make_dirs="
-	/var/lib/couchdb 0700 couchdb couchdb
-	/var/log/couchdb 0750 couchdb couchdb"
+ /var/lib/couchdb 0770 couchdb couchdb
+ /var/log/couchdb 0750 couchdb couchdb"
 
 if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" mozjs60-devel"
 	makedepends+=" erlang"
-	configure_args="--with-erlang=${XBPS_CROSS_BASE}/usr/lib/erlang/usr/include"
+	ERL_CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/js -I${XBPS_CROSS_BASE}/usr/lib/erlang/usr/include"
 fi
 
-pre_configure() {
-	sed -i 's|-Werror|-pie -fPIE|g' src/couchdb/priv/Makefile.*
-if [ "$CROSS_BUILD" ]; then
-	sed -i '/FLAGS.*\(usr\|opt\)/s/.*/:/' configure
-fi
+do_configure() {
+	if [ "$CROSS_BUILD" ]; then
+		vsed -i src/rebar/src/rebar_port_compiler.erl \
+			-e "s;, erl_interface_dir(lib);, \"${XBPS_CROSS_BASE}/\"&;"
+		make -C src/rebar
+	fi
+	./configure ${configure_args} ERL_CFLAGS="${ERL_CFLAGS}"
 }
 
+do_install() {
+	local dir
+	if [ "$CROSS_BUILD" ]; then
+		# Copy target erlang libraries into release
+		for dir in $(ls rel/couchdb); do
+			if [ -d "${XBPS_CROSS_BASE}/usr/lib/erlang/${dir}" ]; then
+				echo "Copying target erlang ${dir} ..."
+				cp -pRv ${XBPS_CROSS_BASE}/usr/lib/erlang/${dir}/* \
+					rel/couchdb/${dir}/
+			fi
+		done
+		for dir in $(ls rel/couchdb/lib); do
+			if [ -d "${XBPS_CROSS_BASE}/usr/lib/erlang/lib/${dir}" ]; then
+				echo "Copying target erlang ${dir} ..."
+				cp -pR ${XBPS_CROSS_BASE}/usr/lib/erlang/lib/${dir}/* \
+					rel/couchdb/lib/${dir}/
+			fi
+		done
+	fi
+
+	# Change permissions according to the installation guide at
+	# https://docs.couchdb.org/en/stable/install/unix.html
+	find rel -type d -exec chmod 0770 "{}" \;
+	find rel/couchdb/etc  -type f -exec chmod 0640 "{}" \;
+
+
+	# Write a log-to-file configuration to default.d/10-logfile.ini
+	cat >> rel/couchdb/etc/default.d/10-logfile.ini <<- EOF
+	[log]
+	writer = file
+	file = /var/log/couchdb/couch.log
+	level = info
+	EOF
+
+	# Write a single_node = true configuration to local.d/10-single_node.ini
+	cat >> rel/couchdb/etc/local.d/10-single_node.ini <<- EOF
+	[couchdb]
+	single_node = true
+	EOF
+
+	# Write database folder config to default.d/20-datafolder.init <<- EOF
+	cat  >> rel/couchdb/etc/default.d/20-data_folder.ini <<- EOF
+	[couchdb]
+	view_index_dir = /var/lib/couchdb/data
+	database_dir = /var/lib/couchdb/data
+	EOF
+
+	# Copy the release to usr/lib/couchdb
+	vmkdir usr/lib
+	vcopy rel/couchdb usr/lib
+
+	# Manual page
+	vman rel/couchdb/share/docs/couchdb.1
+
+	# Symbolic links for the configation (ini) files
+	vmkdir etc/couchdb
+	ln -srv ${DESTDIR}/usr/lib/couchdb/etc/default.ini ${DESTDIR}/etc/couchdb
+	ln -srv ${DESTDIR}/usr/lib/couchdb/etc/default.d ${DESTDIR}/etc/couchdb
+	ln -srv ${DESTDIR}/usr/lib/couchdb/etc/local.ini ${DESTDIR}/etc/couchdb
+	ln -srv ${DESTDIR}/usr/lib/couchdb/etc/local.d ${DESTDIR}/etc/couchdb
+	ln -srv ${DESTDIR}/usr/lib/couchdb/etc/vm.args ${DESTDIR}/etc/couchdb
+
+	# Symbolic link for the binary
+	vmkdir usr/bin
+	ln -srv ${DESTDIR}/usr/lib/couchdb/bin/couchdb ${DESTDIR}/usr/bin/couchdb
 
-post_install() {
 	vsv couchdb
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] couchdb: update to 3.0.1
  2020-05-06 16:59 [PR PATCH] couchdb: update to 3.0.1 arete
@ 2020-05-18  8:31 ` arete
  2020-05-18 19:18 ` arete
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: arete @ 2020-05-18  8:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

There is an updated pull request by arete against master on the void-packages repository

https://github.com/arete/void-packages couchdb301
https://github.com/void-linux/void-packages/pull/21696

couchdb: update to 3.0.1


A patch file from https://github.com/void-linux/void-packages/pull/21696.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-couchdb301-21696.patch --]
[-- Type: text/x-diff, Size: 5875 bytes --]

From 3de0c184843b54a7f61b9a899d3a944320137c03 Mon Sep 17 00:00:00 2001
From: Gerardo Di Iorio <arete74@gmail.com>
Date: Wed, 6 May 2020 18:57:42 +0200
Subject: [PATCH] couchdb: update to 3.0.1

---
 srcpkgs/couchdb/INSTALL           |   7 +-
 srcpkgs/couchdb/files/couchdb/run |   5 +-
 srcpkgs/couchdb/template          | 107 +++++++++++++++++++++++++-----
 3 files changed, 94 insertions(+), 25 deletions(-)

diff --git a/srcpkgs/couchdb/INSTALL b/srcpkgs/couchdb/INSTALL
index 753e71b95d6..d7b62ae706c 100644
--- a/srcpkgs/couchdb/INSTALL
+++ b/srcpkgs/couchdb/INSTALL
@@ -1,6 +1,5 @@
 case "$ACTION" in
-        post)
-                chown -R couchdb /var/lib/couchdb/ /var/log/couchdb/
-        ;;
+	post)
+		chown -R couchdb:couchdb var/lib/couchdb/ var/log/couchdb/ usr/lib/couchdb/
+	;;
 esac
-
diff --git a/srcpkgs/couchdb/files/couchdb/run b/srcpkgs/couchdb/files/couchdb/run
index 25d1abb8272..72d76191f51 100755
--- a/srcpkgs/couchdb/files/couchdb/run
+++ b/srcpkgs/couchdb/files/couchdb/run
@@ -1,6 +1,5 @@
 #!/bin/sh
 export HOME=/var/lib/couchdb
 mkdir -p /var/run/couchdb
-chown couchdb /var/run/couchdb
-exec chpst -u couchdb:couchdb couchdb -r 5 -o /dev/null  -e /dev/null
-
+chown couchdb:couchdb /var/run/couchdb
+exec chpst -u couchdb:couchdb couchdb
diff --git a/srcpkgs/couchdb/template b/srcpkgs/couchdb/template
index 5ca5eacbaab..4d4e4b008b2 100644
--- a/srcpkgs/couchdb/template
+++ b/srcpkgs/couchdb/template
@@ -1,40 +1,111 @@
 # Template file for 'couchdb'
 pkgname=couchdb
-version=1.7.1
-revision=2
+version=3.0.1
+revision=1
 wrksrc="apache-couchdb-${version}"
-build_style=gnu-configure
-conf_files="/etc/couchdb/default.ini /etc/couchdb/local.ini"
-hostmakedepends="erlang pkg-config"
-makedepends="libressl-devel icu-devel js-devel libcurl-devel"
+build_style=configure
+make_build_args="V=1"
+make_build_target="release"
+configure_args="--user couchdb --with-curl --spidermonkey-version 60"
+conf_files="/etc/couchdb/*.ini"
+hostmakedepends="erlang help2man"
+makedepends="libressl-devel icu-devel mozjs60-devel libcurl-devel"
 depends="erlang"
-short_desc="A document-oriented database"
+short_desc="Document-oriented database"
 maintainer="Gerardo Di Iorio <arete74@gmail.com>"
 license="Apache-2.0"
 homepage="http://couchdb.apache.org/"
-distfiles="https://dist.apache.org/repos/dist/release/couchdb/source/${version}/apache-couchdb-${version}.tar.gz"
-checksum=91200aa6fbc6fa5e2f3d78ef40e39d8c1ec7c83ea1c2cd730d270658735b2cad
-broken="unsupported version upstream, broken distfiles"
+distfiles="https://downloads.apache.org/couchdb/source/${version}/apache-couchdb-${version}.tar.gz"
+checksum=08d61d5c779957d074d5097f28a2dfc9eb518af3c479d5318135ff31212cc522
 
 system_accounts="couchdb"
 couchdb_homedir="/var/lib/couchdb"
+couchdb_shell="/bin/sh"
+couchdb_descr="CouchDB Administrator"
 make_dirs="
-	/var/lib/couchdb 0700 couchdb couchdb
-	/var/log/couchdb 0750 couchdb couchdb"
+ /var/lib/couchdb 0700 couchdb couchdb
+ /var/log/couchdb 0750 couchdb couchdb"
 
 if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" mozjs60-devel"
 	makedepends+=" erlang"
-	configure_args="--with-erlang=${XBPS_CROSS_BASE}/usr/lib/erlang/usr/include"
+	ERL_CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/js -I${XBPS_CROSS_BASE}/usr/lib/erlang/usr/include"
 fi
 
 pre_configure() {
-	sed -i 's|-Werror|-pie -fPIE|g' src/couchdb/priv/Makefile.*
-if [ "$CROSS_BUILD" ]; then
-	sed -i '/FLAGS.*\(usr\|opt\)/s/.*/:/' configure
-fi
+	if [ "$CROSS_BUILD" ]; then
+		vsed -i src/rebar/src/rebar_port_compiler.erl \
+			-e "s;, erl_interface_dir(lib);, \"${XBPS_CROSS_BASE}/\"&;"
+		make -C src/rebar
+	fi
+	configure_args+= ERL_CFLAGS="${ERL_CFLAGS}"
 }
 
+do_install() {
+	local dir
+	if [ "$CROSS_BUILD" ]; then
+		# Copy target erlang libraries into release
+		for dir in $(ls rel/couchdb); do
+			if [ -d "${XBPS_CROSS_BASE}/usr/lib/erlang/${dir}" ]; then
+				echo "Copying target erlang ${dir} ..."
+				cp -pRv ${XBPS_CROSS_BASE}/usr/lib/erlang/${dir}/* \
+					rel/couchdb/${dir}/
+			fi
+		done
+		for dir in $(ls rel/couchdb/lib); do
+			if [ -d "${XBPS_CROSS_BASE}/usr/lib/erlang/lib/${dir}" ]; then
+				echo "Copying target erlang ${dir} ..."
+				cp -pR ${XBPS_CROSS_BASE}/usr/lib/erlang/lib/${dir}/* \
+					rel/couchdb/lib/${dir}/
+			fi
+		done
+	fi
+
+	# Change permissions according to the installation guide at
+	# https://docs.couchdb.org/en/stable/install/unix.html
+	find rel -type d -exec chmod 0770 "{}" \;
+	find rel/couchdb/etc  -type f -exec chmod 0640 "{}" \;
+
+
+	# Write a log-to-file configuration to default.d/10-logfile.ini
+	cat >> rel/couchdb/etc/default.d/10-logfile.ini <<- EOF
+	[log]
+	writer = file
+	file = /var/log/couchdb/couch.log
+	level = info
+	EOF
+
+	# Write a single_node = true configuration to local.d/10-single_node.ini
+	cat >> rel/couchdb/etc/local.d/10-single_node.ini <<- EOF
+	[couchdb]
+	single_node = true
+	EOF
+
+	# Write database folder config to default.d/20-datafolder.init <<- EOF
+	cat  >> rel/couchdb/etc/default.d/20-data_folder.ini <<- EOF
+	[couchdb]
+	view_index_dir = /var/lib/couchdb/data
+	database_dir = /var/lib/couchdb/data
+	EOF
+
+	# Copy the release to usr/lib/couchdb
+	vmkdir usr/lib
+	vcopy rel/couchdb usr/lib
+
+	# Manual page
+	vman rel/couchdb/share/docs/couchdb.1
+
+	# Symbolic links for the configation (ini) files
+	vmkdir etc/couchdb
+	ln -srv ${DESTDIR}/usr/lib/couchdb/etc/default.ini ${DESTDIR}/etc/couchdb
+	ln -srv ${DESTDIR}/usr/lib/couchdb/etc/default.d ${DESTDIR}/etc/couchdb
+	ln -srv ${DESTDIR}/usr/lib/couchdb/etc/local.ini ${DESTDIR}/etc/couchdb
+	ln -srv ${DESTDIR}/usr/lib/couchdb/etc/local.d ${DESTDIR}/etc/couchdb
+	ln -srv ${DESTDIR}/usr/lib/couchdb/etc/vm.args ${DESTDIR}/etc/couchdb
+
+	# Symbolic link for the binary
+	vmkdir usr/bin
+	ln -srv ${DESTDIR}/usr/lib/couchdb/bin/couchdb ${DESTDIR}/usr/bin/couchdb
 
-post_install() {
 	vsv couchdb
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] couchdb: update to 3.0.1
  2020-05-06 16:59 [PR PATCH] couchdb: update to 3.0.1 arete
  2020-05-18  8:31 ` [PR PATCH] [Updated] " arete
@ 2020-05-18 19:18 ` arete
  2020-05-19 18:14 ` arete
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: arete @ 2020-05-18 19:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

There is an updated pull request by arete against master on the void-packages repository

https://github.com/arete/void-packages couchdb301
https://github.com/void-linux/void-packages/pull/21696

couchdb: update to 3.0.1


A patch file from https://github.com/void-linux/void-packages/pull/21696.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-couchdb301-21696.patch --]
[-- Type: text/x-diff, Size: 5875 bytes --]

From f799b34a30938a59301bf450ebff4fe64e1ac824 Mon Sep 17 00:00:00 2001
From: Gerardo Di Iorio <arete74@gmail.com>
Date: Wed, 6 May 2020 18:57:42 +0200
Subject: [PATCH] couchdb: update to 3.0.1

---
 srcpkgs/couchdb/INSTALL           |   7 +-
 srcpkgs/couchdb/files/couchdb/run |   5 +-
 srcpkgs/couchdb/template          | 107 +++++++++++++++++++++++++-----
 3 files changed, 94 insertions(+), 25 deletions(-)

diff --git a/srcpkgs/couchdb/INSTALL b/srcpkgs/couchdb/INSTALL
index 753e71b95d6..d7b62ae706c 100644
--- a/srcpkgs/couchdb/INSTALL
+++ b/srcpkgs/couchdb/INSTALL
@@ -1,6 +1,5 @@
 case "$ACTION" in
-        post)
-                chown -R couchdb /var/lib/couchdb/ /var/log/couchdb/
-        ;;
+	post)
+		chown -R couchdb:couchdb var/lib/couchdb/ var/log/couchdb/ usr/lib/couchdb/
+	;;
 esac
-
diff --git a/srcpkgs/couchdb/files/couchdb/run b/srcpkgs/couchdb/files/couchdb/run
index 25d1abb8272..72d76191f51 100755
--- a/srcpkgs/couchdb/files/couchdb/run
+++ b/srcpkgs/couchdb/files/couchdb/run
@@ -1,6 +1,5 @@
 #!/bin/sh
 export HOME=/var/lib/couchdb
 mkdir -p /var/run/couchdb
-chown couchdb /var/run/couchdb
-exec chpst -u couchdb:couchdb couchdb -r 5 -o /dev/null  -e /dev/null
-
+chown couchdb:couchdb /var/run/couchdb
+exec chpst -u couchdb:couchdb couchdb
diff --git a/srcpkgs/couchdb/template b/srcpkgs/couchdb/template
index 5ca5eacbaab..4d4e4b008b2 100644
--- a/srcpkgs/couchdb/template
+++ b/srcpkgs/couchdb/template
@@ -1,40 +1,111 @@
 # Template file for 'couchdb'
 pkgname=couchdb
-version=1.7.1
-revision=2
+version=3.0.1
+revision=1
 wrksrc="apache-couchdb-${version}"
-build_style=gnu-configure
-conf_files="/etc/couchdb/default.ini /etc/couchdb/local.ini"
-hostmakedepends="erlang pkg-config"
-makedepends="libressl-devel icu-devel js-devel libcurl-devel"
+build_style=configure
+make_build_args="V=1"
+make_build_target="release"
+configure_args="--user couchdb --with-curl --spidermonkey-version 60"
+conf_files="/etc/couchdb/*.ini"
+hostmakedepends="erlang help2man"
+makedepends="libressl-devel icu-devel mozjs60-devel libcurl-devel"
 depends="erlang"
-short_desc="A document-oriented database"
+short_desc="Document-oriented database"
 maintainer="Gerardo Di Iorio <arete74@gmail.com>"
 license="Apache-2.0"
 homepage="http://couchdb.apache.org/"
-distfiles="https://dist.apache.org/repos/dist/release/couchdb/source/${version}/apache-couchdb-${version}.tar.gz"
-checksum=91200aa6fbc6fa5e2f3d78ef40e39d8c1ec7c83ea1c2cd730d270658735b2cad
-broken="unsupported version upstream, broken distfiles"
+distfiles="https://downloads.apache.org/couchdb/source/${version}/apache-couchdb-${version}.tar.gz"
+checksum=08d61d5c779957d074d5097f28a2dfc9eb518af3c479d5318135ff31212cc522
 
 system_accounts="couchdb"
 couchdb_homedir="/var/lib/couchdb"
+couchdb_shell="/bin/sh"
+couchdb_descr="CouchDB Administrator"
 make_dirs="
-	/var/lib/couchdb 0700 couchdb couchdb
-	/var/log/couchdb 0750 couchdb couchdb"
+ /var/lib/couchdb 0700 couchdb couchdb
+ /var/log/couchdb 0750 couchdb couchdb"
 
 if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" mozjs60-devel"
 	makedepends+=" erlang"
-	configure_args="--with-erlang=${XBPS_CROSS_BASE}/usr/lib/erlang/usr/include"
+	ERL_CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/js -I${XBPS_CROSS_BASE}/usr/lib/erlang/usr/include"
 fi
 
 pre_configure() {
-	sed -i 's|-Werror|-pie -fPIE|g' src/couchdb/priv/Makefile.*
-if [ "$CROSS_BUILD" ]; then
-	sed -i '/FLAGS.*\(usr\|opt\)/s/.*/:/' configure
-fi
+	if [ "$CROSS_BUILD" ]; then
+		vsed -i src/rebar/src/rebar_port_compiler.erl \
+			-e "s;, erl_interface_dir(lib);, \"${XBPS_CROSS_BASE}/\"&;"
+		make -C src/rebar
+	fi
+	configure_args+= ERL_CFLAGS="${ERL_CFLAGS}"
 }
 
+do_install() {
+	local dir
+	if [ "$CROSS_BUILD" ]; then
+		# Copy target erlang libraries into release
+		for dir in $(ls rel/couchdb); do
+			if [ -d "${XBPS_CROSS_BASE}/usr/lib/erlang/${dir}" ]; then
+				echo "Copying target erlang ${dir} ..."
+				cp -pRv ${XBPS_CROSS_BASE}/usr/lib/erlang/${dir}/* \
+					rel/couchdb/${dir}/
+			fi
+		done
+		for dir in $(ls rel/couchdb/lib); do
+			if [ -d "${XBPS_CROSS_BASE}/usr/lib/erlang/lib/${dir}" ]; then
+				echo "Copying target erlang ${dir} ..."
+				cp -pR ${XBPS_CROSS_BASE}/usr/lib/erlang/lib/${dir}/* \
+					rel/couchdb/lib/${dir}/
+			fi
+		done
+	fi
+
+	# Change permissions according to the installation guide at
+	# https://docs.couchdb.org/en/stable/install/unix.html
+	find rel -type d -exec chmod 0770 "{}" \;
+	find rel/couchdb/etc  -type f -exec chmod 0640 "{}" \;
+
+
+	# Write a log-to-file configuration to default.d/10-logfile.ini
+	cat >> rel/couchdb/etc/default.d/10-logfile.ini <<- EOF
+	[log]
+	writer = file
+	file = /var/log/couchdb/couch.log
+	level = info
+	EOF
+
+	# Write a single_node = true configuration to local.d/10-single_node.ini
+	cat >> rel/couchdb/etc/local.d/10-single_node.ini <<- EOF
+	[couchdb]
+	single_node = true
+	EOF
+
+	# Write database folder config to default.d/20-datafolder.init <<- EOF
+	cat  >> rel/couchdb/etc/default.d/20-data_folder.ini <<- EOF
+	[couchdb]
+	view_index_dir = /var/lib/couchdb/data
+	database_dir = /var/lib/couchdb/data
+	EOF
+
+	# Copy the release to usr/lib/couchdb
+	vmkdir usr/lib
+	vcopy rel/couchdb usr/lib
+
+	# Manual page
+	vman rel/couchdb/share/docs/couchdb.1
+
+	# Symbolic links for the configation (ini) files
+	vmkdir etc/couchdb
+	ln -srv ${DESTDIR}/usr/lib/couchdb/etc/default.ini ${DESTDIR}/etc/couchdb
+	ln -srv ${DESTDIR}/usr/lib/couchdb/etc/default.d ${DESTDIR}/etc/couchdb
+	ln -srv ${DESTDIR}/usr/lib/couchdb/etc/local.ini ${DESTDIR}/etc/couchdb
+	ln -srv ${DESTDIR}/usr/lib/couchdb/etc/local.d ${DESTDIR}/etc/couchdb
+	ln -srv ${DESTDIR}/usr/lib/couchdb/etc/vm.args ${DESTDIR}/etc/couchdb
+
+	# Symbolic link for the binary
+	vmkdir usr/bin
+	ln -srv ${DESTDIR}/usr/lib/couchdb/bin/couchdb ${DESTDIR}/usr/bin/couchdb
 
-post_install() {
 	vsv couchdb
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: couchdb: update to 3.0.1
  2020-05-06 16:59 [PR PATCH] couchdb: update to 3.0.1 arete
  2020-05-18  8:31 ` [PR PATCH] [Updated] " arete
  2020-05-18 19:18 ` arete
@ 2020-05-19 18:14 ` arete
  2021-01-29  0:45 ` ericonr
  2021-01-29  0:45 ` [PR PATCH] [Closed]: " ericonr
  4 siblings, 0 replies; 6+ messages in thread
From: arete @ 2020-05-19 18:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 205 bytes --]

New comment by arete on void-packages repository

https://github.com/void-linux/void-packages/pull/21696#issuecomment-630992540

Comment:
this pull request not build with master after update erlang #22108

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: couchdb: update to 3.0.1
  2020-05-06 16:59 [PR PATCH] couchdb: update to 3.0.1 arete
                   ` (2 preceding siblings ...)
  2020-05-19 18:14 ` arete
@ 2021-01-29  0:45 ` ericonr
  2021-01-29  0:45 ` [PR PATCH] [Closed]: " ericonr
  4 siblings, 0 replies; 6+ messages in thread
From: ericonr @ 2021-01-29  0:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 300 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/21696#issuecomment-769494405

Comment:
Given comment in https://github.com/void-linux/void-packages/pull/28201#issuecomment-768477400 , I will be closing this. Feel free to reopen or open a new one.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Closed]: couchdb: update to 3.0.1
  2020-05-06 16:59 [PR PATCH] couchdb: update to 3.0.1 arete
                   ` (3 preceding siblings ...)
  2021-01-29  0:45 ` ericonr
@ 2021-01-29  0:45 ` ericonr
  4 siblings, 0 replies; 6+ messages in thread
From: ericonr @ 2021-01-29  0:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 158 bytes --]

There's a closed pull request on the void-packages repository

couchdb: update to 3.0.1
https://github.com/void-linux/void-packages/pull/21696

Description:


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-29  0:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 16:59 [PR PATCH] couchdb: update to 3.0.1 arete
2020-05-18  8:31 ` [PR PATCH] [Updated] " arete
2020-05-18 19:18 ` arete
2020-05-19 18:14 ` arete
2021-01-29  0:45 ` ericonr
2021-01-29  0:45 ` [PR PATCH] [Closed]: " ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).