wok view couchdb/receipt @ rev 9177

Up: spidermonkey (0.1.8-rc1)
author Claudinei Pereira <claudinei@slitaz.org>
date Wed Mar 09 00:02:19 2011 +0000 (2011-03-09)
parents d253de84383a
children 7df33dda3d08
line source
1 # SliTaz package receipt.
3 PACKAGE="couchdb"
4 VERSION="1.0.2"
5 SOURCE="apache-couchdb"
6 CATEGORY="development"
7 SHORT_DESC="Apache CouchDB is document-oriented database."
8 MAINTAINER="claudinei@slitaz.org"
9 DEPENDS="erlang icu icu-dev openssl spidermonkey curl gcc-lib-base"
10 BUILD_DEPENDS="$DEPENDS openssl-dev spidermonkey-dev curl-dev"
11 TARBALL="$SOURCE-$VERSION.tar.gz"
12 WEB_SITE="http://couchdb.apache.org"
13 APACHE_MIRROR="http://mirrors.dedipower.com/ftp.apache.org/"
14 WGET_URL="$APACHE_MIRROR/$PACKAGE/$VERSION/$TARBALL"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 ./configure \
21 --prefix=/usr \
22 --sysconfdir=/etc \
23 --with-js-include=/usr/include/js \
24 --localstatedir=/var \
25 --infodir=/usr/share/info \
26 --mandir=/usr/share/man \
27 $CONFIGURE_ARGS &&
28 make && make DESTDIR=$PWD/_pkg install
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p $fs/usr/share $fs/etc
35 cp -a $_pkg/usr/bin $fs/usr
36 cp -a $_pkg/usr/lib $fs/usr
37 cp -a $_pkg/usr/share/couchdb $fs/usr/share
38 cp -a $_pkg/var $fs
39 cp -a $_pkg/etc/couchdb $fs/etc
40 cp -a $_pkg/etc/default/couchdb $fs/etc/couchdb
41 cp -a $_pkg/etc/init.d $fs/etc
42 cp -a $_pkg/etc/logrotate.d $fs/etc
43 sed -i "s|/etc/default/couchdb|/etc/couchdb/couchdb|" \
44 $fs/etc/init.d/couchdb
45 }
47 # Pre install commands for tazpkg
48 # See if couchdb is already installed and, just in case, stop it
49 pre_install()
50 {
51 INIT_FILE="/etc/init.d/$PACKAGE"
52 echo "Processing pre-install commands..."
53 [ -f $INIT_FILE ] && $INIT_FILE stop
54 echo "Done..."
55 }
57 # Post install commands for tazpkg
58 # Create couchdb user and group
59 post_install()
60 {
61 LIBDIR="/var/lib/$PACKAGE"
62 ETCDIR="/etc/$PACKAGE"
63 LOGDIR="/var/log/$PACKAGE"
64 RUNDIR="/var/run/$PACKAGE"
66 echo "Processing post-install commands..."
68 grep -q "$PACKAGE" /etc/passwd || adduser -S -D -h $LIBDIR \
69 -H -s /bin/sh -g "CouchDB Administrator" $PACKAGE
71 for DIR in $LIBDIR $ETCDIR $LOGDIR $RUNDIR; do
72 chown -R $PACKAGE:$PACKAGE $DIR && chmod -R 0770 $DIR
73 done
75 echo "Done..."
76 }