wok view couchdb/receipt @ rev 25285

updated rpcbind (1.2.5 -> 1.2.6)
author Hans-G?nter Theisgen
date Mon Jul 18 16:27:00 2022 +0100 (2022-07-18)
parents cb67b4f8be05
children
line source
1 # SliTaz package receipt.
3 PACKAGE="couchdb"
4 VERSION="1.2.0"
5 SOURCE="apache-couchdb"
6 CATEGORY="development"
7 SHORT_DESC="Apache CouchDB is document-oriented database."
8 MAINTAINER="claudinei@slitaz.org"
9 LICENSE="Apache"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WEB_SITE="https://couchdb.apache.org"
12 WGET_URL="https://archive.apache.org/dist/couchdb/source/$VERSION/$TARBALL"
14 DEPENDS="erlang icu openssl util-linux-getopt spidermonkey libcurl curl"
15 BUILD_DEPENDS="erlang openssl-dev spidermonkey-dev curl-dev icu-dev"
17 current_version()
18 {
19 wget -O - $WEB_SITE 2>/dev/null | \
20 sed '/DOWNLOAD/!d;s|.*version">||;s| .*||'
21 }
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 ./configure \
27 --prefix=/usr \
28 --sysconfdir=/etc \
29 --with-js-include=/usr/include/js \
30 --localstatedir=/var \
31 --infodir=/usr/share/info \
32 --mandir=/usr/share/man \
33 $CONFIGURE_ARGS &&
34 make && make DESTDIR=$DESTDIR install
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p $fs/usr/share $fs/etc
41 cp -a $install/usr/bin $fs/usr
42 cp -a $install/usr/lib $fs/usr
43 cp -a $install/usr/share/couchdb $fs/usr/share
44 cp -a $install/var $fs
45 cp -a $install/etc/couchdb $fs/etc
46 cp -a $install/etc/default/couchdb $fs/etc/couchdb
47 cp -a $install/etc/init.d $fs/etc
48 cp -a $install/etc/logrotate.d $fs/etc
49 sed -i -e 's|/etc/default/couchdb|/etc/couchdb/couchdb|' \
50 -e 's,.*case,[ -d /var/run/couchdb ] || mkdir -p /var/run/couchdb\n&,' \
51 $fs/etc/init.d/couchdb
52 }
54 # Pre install commands for tazpkg
55 # See if couchdb is already installed and, just in case, stop it
56 pre_install()
57 {
58 INIT_FILE="/etc/init.d/$PACKAGE"
59 [ -f "$1$INIT_FILE" ] && chroot "$1/" $INIT_FILE stop
60 }
62 # Post install commands for tazpkg
63 # Create couchdb user and group
64 post_install()
65 {
66 LIBDIR="/var/lib/$PACKAGE"
67 ETCDIR="/etc/$PACKAGE"
68 LOGDIR="/var/log/$PACKAGE"
69 RUNDIR="/var/run/$PACKAGE"
71 grep -q "$PACKAGE" "$1/etc/group" || chroot "$1/" addgroup -S $PACKAGE
73 grep -q "$PACKAGE" "$1/etc/passwd" || chroot "$1/" adduser -S -D -H \
74 -h $LIBDIR -G $PACKAGE -s /bin/sh -g "CouchDB Administrator" $PACKAGE
76 for DIR in $LIBDIR $ETCDIR $LOGDIR $RUNDIR; do
77 chroot "$1/" chown -R $PACKAGE:$PACKAGE $DIR &&
78 chroot "$1/" chmod -R 0770 $DIR
79 done
80 }
82 # Pre and post remove commands for Tazpkg.
83 pre_remove()
84 {
85 INIT_FILE="/etc/init.d/$PACKAGE"
86 [ -f "$1$INIT_FILE" ] && chroot "$1/" $INIT_FILE stop
87 }
89 post_remove()
90 {
91 LIBDIR="/var/lib/$PACKAGE"
92 ETCDIR="/etc/$PACKAGE"
93 LOGDIR="/var/log/$PACKAGE"
94 RUNDIR="/var/run/$PACKAGE"
96 chroot "$1/" deluser $PACKAGE
98 for DIR in $LIBDIR $ETCDIR $LOGDIR $RUNDIR; do
99 rm -rf "$1$DIR"
100 done
101 }