Skip to content

Instantly share code, notes, and snippets.

@jweiss
Forked from roidrage/couchdb.deb.txt
Created October 17, 2009 12:20
Show Gist options
  • Select an option

  • Save jweiss/212335 to your computer and use it in GitHub Desktop.

Select an option

Save jweiss/212335 to your computer and use it in GitHub Desktop.
CouchDB packager
#!/bin/sh
# packages CouchDB 0.10.0 on Ubuntu 9.04
export COUCHDB_ROOT=/vol/cr/couchdb
apt-get update
apt-get upgrade -y
apt-get install -y libmozjs-dev spidermonkey-bin libc6 libcurl3 libicu38 libicu-dev libmozjs0d erlang-nox build-essential curl libcurl4-openssl-dev erlang-dev checkinstall wget
cd /tmp
wget ftp://ftp.halifax.rwth-aachen.de/apache/couchdb/0.10.0/apache-couchdb-0.10.0.tar.gz
tar -xvzf apache-couchdb-0.10.0.tar.gz
cd apache-couchdb-0.10.0
wget http://gist.github.com/raw/212335/9d2e042e7d88b6f65263033905aea0d12989067d/postinstall-pak
wget http://gist.github.com/raw/212335/eb47e3ff8810af2beb349bd6309c2815df6274c1/postremove-pak
wget http://gist.github.com/raw/212335/4b89a2e8bf7b795cbdf57be5ed8daf243e17e531/preremove-pak
./configure --prefix=$COUCHDB_ROOT
make
checkinstall -y -D --pkgname=apache-couchdb --pkgversion=0.10.0 --maintainer=mathias.meyer@peritor.com --pakdir=/tmp --pkglicense=Apache --requires='libc6, libcurl3, libicu38, libicu-dev, libmozjs0d, erlang-nox'
#!/bin/sh
export COUCHDB_ROOT=/vol/cr/couchdb
adduser --system --disabled-login --shell /bin/sh --no-create-home --group --quiet couchdb
chown -R couchdb:couchdb $COUCHDB_ROOT
ln -s -f $COUCHDB_ROOT/etc/init.d/couchdb /etc/init.d/couchdb
update-rc.d couchdb defaults
ln -f -s $COUCHDB_ROOT/etc/logrotate.d/couchdb /etc/logrotate.d/couchdb
ln -s -f $COUCHDB_ROOT/etc/couchdb /etc/couchdb
#!/bin/sh
userdel couchdb
rm -f /etc/logrotate.d/couchdb
rm -f /etc/init.d/couchdb
#!/bin/sh
service couchdb stop
update-rc.d -f couchdb remove
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment