wok-next diff couchdb/receipt @ rev 20678
Up clisp (2.50)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue May 15 02:59:03 2018 +0300 (2018-05-15) |
parents | d6ca18366f41 |
children | d5aab818505e |
line diff
1.1 --- a/couchdb/receipt Mon Dec 21 02:53:09 2015 +0200 1.2 +++ b/couchdb/receipt Tue May 15 02:59:03 2018 +0300 1.3 @@ -1,96 +1,70 @@ 1.4 -# SliTaz package receipt. 1.5 +# SliTaz package receipt v2. 1.6 1.7 PACKAGE="couchdb" 1.8 VERSION="1.2.0" 1.9 SOURCE="apache-couchdb" 1.10 CATEGORY="development" 1.11 -SHORT_DESC="Apache CouchDB is document-oriented database." 1.12 +SHORT_DESC="Apache CouchDB is document-oriented database" 1.13 MAINTAINER="claudinei@slitaz.org" 1.14 LICENSE="Apache" 1.15 +WEB_SITE="http://couchdb.apache.org" 1.16 + 1.17 TARBALL="$SOURCE-$VERSION.tar.gz" 1.18 -WEB_SITE="http://couchdb.apache.org" 1.19 APACHE_MIRROR="http://mirrors.dedipower.com/ftp.apache.org/" 1.20 WGET_URL="$APACHE_MIRROR/$PACKAGE/releases/$VERSION/$TARBALL" 1.21 1.22 -DEPENDS="erlang icu openssl util-linux-getopt spidermonkey libcurl curl" 1.23 BUILD_DEPENDS="erlang openssl-dev spidermonkey-dev curl-dev icu-dev" 1.24 1.25 -# Rules to configure and make the package. 1.26 -compile_rules() 1.27 -{ 1.28 +compile_rules() { 1.29 ./configure \ 1.30 - --prefix=/usr \ 1.31 - --sysconfdir=/etc \ 1.32 --with-js-include=/usr/include/js \ 1.33 - --localstatedir=/var \ 1.34 - --infodir=/usr/share/info \ 1.35 - --mandir=/usr/share/man \ 1.36 $CONFIGURE_ARGS && 1.37 - make && make DESTDIR=$DESTDIR install 1.38 + make && 1.39 + make DESTDIR=$DESTDIR install 1.40 } 1.41 1.42 -# Rules to gen a SliTaz package suitable for Tazpkg. 1.43 -genpkg_rules() 1.44 -{ 1.45 - mkdir -p $fs/usr/share $fs/etc 1.46 - cp -a $install/usr/bin $fs/usr 1.47 - cp -a $install/usr/lib $fs/usr 1.48 - cp -a $install/usr/share/couchdb $fs/usr/share 1.49 - cp -a $install/var $fs 1.50 - cp -a $install/etc/couchdb $fs/etc 1.51 - cp -a $install/etc/default/couchdb $fs/etc/couchdb 1.52 - cp -a $install/etc/init.d $fs/etc 1.53 - cp -a $install/etc/logrotate.d $fs/etc 1.54 +genpkg_rules() { 1.55 + copy @std 1.56 sed -i -e 's|/etc/default/couchdb|/etc/couchdb/couchdb|' \ 1.57 -e 's,.*case,[ -d /var/run/couchdb ] || mkdir -p /var/run/couchdb\n&,' \ 1.58 $fs/etc/init.d/couchdb 1.59 + DEPENDS="erlang icu openssl util-linux-getopt spidermonkey libcurl curl" 1.60 } 1.61 1.62 -# Pre install commands for tazpkg 1.63 # See if couchdb is already installed and, just in case, stop it 1.64 -pre_install() 1.65 -{ 1.66 - INIT_FILE="/etc/init.d/$PACKAGE" 1.67 +pre_install() { 1.68 + INIT_FILE="/etc/init.d/couchdb" 1.69 [ -f "$1$INIT_FILE" ] && chroot "$1/" $INIT_FILE stop 1.70 } 1.71 1.72 -# Post install commands for tazpkg 1.73 # Create couchdb user and group 1.74 -post_install() 1.75 -{ 1.76 - LIBDIR="/var/lib/$PACKAGE" 1.77 - ETCDIR="/etc/$PACKAGE" 1.78 - LOGDIR="/var/log/$PACKAGE" 1.79 - RUNDIR="/var/run/$PACKAGE" 1.80 +post_install() { 1.81 + LIBDIR="/var/lib/couchdb" 1.82 + ETCDIR="/etc/couchdb" 1.83 + LOGDIR="/var/log/couchdb" 1.84 + RUNDIR="/var/run/couchdb" 1.85 1.86 - grep -q "$PACKAGE" "$1/etc/group" || chroot "$1/" addgroup -S $PACKAGE 1.87 + grep -q "couchdb" "$1/etc/group" || chroot "$1/" addgroup -S couchdb 1.88 1.89 - grep -q "$PACKAGE" "$1/etc/passwd" || chroot "$1/" adduser -S -D -H \ 1.90 - -h $LIBDIR -G $PACKAGE -s /bin/sh -g "CouchDB Administrator" $PACKAGE 1.91 + grep -q "couchdb" "$1/etc/passwd" || chroot "$1/" adduser -S -D -H \ 1.92 + -h $LIBDIR -G couchdb -s /bin/sh -g "CouchDB Administrator" couchdb 1.93 1.94 for DIR in $LIBDIR $ETCDIR $LOGDIR $RUNDIR; do 1.95 - chroot "$1/" chown -R $PACKAGE:$PACKAGE $DIR && 1.96 + chroot "$1/" chown -R couchdb:couchdb $DIR 1.97 chroot "$1/" chmod -R 0770 $DIR 1.98 done 1.99 } 1.100 1.101 -# Pre and post remove commands for Tazpkg. 1.102 -pre_remove() 1.103 -{ 1.104 - INIT_FILE="/etc/init.d/$PACKAGE" 1.105 +pre_remove() { 1.106 + INIT_FILE="/etc/init.d/couchdb" 1.107 [ -f "$1$INIT_FILE" ] && chroot "$1/" $INIT_FILE stop 1.108 } 1.109 1.110 -post_remove() 1.111 -{ 1.112 - LIBDIR="/var/lib/$PACKAGE" 1.113 - ETCDIR="/etc/$PACKAGE" 1.114 - LOGDIR="/var/log/$PACKAGE" 1.115 - RUNDIR="/var/run/$PACKAGE" 1.116 - 1.117 - chroot "$1/" deluser $PACKAGE 1.118 - 1.119 - for DIR in $LIBDIR $ETCDIR $LOGDIR $RUNDIR; do 1.120 - rm -rf "$1$DIR" 1.121 - done 1.122 +post_remove() { 1.123 + chroot "$1/" deluser couchdb 1.124 + rm -rf \ 1.125 + "$1/var/lib/couchdb" \ 1.126 + "$1/etc/couchdb" \ 1.127 + "$1/var/log/couchdb" \ 1.128 + "$1/var/run/couchdb" 1.129 }