wok annotate couchdb/receipt @ rev 8917
iproute2: add flex in BUILD_DEPENDS
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 28 18:05:18 2011 +0100 (2011-02-28) |
parents | 39011a13b555 |
children | b3ad80f72858 |
rev | line source |
---|---|
claudinei@3810 | 1 # SliTaz package receipt. |
claudinei@3810 | 2 |
claudinei@3810 | 3 PACKAGE="couchdb" |
slaxemulator@6611 | 4 VERSION="1.0.1" |
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@4999 | 9 DEPENDS="erlang icu icu-dev openssl spidermonkey curl gcc-lib-base" |
claudinei@3810 | 10 BUILD_DEPENDS="$DEPENDS openssl-dev spidermonkey-dev curl-dev" |
claudinei@3810 | 11 TARBALL="$SOURCE-$VERSION.tar.gz" |
slaxemulator@6611 | 12 WEB_SITE="http://couchdb.apache.org" |
claudinei@3810 | 13 APACHE_MIRROR="http://mirrors.dedipower.com/ftp.apache.org/" |
claudinei@3810 | 14 WGET_URL="$APACHE_MIRROR/$PACKAGE/$VERSION/$TARBALL" |
claudinei@3810 | 15 |
claudinei@3810 | 16 # Rules to configure and make the package. |
claudinei@3810 | 17 compile_rules() |
claudinei@3810 | 18 { |
claudinei@3810 | 19 cd $src |
claudinei@3810 | 20 ./configure \ |
claudinei@3810 | 21 --prefix=/usr \ |
claudinei@3810 | 22 --sysconfdir=/etc \ |
claudinei@3810 | 23 --localstatedir=/var \ |
claudinei@3810 | 24 --infodir=/usr/share/info \ |
claudinei@3810 | 25 --mandir=/usr/share/man \ |
claudinei@3810 | 26 $CONFIGURE_ARGS && |
claudinei@3810 | 27 make && make DESTDIR=$PWD/_pkg install |
claudinei@3810 | 28 } |
claudinei@3810 | 29 |
claudinei@3810 | 30 # Rules to gen a SliTaz package suitable for Tazpkg. |
claudinei@3810 | 31 genpkg_rules() |
claudinei@3810 | 32 { |
claudinei@3810 | 33 mkdir -p $fs/usr/share $fs/etc |
claudinei@3810 | 34 cp -a $_pkg/usr/bin $fs/usr |
claudinei@3810 | 35 cp -a $_pkg/usr/lib $fs/usr |
claudinei@3810 | 36 cp -a $_pkg/usr/share/couchdb $fs/usr/share |
claudinei@3810 | 37 cp -a $_pkg/var $fs |
claudinei@3810 | 38 cp -a $_pkg/etc/couchdb $fs/etc |
claudinei@3810 | 39 cp -a $_pkg/etc/default/couchdb $fs/etc/couchdb |
claudinei@3810 | 40 cp -a $_pkg/etc/init.d $fs/etc |
claudinei@3810 | 41 cp -a $_pkg/etc/logrotate.d $fs/etc |
claudinei@3810 | 42 sed -i "s|/etc/default/couchdb|/etc/couchdb/couchdb|" \ |
claudinei@3810 | 43 $fs/etc/init.d/couchdb |
claudinei@3810 | 44 } |
claudinei@3810 | 45 |
claudinei@3810 | 46 # Pre install commands for tazpkg |
claudinei@3810 | 47 # See if couchdb is already installed and, just in case, stop it |
claudinei@3810 | 48 pre_install() |
claudinei@3810 | 49 { |
claudinei@3810 | 50 INIT_FILE="/etc/init.d/$PACKAGE" |
claudinei@3810 | 51 echo "Processing pre-install commands..." |
claudinei@3810 | 52 [ -f $INIT_FILE ] && $INIT_FILE stop |
claudinei@3810 | 53 echo "Done..." |
claudinei@3810 | 54 } |
claudinei@3810 | 55 |
claudinei@3810 | 56 # Post install commands for tazpkg |
claudinei@3810 | 57 # Create couchdb user and group |
claudinei@3810 | 58 post_install() |
claudinei@3810 | 59 { |
claudinei@3810 | 60 LIBDIR="/var/lib/$PACKAGE" |
claudinei@3810 | 61 ETCDIR="/etc/$PACKAGE" |
claudinei@3810 | 62 LOGDIR="/var/log/$PACKAGE" |
claudinei@3810 | 63 RUNDIR="/var/run/$PACKAGE" |
claudinei@3810 | 64 |
claudinei@3810 | 65 echo "Processing post-install commands..." |
claudinei@3810 | 66 |
claudinei@3810 | 67 grep -q "$PACKAGE" /etc/passwd || adduser -S -D -h $LIBDIR \ |
claudinei@3810 | 68 -H -s /bin/sh -g "CouchDB Administrator" $PACKAGE |
claudinei@3810 | 69 |
claudinei@3810 | 70 for DIR in $LIBDIR $ETCDIR $LOGDIR $RUNDIR; do |
claudinei@3810 | 71 chown -R $PACKAGE:$PACKAGE $DIR && chmod -R 0770 $DIR |
claudinei@3810 | 72 done |
claudinei@3810 | 73 |
claudinei@3810 | 74 echo "Done..." |
claudinei@3810 | 75 } |