wok-current annotate couchdb/receipt @ rev 23827

inkscape: removed dependency gettext (thanks Saipul)
author Hans-G?nter Theisgen
date Sun May 31 06:02:18 2020 +0100 (2020-05-31)
parents 9e01bc6321ea
children a3c45ab9082e
rev   line source
claudinei@3810 1 # SliTaz package receipt.
claudinei@3810 2
claudinei@3810 3 PACKAGE="couchdb"
pascal@12428 4 VERSION="1.2.0"
claudinei@3810 5 SOURCE="apache-couchdb"
claudinei@3810 6 CATEGORY="development"
claudinei@3810 7 SHORT_DESC="Apache CouchDB is document-oriented database."
claudinei@3810 8 MAINTAINER="claudinei@slitaz.org"
pascal@15579 9 LICENSE="Apache"
claudinei@3810 10 TARBALL="$SOURCE-$VERSION.tar.gz"
slaxemulator@6611 11 WEB_SITE="http://couchdb.apache.org"
claudinei@3810 12 APACHE_MIRROR="http://mirrors.dedipower.com/ftp.apache.org/"
pascal@12452 13 WGET_URL="$APACHE_MIRROR/$PACKAGE/releases/$VERSION/$TARBALL"
claudinei@3810 14
pankso@12481 15 DEPENDS="erlang icu openssl util-linux-getopt spidermonkey libcurl curl"
pankso@10007 16 BUILD_DEPENDS="erlang openssl-dev spidermonkey-dev curl-dev icu-dev"
pankso@10006 17
claudinei@3810 18 # Rules to configure and make the package.
claudinei@3810 19 compile_rules()
claudinei@3810 20 {
claudinei@3810 21 ./configure \
claudinei@3810 22 --prefix=/usr \
claudinei@3810 23 --sysconfdir=/etc \
claudinei@9170 24 --with-js-include=/usr/include/js \
claudinei@3810 25 --localstatedir=/var \
claudinei@3810 26 --infodir=/usr/share/info \
claudinei@3810 27 --mandir=/usr/share/man \
claudinei@3810 28 $CONFIGURE_ARGS &&
pascal@15579 29 make && make DESTDIR=$DESTDIR install
claudinei@3810 30 }
claudinei@3810 31
claudinei@3810 32 # Rules to gen a SliTaz package suitable for Tazpkg.
claudinei@3810 33 genpkg_rules()
claudinei@3810 34 {
claudinei@3810 35 mkdir -p $fs/usr/share $fs/etc
pascal@15579 36 cp -a $install/usr/bin $fs/usr
pascal@15579 37 cp -a $install/usr/lib $fs/usr
pascal@15579 38 cp -a $install/usr/share/couchdb $fs/usr/share
pascal@15579 39 cp -a $install/var $fs
pascal@15579 40 cp -a $install/etc/couchdb $fs/etc
pascal@15579 41 cp -a $install/etc/default/couchdb $fs/etc/couchdb
pascal@15579 42 cp -a $install/etc/init.d $fs/etc
pascal@15579 43 cp -a $install/etc/logrotate.d $fs/etc
pascal@16682 44 sed -i -e 's|/etc/default/couchdb|/etc/couchdb/couchdb|' \
pascal@16682 45 -e 's,.*case,[ -d /var/run/couchdb ] || mkdir -p /var/run/couchdb\n&,' \
pascal@16682 46 $fs/etc/init.d/couchdb
claudinei@3810 47 }
claudinei@3810 48
claudinei@3810 49 # Pre install commands for tazpkg
claudinei@3810 50 # See if couchdb is already installed and, just in case, stop it
claudinei@3810 51 pre_install()
claudinei@3810 52 {
claudinei@3810 53 INIT_FILE="/etc/init.d/$PACKAGE"
pascal@18730 54 [ -f "$1$INIT_FILE" ] && chroot "$1/" $INIT_FILE stop
claudinei@3810 55 }
claudinei@3810 56
claudinei@3810 57 # Post install commands for tazpkg
claudinei@3810 58 # Create couchdb user and group
claudinei@3810 59 post_install()
claudinei@3810 60 {
claudinei@3810 61 LIBDIR="/var/lib/$PACKAGE"
claudinei@3810 62 ETCDIR="/etc/$PACKAGE"
claudinei@3810 63 LOGDIR="/var/log/$PACKAGE"
claudinei@3810 64 RUNDIR="/var/run/$PACKAGE"
claudinei@3810 65
pascal@18730 66 grep -q "$PACKAGE" "$1/etc/group" || chroot "$1/" addgroup -S $PACKAGE
claudinei@9178 67
pascal@18730 68 grep -q "$PACKAGE" "$1/etc/passwd" || chroot "$1/" adduser -S -D -H \
pascal@17552 69 -h $LIBDIR -G $PACKAGE -s /bin/sh -g "CouchDB Administrator" $PACKAGE
claudinei@3810 70
claudinei@3810 71 for DIR in $LIBDIR $ETCDIR $LOGDIR $RUNDIR; do
pascal@17552 72 chroot "$1/" chown -R $PACKAGE:$PACKAGE $DIR &&
pascal@17552 73 chroot "$1/" chmod -R 0770 $DIR
claudinei@3810 74 done
claudinei@3810 75 }
claudinei@9178 76
claudinei@9178 77 # Pre and post remove commands for Tazpkg.
claudinei@9178 78 pre_remove()
claudinei@9178 79 {
claudinei@9178 80 INIT_FILE="/etc/init.d/$PACKAGE"
pascal@18730 81 [ -f "$1$INIT_FILE" ] && chroot "$1/" $INIT_FILE stop
claudinei@9178 82 }
claudinei@9178 83
claudinei@9178 84 post_remove()
claudinei@9178 85 {
claudinei@9178 86 LIBDIR="/var/lib/$PACKAGE"
claudinei@9178 87 ETCDIR="/etc/$PACKAGE"
claudinei@9178 88 LOGDIR="/var/log/$PACKAGE"
claudinei@9178 89 RUNDIR="/var/run/$PACKAGE"
claudinei@9178 90
pascal@17552 91 chroot "$1/" deluser $PACKAGE
claudinei@9178 92
claudinei@9178 93 for DIR in $LIBDIR $ETCDIR $LOGDIR $RUNDIR; do
pascal@18730 94 rm -rf "$1$DIR"
claudinei@9178 95 done
claudinei@9178 96 }