summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile38
-rw-r--r--THANKS.in96
-rwxr-xr-xbuild-aux/couchdb-build-release.sh48
-rwxr-xr-xconfigure7
-rwxr-xr-xtest/build/test-configure-distclean.sh15
-rwxr-xr-xtest/build/test-make-clean.sh20
7 files changed, 221 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 0cdbaa7f5..851903276 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,3 +29,4 @@ src/couch/priv/couchjs
src/couch/priv/couchspawnkillable
bin/
+release/
diff --git a/Makefile b/Makefile
index 2f49a6e7e..4dab51a43 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,8 @@
# License for the specific language governing permissions and limitations under
# the License.
+IN_RELEASE = $(shell if [ ! -d .git ]; then echo true; fi)
+
all: couch fauxton
config.erl:
@@ -24,23 +26,51 @@ couch: config.erl
clean:
@rebar -r clean
+ @rm -f bin/couchjs
+ @rm -rf src/*/ebin
+ @rm -rf src/*/.rebar
+ @rm -rf src/{jiffy,khash,snappy,b64url}/priv
+ @rm -rf share/server/main.js share/server/main-coffee.js
+ @rm -f src/couch/priv/couchspawnkillable
+ @rm -f src/couch/priv/couch_js/config.h
check: javascript eunit
-
+# creates a a full erlang release
dist: all
@rm -rf rel/couchdb
@rebar generate
@cp -r share/www rel/couchdb/share/www
+# creates a source tarball
+release:
+ ./build-aux/couchdb-build-release.sh
+
+ # build fauxton
+ $(MAKE) fauxton
+ cp -r share/www apache-couchdb/share/
+ #
+ # # build docs
+ # cd src/docs; make
+ # mkdir apache-couchdb/share/docs
+ # cp -r src/docs/build/html apache-couchdb/share/docs/html
+
distclean: clean
+ @rm install.mk
+ @rm config.erl
+ @rm rel/couchdb.config
+ifneq ($(IN_RELEASE), true)
+ # when we are in a release, don’t delete the
+ # copied sources, generated docs, or fauxton
@rm -rf rel/couchdb
@rm -rf share/www
+ @rm -rf src/docs
+endif
devclean:
@rm -rf dev/lib/*/data
-include install.mk
+-include install.mk
install: dist
@mkdir -p $(prefix)
@cp -R rel/couchdb/* $(prefix)
@@ -52,8 +82,12 @@ install: dist
@chown $(user) $(prefix)/var/log/couchdb.log
install.mk:
+# ignore install.mk missing if we are running
+# `make clean` without having run ./configure first
+ifneq ($(MAKECMDGOALS), clean)
@echo "No install.mk found. Run ./configure"
@exit 1
+endif
docker-image:
@docker build --rm -t couchdb/dev-cluster .
diff --git a/THANKS.in b/THANKS.in
new file mode 100644
index 000000000..8b2a34f9b
--- /dev/null
+++ b/THANKS.in
@@ -0,0 +1,96 @@
+Apache CouchDB THANKS
+=====================
+
+A number of people have contributed to Apache CouchDB by reporting problems,
+suggesting improvements or submitting changes. Some of these people are:
+
+ * William Beh <willbeh@gmail.com>
+ * Dirk Schalge <dirk@epd-me.net>
+ * Roger Leigh <rleigh@debian.org>
+ * Sam Ruby <rubys@intertwingly.net>
+ * Carlos Valiente <superdupont@gmail.com>
+ * Till Klampaeckel <till@klampaeckel.de>
+ * Jim Lindley <web@jimlindley.com>
+ * Yoan Blanc <yoan.blanc@gmail.com>
+ * Michael Gottesman <gottesmm@reed.edu>
+ * Mark Baran <mebaran@gmail.com>
+ * Michael Hendricks <michael@ndrix.org>
+ * Antony Blakey <antony.blakey@gmail.com>
+ * Paul Carey <paul.p.carey@gmail.com>
+ * Hunter Morris <huntermorris@gmail.com>
+ * Brian Palmer <jira@brian.codekitchen.net>
+ * Maximillian Dornseif <md@hudora.de>
+ * Eric Casteleijn <eric.casteleijn@canonical.com>
+ * Maarten Thibaut <mthibaut@cisco.com>
+ * Florian Ebeling <florian.ebeling@gmail.com>
+ * Volker Mische <volker.mische@gmail.com>
+ * Brian Candler <B.Candler@pobox.com>
+ * Brad Anderson <brad@sankatygroup.com>
+ * Nick Gerakines <nick@gerakines.net>
+ * Kevin Ilchmann Jørgensen <kijmail@gmail.com>
+ * Sebastian Cohnen <sebastian.cohnen@gmx.net>
+ * Sven Helmberger <sven.helmberger@gmx.de>
+ * Dan Walters <dan@danwalters.net>
+ * Curt Arnold <carnold@apache.org>
+ * Gustavo Niemeyer
+ * Joshua Bronson <jabronson@gmail.com>
+ * Kostis Sagonas <kostis@cs.ntua.gr>
+ * Matthew Hooker <mwhooker@gmail.com>
+ * Ilia Cheishvili <ilia.cheishvili@gmail.com>
+ * Lena Herrmann <lena@zeromail.org>
+ * Jack Moffit <metajack@gmail.com>
+ * Damjan Georgievski <gdamjan@gmail.com>
+ * Jan Kassens <jan@kassens.net>
+ * James Marca <jmarca@translab.its.uci.edu>
+ * Matt Goodall <matt.goodall@gmail.com>
+ * Joel Clark <unsigned_char@yahoo.com>
+ * Matt Lyon <matt@flowerpowered.com>
+ * mikeal <mikeal.rogers@gmail.com>
+ * Joscha Feth <joscha@feth.com>
+ * Jarrod Roberson <jarrod@vertigrated.com>
+ * Jae Kwon <jkwon.work@gmail.com>
+ * Gavin Sherry <swm@alcove.com.au>
+ * Timothy Smith <tim@couch.io>
+ * Martin Haaß <MartinHaass@gmx.net>
+ * Hans Ulrich Niedermann <hun@n-dimensional.de>
+ * Dmitry Unkovsky <oil.crayons@gmail.com>
+ * Zachary Zolton <zachary.zolton@gmail.com>
+ * Brian Jenkins <bonkydog@bonkydog.com>
+ * Paul Bonser <pib@paulbonser.com>
+ * Caleb Land <caleb.land@gmail.com>
+ * Juhani Ränkimies <juhani@juranki.com>
+ * Kev Jackson <foamdino@gmail.com>
+ * Jonathan D. Knezek <jdknezek@gmail.com>
+ * David Rose <doppler@gmail.com>
+ * Lim Yue Chuan <shasderias@gmail.com>
+ * David Davis <xantus@xantus.org>
+ * Juuso Väänänen <juuso@vaananen.org>
+ * Jeff Zellner <jeff.zellner@gmail.com>
+ * Gabriel Farrell <gsf747@gmail.com>
+ * Mike Leddy <mike@loop.com.br>
+ * Wayne Conrad <wayne@databill.com>
+ * Thomas Vander Stichele <thomas@apestaart.org>
+ * Felix Hummel <apache@felixhummel.de>
+ * Tim Smith <tim@couchbase.com>
+ * Dipesh Patel <dipthegeezer.opensource@googlemail.com>
+ * Sam Bisbee <sam@sbisbee.com>
+ * Nathan Vander Wilt <natevw@yahoo.com>
+ * Caolan McMahon <caolan.mcmahon@googlemail.com>
+ * Andrey Somov <trophybase@gmail.com>
+ * Chris Coulson <chrisccoulson.googlemail.com>
+ * Trond Norbye <trond.norbye@gmail.com>
+ * Christopher Bonhage <queezey@me.com>
+ * Christian Carter <cdcarter@gmail.com>
+ * Lukasz Mielicki <mielicki@gmail.com>
+ * Omar Yasin <omarkj@gmail.com
+ * Matt Cooley <matt@mattcooley.net>
+ * Simon Leblanc <sim.leblanc+apache@gmail.com>
+ * Rogutės Sparnuotos <rogutes@googlemail.com>
+ * Gavin McDonald <gmcdonald@apache.org>
+ * Fedor Indutny <fedor@indutny.com>
+ * Tim Blair
+ * Tady Walsh <hello@tady.me>
+ * Sam Rijs <recv@awesam.de>
+# Authors from commit 6c976bd and onwards are auto-inserted. If you are merging
+# a commit from a non-committer, you should not add an entry to this file. When
+# `bootstrap` is run, the actual THANKS file will be generated.
diff --git a/build-aux/couchdb-build-release.sh b/build-aux/couchdb-build-release.sh
new file mode 100755
index 000000000..f2f7e1b9f
--- /dev/null
+++ b/build-aux/couchdb-build-release.sh
@@ -0,0 +1,48 @@
+#!/bin/sh -ex
+
+RELDIR=apache-couchdb
+# make release dir
+rm -rf $RELDIR
+mkdir $RELDIR
+
+CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD`
+
+# copy sources over
+git archive $CURRENT_BRANCH | tar -xC $RELDIR/
+mkdir $RELDIR/src
+cd src/
+
+for repo in *; do
+ cd $repo
+ mkdir ../../$RELDIR/src/$repo
+ # todo, make work for tags
+ git archive `git rev-parse --abbrev-ref HEAD` | tar -xC ../../$RELDIR/src/$repo/
+ cd ..
+done
+
+cd ..
+
+# update version
+# actual version detection TBD
+perl -pi -e 's/\{vsn, git\}/\{vsn, "version"\}/' $RELDIR/src/*/src/*.app.src
+
+# create THANKS file
+if test -e .git; then
+ OS=`uname -s`
+ case "$OS" in
+ Linux|CYGWIN*) # GNU sed
+ SED_ERE_FLAG=-r
+ ;;
+ *) # BSD sed
+ SED_ERE_FLAG=-E
+ ;;
+ esac
+
+ sed -e "/^#.*/d" THANKS.in > $RELDIR/THANKS
+ CONTRIB_EMAIL_SED_COMMAND="s/^[[:blank:]]{5}[[:digit:]]+[[:blank:]]/ * /"
+ git shortlog -se 6c976bd..HEAD \
+ | grep -v @apache.org \
+ | sed $SED_ERE_FLAG -e "$CONTRIB_EMAIL_SED_COMMAND" >> $RELDIR/THANKS
+ echo "" >> $RELDIR/THANKS # simplest portable newline
+ echo "For a list of authors see the \`AUTHORS\` file." >> $RELDIR/THANKS
+fi
diff --git a/configure b/configure
index 1f7a26175..d76eb8a92 100755
--- a/configure
+++ b/configure
@@ -134,5 +134,8 @@ cat > $rootdir/config.erl << EOF
{with_curl, $WITH_CURL}.
EOF
-echo "==> updating dependencies"
-rebar get-deps update-deps
+# only update dependencies, when we are not in a release tarball
+if [ -d .git ]; then
+ echo "==> updating dependencies"
+ rebar get-deps update-deps
+fi
diff --git a/test/build/test-configure-distclean.sh b/test/build/test-configure-distclean.sh
new file mode 100755
index 000000000..ed01faab2
--- /dev/null
+++ b/test/build/test-configure-distclean.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+rm -rf apache-couchdb apache-couchdb-pristine
+./configure
+make release
+cp -r apache-couchdb apache-couchdb-pristine
+cd apache-couchdb
+ ./configure
+ make distclean
+cd ..
+
+echo "********************************************"
+echo "If you see anything here"
+diff -r apache-couchdb apache-couchdb-pristine
+echo "and here, something is wrong"
+echo "********************************************"
diff --git a/test/build/test-make-clean.sh b/test/build/test-make-clean.sh
new file mode 100755
index 000000000..ce6366fef
--- /dev/null
+++ b/test/build/test-make-clean.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+rm -rf apache-couchdb*
+./configure
+make release
+cd apache-couchdb
+ ./configure
+cd ..
+
+cp -r apache-couchdb apache-couchdb-pristine
+
+cd apache-couchdb
+ make
+ make clean
+cd ..
+
+echo "********************************************"
+echo "If you see anything here"
+diff -r apache-couchdb apache-couchdb-pristine
+echo "and here, something is wrong"
+echo "********************************************"