wok view couchdb/receipt @ rev 24526

updated exempi and exempi-dev (2.5.1 -> 2.6.1)
author Hans-G?nter Theisgen
date Tue Feb 22 17:39:50 2022 +0100 (2022-02-22)
parents d6ca18366f41
children cb67b4f8be05
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 current_version()
19 {
20 wget -O - $WEB_SITE 2>/dev/null | \
21 sed '/DOWNLOAD/!d;s|.*version">||;s| .*||'
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 ./configure \
28 --prefix=/usr \
29 --sysconfdir=/etc \
30 --with-js-include=/usr/include/js \
31 --localstatedir=/var \
32 --infodir=/usr/share/info \
33 --mandir=/usr/share/man \
34 $CONFIGURE_ARGS &&
35 make && make DESTDIR=$DESTDIR install
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/usr/share $fs/etc
42 cp -a $install/usr/bin $fs/usr
43 cp -a $install/usr/lib $fs/usr
44 cp -a $install/usr/share/couchdb $fs/usr/share
45 cp -a $install/var $fs
46 cp -a $install/etc/couchdb $fs/etc
47 cp -a $install/etc/default/couchdb $fs/etc/couchdb
48 cp -a $install/etc/init.d $fs/etc
49 cp -a $install/etc/logrotate.d $fs/etc
50 sed -i -e 's|/etc/default/couchdb|/etc/couchdb/couchdb|' \
51 -e 's,.*case,[ -d /var/run/couchdb ] || mkdir -p /var/run/couchdb\n&,' \
52 $fs/etc/init.d/couchdb
53 }
55 # Pre install commands for tazpkg
56 # See if couchdb is already installed and, just in case, stop it
57 pre_install()
58 {
59 INIT_FILE="/etc/init.d/$PACKAGE"
60 [ -f "$1$INIT_FILE" ] && chroot "$1/" $INIT_FILE stop
61 }
63 # Post install commands for tazpkg
64 # Create couchdb user and group
65 post_install()
66 {
67 LIBDIR="/var/lib/$PACKAGE"
68 ETCDIR="/etc/$PACKAGE"
69 LOGDIR="/var/log/$PACKAGE"
70 RUNDIR="/var/run/$PACKAGE"
72 grep -q "$PACKAGE" "$1/etc/group" || chroot "$1/" addgroup -S $PACKAGE
74 grep -q "$PACKAGE" "$1/etc/passwd" || chroot "$1/" adduser -S -D -H \
75 -h $LIBDIR -G $PACKAGE -s /bin/sh -g "CouchDB Administrator" $PACKAGE
77 for DIR in $LIBDIR $ETCDIR $LOGDIR $RUNDIR; do
78 chroot "$1/" chown -R $PACKAGE:$PACKAGE $DIR &&
79 chroot "$1/" chmod -R 0770 $DIR
80 done
81 }
83 # Pre and post remove commands for Tazpkg.
84 pre_remove()
85 {
86 INIT_FILE="/etc/init.d/$PACKAGE"
87 [ -f "$1$INIT_FILE" ] && chroot "$1/" $INIT_FILE stop
88 }
90 post_remove()
91 {
92 LIBDIR="/var/lib/$PACKAGE"
93 ETCDIR="/etc/$PACKAGE"
94 LOGDIR="/var/log/$PACKAGE"
95 RUNDIR="/var/run/$PACKAGE"
97 chroot "$1/" deluser $PACKAGE
99 for DIR in $LIBDIR $ETCDIR $LOGDIR $RUNDIR; do
100 rm -rf "$1$DIR"
101 done
102 }