wok view couchdb/receipt @ rev 8280

Up: xfwm4 to 4.8.1.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Jan 30 15:45:09 2011 +0000 (2011-01-30)
parents 39011a13b555
children b3ad80f72858
line source
1 # SliTaz package receipt.
3 PACKAGE="couchdb"
4 VERSION="1.0.1"
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 --localstatedir=/var \
24 --infodir=/usr/share/info \
25 --mandir=/usr/share/man \
26 $CONFIGURE_ARGS &&
27 make && make DESTDIR=$PWD/_pkg install
28 }
30 # Rules to gen a SliTaz package suitable for Tazpkg.
31 genpkg_rules()
32 {
33 mkdir -p $fs/usr/share $fs/etc
34 cp -a $_pkg/usr/bin $fs/usr
35 cp -a $_pkg/usr/lib $fs/usr
36 cp -a $_pkg/usr/share/couchdb $fs/usr/share
37 cp -a $_pkg/var $fs
38 cp -a $_pkg/etc/couchdb $fs/etc
39 cp -a $_pkg/etc/default/couchdb $fs/etc/couchdb
40 cp -a $_pkg/etc/init.d $fs/etc
41 cp -a $_pkg/etc/logrotate.d $fs/etc
42 sed -i "s|/etc/default/couchdb|/etc/couchdb/couchdb|" \
43 $fs/etc/init.d/couchdb
44 }
46 # Pre install commands for tazpkg
47 # See if couchdb is already installed and, just in case, stop it
48 pre_install()
49 {
50 INIT_FILE="/etc/init.d/$PACKAGE"
51 echo "Processing pre-install commands..."
52 [ -f $INIT_FILE ] && $INIT_FILE stop
53 echo "Done..."
54 }
56 # Post install commands for tazpkg
57 # Create couchdb user and group
58 post_install()
59 {
60 LIBDIR="/var/lib/$PACKAGE"
61 ETCDIR="/etc/$PACKAGE"
62 LOGDIR="/var/log/$PACKAGE"
63 RUNDIR="/var/run/$PACKAGE"
65 echo "Processing post-install commands..."
67 grep -q "$PACKAGE" /etc/passwd || adduser -S -D -h $LIBDIR \
68 -H -s /bin/sh -g "CouchDB Administrator" $PACKAGE
70 for DIR in $LIBDIR $ETCDIR $LOGDIR $RUNDIR; do
71 chown -R $PACKAGE:$PACKAGE $DIR && chmod -R 0770 $DIR
72 done
74 echo "Done..."
75 }