wok annotate couchdb/receipt @ rev 17971
Add arpack-ng
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Apr 17 23:23:01 2015 +0200 (2015-04-17) |
parents | b9c6c8240bba |
children | 9e01bc6321ea |
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 cd $src |
claudinei@3810 | 22 ./configure \ |
claudinei@3810 | 23 --prefix=/usr \ |
claudinei@3810 | 24 --sysconfdir=/etc \ |
claudinei@9170 | 25 --with-js-include=/usr/include/js \ |
claudinei@3810 | 26 --localstatedir=/var \ |
claudinei@3810 | 27 --infodir=/usr/share/info \ |
claudinei@3810 | 28 --mandir=/usr/share/man \ |
claudinei@3810 | 29 $CONFIGURE_ARGS && |
pascal@15579 | 30 make && make DESTDIR=$DESTDIR install |
claudinei@3810 | 31 } |
claudinei@3810 | 32 |
claudinei@3810 | 33 # Rules to gen a SliTaz package suitable for Tazpkg. |
claudinei@3810 | 34 genpkg_rules() |
claudinei@3810 | 35 { |
claudinei@3810 | 36 mkdir -p $fs/usr/share $fs/etc |
pascal@15579 | 37 cp -a $install/usr/bin $fs/usr |
pascal@15579 | 38 cp -a $install/usr/lib $fs/usr |
pascal@15579 | 39 cp -a $install/usr/share/couchdb $fs/usr/share |
pascal@15579 | 40 cp -a $install/var $fs |
pascal@15579 | 41 cp -a $install/etc/couchdb $fs/etc |
pascal@15579 | 42 cp -a $install/etc/default/couchdb $fs/etc/couchdb |
pascal@15579 | 43 cp -a $install/etc/init.d $fs/etc |
pascal@15579 | 44 cp -a $install/etc/logrotate.d $fs/etc |
pascal@16682 | 45 sed -i -e 's|/etc/default/couchdb|/etc/couchdb/couchdb|' \ |
pascal@16682 | 46 -e 's,.*case,[ -d /var/run/couchdb ] || mkdir -p /var/run/couchdb\n&,' \ |
pascal@16682 | 47 $fs/etc/init.d/couchdb |
claudinei@3810 | 48 } |
claudinei@3810 | 49 |
claudinei@3810 | 50 # Pre install commands for tazpkg |
claudinei@3810 | 51 # See if couchdb is already installed and, just in case, stop it |
claudinei@3810 | 52 pre_install() |
claudinei@3810 | 53 { |
claudinei@3810 | 54 INIT_FILE="/etc/init.d/$PACKAGE" |
claudinei@3810 | 55 echo "Processing pre-install commands..." |
pascal@17552 | 56 [ -f $1$$INIT_FILE ] && chroot "$1/" $INIT_FILE stop |
claudinei@3810 | 57 echo "Done..." |
claudinei@3810 | 58 } |
claudinei@3810 | 59 |
claudinei@3810 | 60 # Post install commands for tazpkg |
claudinei@3810 | 61 # Create couchdb user and group |
claudinei@3810 | 62 post_install() |
claudinei@3810 | 63 { |
claudinei@3810 | 64 LIBDIR="/var/lib/$PACKAGE" |
claudinei@3810 | 65 ETCDIR="/etc/$PACKAGE" |
claudinei@3810 | 66 LOGDIR="/var/log/$PACKAGE" |
claudinei@3810 | 67 RUNDIR="/var/run/$PACKAGE" |
claudinei@3810 | 68 |
claudinei@3810 | 69 echo "Processing post-install commands..." |
claudinei@3810 | 70 |
pascal@17552 | 71 grep -q "$PACKAGE" $1/etc/group || chroot "$1/" addgroup -S $PACKAGE |
claudinei@9178 | 72 |
pascal@17552 | 73 grep -q "$PACKAGE" $1/etc/passwd || chroot "$1/" adduser -S -D -H \ |
pascal@17552 | 74 -h $LIBDIR -G $PACKAGE -s /bin/sh -g "CouchDB Administrator" $PACKAGE |
claudinei@3810 | 75 |
claudinei@3810 | 76 for DIR in $LIBDIR $ETCDIR $LOGDIR $RUNDIR; do |
pascal@17552 | 77 chroot "$1/" chown -R $PACKAGE:$PACKAGE $DIR && |
pascal@17552 | 78 chroot "$1/" chmod -R 0770 $DIR |
claudinei@3810 | 79 done |
claudinei@3810 | 80 |
claudinei@3810 | 81 echo "Done..." |
claudinei@3810 | 82 } |
claudinei@9178 | 83 |
claudinei@9178 | 84 # Pre and post remove commands for Tazpkg. |
claudinei@9178 | 85 pre_remove() |
claudinei@9178 | 86 { |
claudinei@9178 | 87 INIT_FILE="/etc/init.d/$PACKAGE" |
claudinei@9178 | 88 echo "Processing pre-remove commands..." |
pascal@17552 | 89 [ -f $1$INIT_FILE ] && chroot "$1/" $INIT_FILE stop |
claudinei@9178 | 90 echo "Done..." |
claudinei@9178 | 91 } |
claudinei@9178 | 92 |
claudinei@9178 | 93 post_remove() |
claudinei@9178 | 94 { |
claudinei@9178 | 95 LIBDIR="/var/lib/$PACKAGE" |
claudinei@9178 | 96 ETCDIR="/etc/$PACKAGE" |
claudinei@9178 | 97 LOGDIR="/var/log/$PACKAGE" |
claudinei@9178 | 98 RUNDIR="/var/run/$PACKAGE" |
claudinei@9178 | 99 |
claudinei@9178 | 100 echo "Processing post-remove commands..." |
claudinei@9178 | 101 |
pascal@17552 | 102 chroot "$1/" deluser $PACKAGE |
claudinei@9178 | 103 |
claudinei@9178 | 104 for DIR in $LIBDIR $ETCDIR $LOGDIR $RUNDIR; do |
pascal@17552 | 105 rm -rf $1$DIR |
claudinei@9178 | 106 done |
claudinei@9178 | 107 |
claudinei@9178 | 108 echo "Done..." |
claudinei@9178 | 109 } |