wok view couchdb/receipt @ rev 22959

updated iptables and iptables-dev again (1.4.21 -> 1.8.4)
author Hans-G?nter Theisgen
date Fri Feb 28 16:00:30 2020 +0100 (2020-02-28)
parents 9e01bc6321ea
children a3c45ab9082e
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="http://couchdb.apache.org"
12 APACHE_MIRROR="http://mirrors.dedipower.com/ftp.apache.org/"
13 WGET_URL="$APACHE_MIRROR/$PACKAGE/releases/$VERSION/$TARBALL"
15 DEPENDS="erlang icu openssl util-linux-getopt spidermonkey libcurl curl"
16 BUILD_DEPENDS="erlang openssl-dev spidermonkey-dev curl-dev icu-dev"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 ./configure \
22 --prefix=/usr \
23 --sysconfdir=/etc \
24 --with-js-include=/usr/include/js \
25 --localstatedir=/var \
26 --infodir=/usr/share/info \
27 --mandir=/usr/share/man \
28 $CONFIGURE_ARGS &&
29 make && make DESTDIR=$DESTDIR install
30 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 genpkg_rules()
34 {
35 mkdir -p $fs/usr/share $fs/etc
36 cp -a $install/usr/bin $fs/usr
37 cp -a $install/usr/lib $fs/usr
38 cp -a $install/usr/share/couchdb $fs/usr/share
39 cp -a $install/var $fs
40 cp -a $install/etc/couchdb $fs/etc
41 cp -a $install/etc/default/couchdb $fs/etc/couchdb
42 cp -a $install/etc/init.d $fs/etc
43 cp -a $install/etc/logrotate.d $fs/etc
44 sed -i -e 's|/etc/default/couchdb|/etc/couchdb/couchdb|' \
45 -e 's,.*case,[ -d /var/run/couchdb ] || mkdir -p /var/run/couchdb\n&,' \
46 $fs/etc/init.d/couchdb
47 }
49 # Pre install commands for tazpkg
50 # See if couchdb is already installed and, just in case, stop it
51 pre_install()
52 {
53 INIT_FILE="/etc/init.d/$PACKAGE"
54 [ -f "$1$INIT_FILE" ] && chroot "$1/" $INIT_FILE stop
55 }
57 # Post install commands for tazpkg
58 # Create couchdb user and group
59 post_install()
60 {
61 LIBDIR="/var/lib/$PACKAGE"
62 ETCDIR="/etc/$PACKAGE"
63 LOGDIR="/var/log/$PACKAGE"
64 RUNDIR="/var/run/$PACKAGE"
66 grep -q "$PACKAGE" "$1/etc/group" || chroot "$1/" addgroup -S $PACKAGE
68 grep -q "$PACKAGE" "$1/etc/passwd" || chroot "$1/" adduser -S -D -H \
69 -h $LIBDIR -G $PACKAGE -s /bin/sh -g "CouchDB Administrator" $PACKAGE
71 for DIR in $LIBDIR $ETCDIR $LOGDIR $RUNDIR; do
72 chroot "$1/" chown -R $PACKAGE:$PACKAGE $DIR &&
73 chroot "$1/" chmod -R 0770 $DIR
74 done
75 }
77 # Pre and post remove commands for Tazpkg.
78 pre_remove()
79 {
80 INIT_FILE="/etc/init.d/$PACKAGE"
81 [ -f "$1$INIT_FILE" ] && chroot "$1/" $INIT_FILE stop
82 }
84 post_remove()
85 {
86 LIBDIR="/var/lib/$PACKAGE"
87 ETCDIR="/etc/$PACKAGE"
88 LOGDIR="/var/log/$PACKAGE"
89 RUNDIR="/var/run/$PACKAGE"
91 chroot "$1/" deluser $PACKAGE
93 for DIR in $LIBDIR $ETCDIR $LOGDIR $RUNDIR; do
94 rm -rf "$1$DIR"
95 done
96 }