mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
development/couchdb: Added to 13.0 repository
This commit is contained in:
parent
199a752bf4
commit
70134d2309
6 changed files with 205 additions and 0 deletions
15
development/couchdb/README
Normal file
15
development/couchdb/README
Normal file
|
@ -0,0 +1,15 @@
|
|||
Apache CouchDB is a RESTFul document-oriented database.
|
||||
|
||||
Apache CouchDB is a document-oriented database that can be queried
|
||||
and indexed in a MapReduce fashion using JavaScript. CouchDB also
|
||||
offers incremental replication with bi-directional conflict detection
|
||||
and resolution. CouchDB provides a RESTful JSON API.
|
||||
|
||||
This requires js (spidermonkey), icu4c, and erlang-otp.
|
||||
|
||||
You must have a "couchdb" user and group before running this script;
|
||||
something like this should suffice:
|
||||
# groupadd -g 231 couchdb
|
||||
# useradd -u 231 -g couchdb -d /var/lib/couchdb -s /bin/sh couchdb
|
||||
|
||||
See README.SLACKWARE for further configuration information.
|
14
development/couchdb/README.SLACKWARE
Normal file
14
development/couchdb/README.SLACKWARE
Normal file
|
@ -0,0 +1,14 @@
|
|||
To start CouchDB automatically at system startup, add the following to
|
||||
your system's /etc/rc.d/rc.local init script:
|
||||
|
||||
if [ -x /etc/rc.d/rc.couchdb ]; then
|
||||
/etc/rc.d/rc.couchdb start
|
||||
fi
|
||||
|
||||
To stop CouchDB automatically at system shutdown, add the following to
|
||||
your system's /etc/rc.d/rc.local_shutdown script:
|
||||
|
||||
if [ -x /etc/rc.d/rc.couchdb ]; then
|
||||
/etc/rc.d/rc.couchdb stop
|
||||
fi
|
||||
|
118
development/couchdb/couchdb.SlackBuild
Normal file
118
development/couchdb/couchdb.SlackBuild
Normal file
|
@ -0,0 +1,118 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
# SlackBuild for Apache CouchDB
|
||||
|
||||
# Written by Nicolas Steinmetz (nsteinmetz@gmail.com) - 2010/01/03
|
||||
# Heavily modified by Robby Workman <rworkman@slackbuilds.org>
|
||||
|
||||
PRGNAM=couchdb
|
||||
VERSION=0.10.1
|
||||
ARCH=${ARCH:-i486}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
PKGSRC=apache-couchdb
|
||||
|
||||
CWD=$(pwd)
|
||||
TMP=${TMP:-/tmp/SBo}
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
## couchdb user & group *MUST* exist before package creation
|
||||
# See http://slackbuilds.org/uid_gid.txt for current recomendations.
|
||||
bailout() {
|
||||
printf " The couchdb user and group do not exist.
|
||||
You should create it/them with the following:
|
||||
groupadd -g 231 couchdb
|
||||
useradd -u 231 -g couchdb -d /var/lib/couchdb -s /bin/sh couchdb\n"
|
||||
}
|
||||
|
||||
if ! grep -q ^couchdb: /etc/group 2>/dev/null ; then
|
||||
bailout
|
||||
exit 1
|
||||
elif ! grep -q ^couchdb: /etc/passwd 2>/dev/null ; then
|
||||
bailout
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
rm -rf $TMP/$PKGSRC-$VERSION
|
||||
cd $TMP
|
||||
tar xvf $CWD/$PKGSRC-$VERSION.tar.gz
|
||||
cd $PKGSRC-$VERSION
|
||||
chown -R root:root .
|
||||
chmod -R u+w,go+r-w,a-s .
|
||||
find . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/man \
|
||||
--localstatedir=/var \
|
||||
--libdir=/usr/lib$LIBDIRSUFFIX \
|
||||
--with-erlang=/usr/lib$LIBDIRSUFFIX/erlang/usr/include \
|
||||
--build=$ARCH-slackware-linux
|
||||
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
# Fixup some ownership and permissions stuffs
|
||||
chown -R couchdb:couchdb $PKG/etc/couchdb $PKG/var/{lib,log,run}/couchdb
|
||||
chmod 0770 $PKG/etc/couchdb $PKG/var/{lib,log,run}/couchdb
|
||||
|
||||
# Use the correct name for the init script and don't clobber it on upgrades
|
||||
mv $PKG/etc/rc.d/couchdb $PKG/etc/rc.d/rc.couchdb.new
|
||||
chmod 0755 $PKG/etc/rc.d/rc.couchdb.new
|
||||
|
||||
# Don't clobber a few other config files
|
||||
mv $PKG/etc/couchdb/default.ini $PKG/etc/couchdb/default.ini.new
|
||||
mv $PKG/etc/couchdb/local.ini $PKG/etc/couchdb/local.ini.new
|
||||
|
||||
# Don't clobber the logrotate script either
|
||||
mv $PKG/etc/logrotate.d/couchdb $PKG/etc/logrotate.d/couchdb.new
|
||||
|
||||
( cd $PKG
|
||||
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
|
||||
xargs strip --strip-unneeded 2> /dev/null || true
|
||||
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
|
||||
xargs strip --strip-unneeded 2> /dev/null || true
|
||||
)
|
||||
|
||||
( cd $PKG/usr/man || exit 1
|
||||
find . -type f -exec gzip -9 {} \;
|
||||
for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
|
||||
)
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a \
|
||||
AUTHORS BUGS CHANGES LICENSE NEWS NOTICE README THANKS \
|
||||
$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
10
development/couchdb/couchdb.info
Normal file
10
development/couchdb/couchdb.info
Normal file
|
@ -0,0 +1,10 @@
|
|||
PRGNAM="couchdb"
|
||||
VERSION="0.10.1"
|
||||
HOMEPAGE="http://couchdb.apache.org/"
|
||||
DOWNLOAD="http://www.ecoficial.com/apachemirror/couchdb/0.10.1/apache-couchdb-0.10.1.tar.gz"
|
||||
MD5SUM="a34dae8bf402299e378d7e8c13b7ba46"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
MAINTAINER="Nicolas Steinmetz"
|
||||
EMAIL="nsteinmetz@gmail.com"
|
||||
APPROVED="rworkman"
|
29
development/couchdb/doinst.sh
Normal file
29
development/couchdb/doinst.sh
Normal file
|
@ -0,0 +1,29 @@
|
|||
config() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
# If there's no config file by that name, mv it over:
|
||||
if [ ! -r $OLD ]; then
|
||||
mv $NEW $OLD
|
||||
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
|
||||
# toss the redundant copy
|
||||
rm $NEW
|
||||
fi
|
||||
# Otherwise, we leave the .new copy for the admin to consider...
|
||||
}
|
||||
|
||||
preserve_perms() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
if [ -e $OLD ]; then
|
||||
cp -a $OLD ${NEW}.incoming
|
||||
cat $NEW > ${NEW}.incoming
|
||||
mv ${NEW}.incoming $NEW
|
||||
fi
|
||||
config $NEW
|
||||
}
|
||||
|
||||
preserve_perms etc/rc.d/rc.couchdb.new
|
||||
config etc/couchdb/default.ini.new
|
||||
config etc/couchdb/local.ini.new
|
||||
config etc/logrotate.d/couchdb.new
|
||||
|
19
development/couchdb/slack-desc
Normal file
19
development/couchdb/slack-desc
Normal file
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|' on
|
||||
# the right side marks the last column you can put a character in. You must make
|
||||
# exactly 11 lines for the formatting to be correct. It's also customary to
|
||||
# leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
couchdb: Apache CouchDB is a RESTFul document-oriented database.
|
||||
couchdb:
|
||||
couchdb: Apache CouchDB is a document-oriented database that can be queried
|
||||
couchdb: and indexed in a MapReduce fashion using JavaScript. CouchDB also
|
||||
couchdb: offers incremental replication with bi-directional conflict
|
||||
couchdb: detection and resolution. CouchDB provides a RESTful JSON API.
|
||||
couchdb:
|
||||
couchdb:
|
||||
couchdb: Homepage : http://couchdb.apache.org/
|
||||
couchdb:
|
||||
couchdb:
|
Loading…
Reference in a new issue