Permalink
Browse files

make changes needed to build rcouch.

  • Loading branch information...
1 parent fc67cfa commit aa7f3641fd2e9fba5e4eaea5d581121149e3fa6f @benoitc benoitc committed Dec 3, 2011
Showing with 194 additions and 322 deletions.
  1. +19 −36 Makefile
  2. +12 −17 README.md
  3. 0 apps/{refuge_common → rcouch_common}/LICENSE
  4. +2 −2 apps/{refuge_common/src/refuge_common.app.src → rcouch_common/src/rcouch_common.app.src}
  5. +3 −3 apps/{refuge_common/src/refuge_common.erl → rcouch_common/src/rcouch_common.erl}
  6. +2 −2 apps/{refuge_common/src/refuge_common_httpd.erl → rcouch_common/src/rcouch_common_httpd.erl}
  7. +4 −4 package/Makefile
  8. +2 −2 package/deb/changelog
  9. +5 −6 package/deb/control
  10. +1 −9 package/deb/copyright
  11. +15 −15 package/deb/{debian_refuge_init → debian_rcouch_init}
  12. +7 −7 package/deb/dirs
  13. +12 −12 package/deb/postinst
  14. +18 −18 package/deb/postrm
  15. 0 package/deb/{refuge.debhelper.log → rcouch.debhelper.log}
  16. 0 package/deb/{refuge.substvars → rcouch.substvars}
  17. +11 −11 package/deb/rules
  18. +11 −11 package/deb/vars.config
  19. +1 −1 package/osx/Makefile
  20. +1 −1 package/rpm/Makefile
  21. +20 −20 package/rpm/SOURCES/{refuge_init → rcouch_init}
  22. +15 −15 package/rpm/SPECS/{refuge.spec → rcouch.spec}
  23. +9 −9 package/solaris/Makefile
  24. +7 −7 package/solaris/preinstall
  25. +2 −2 package/solaris/r.preserve
  26. +2 −2 rebar.config
  27. +1 −1 rel/files/default.ini
  28. +1 −1 rel/files/{refuge → rcouch}
  29. +1 −1 rel/files/vm.args
  30. +1 −1 rel/{refuge.config → rcouch.config}
  31. +7 −7 rel/reltool.config
  32. +0 −32 rel/vars/dev1.config
  33. +0 −33 rel/vars/dev2.config
  34. +0 −32 rel/vars/dev3.config
  35. +2 −2 src/{refuge.app.src → rcouch.app.src}
View
@@ -1,12 +1,12 @@
-REPO=refuge
-REFUGE_TAG= $(shell git describe --tags --always)
-REVISION?= $(shell echo $(REFUGE_TAG) | sed -e 's/^$(REPO)-//')
+REPO=rcouch
+RCOUCH_TAG= $(shell git describe --tags --always)
+REVISION?= $(shell echo $(RCOUCH_TAG) | sed -e 's/^$(REPO)-//')
PKG_VERSION?= $(shell echo $(REVISION) | tr - .)
DESTDIR?=
DISTDIR= rel/archive
-.PHONY: rel stagedevrel deps
+.PHONY: rel deps
all: deps compile
@@ -16,61 +16,44 @@ compile:
deps:
@./rebar get-deps
-clean: devclean
+clean:
@./rebar clean
-distclean: clean devclean relclean
+distclean: clean relclean
@./rebar delete-deps
rel: relclean deps
@./rebar compile generate
relclean:
- @rm -rf rel/refuge
+ @rm -rf rel/rcouch
-##
-## dev targets
-##
-
-dev: devclean all devrel
- @echo "\n\
-Development nodes are built, and can be started using ./dev/dev[123]/bin/refuge.\n"
-
-devrel: dev1 dev2 dev3
-
-dev1 dev2 dev3:
- @mkdir -p dev
- @(cd rel && ../rebar generate target_dir=../dev/$@ overlay_vars=vars/$@.config)
-
-devclean:
- @rm -rf dev
-
##
## release tarbals
##
archive = git archive --format=tar --prefix=$(1)/ HEAD | (cd $(2) && tar xf -)
buildtar = mkdir distdir && \
- git clone . distdir/refuge-clone && \
- cd distdir/refuge-clone && \
- git checkout $(REFUGE_TAG) && \
- $(call archive,$(REFUGE_TAG),..) && \
- mkdir ../$(REFUGE_TAG)/deps && \
+ git clone . distdir/rcouch-clone && \
+ cd distdir/rcouch-clone && \
+ git checkout $(RCOUCH_TAG) && \
+ $(call archive,$(RCOUCH_TAG),..) && \
+ mkdir ../$(RCOUCH_TAG)/deps && \
make deps; \
for dep in deps/*; do \
cd $${dep} && \
- $(call archive,$${dep},../../../$(REFUGE_TAG)) && \
- mkdir -p ../../../$(REFUGE_TAG)/$${dep}/priv && \
- git rev-list --max-count=1 HEAD > ../../../$(REFUGE_TAG)/$${dep}/priv/git.vsn && \
+ $(call archive,$${dep},../../../$(RCOUCH_TAG)) && \
+ mkdir -p ../../../$(RCOUCH_TAG)/$${dep}/priv && \
+ git rev-list --max-count=1 HEAD > ../../../$(RCOUCH_TAG)/$${dep}/priv/git.vsn && \
cd ../..; done
distdir:
- $(if $(REFUGE_TAG), $(call buildtar), $(error "You can't generate a release tarball from a non-tagged revision. Run 'git checkout <tag>', then 'make dist'"))
+ $(if $(RCOUCH_TAG), $(call buildtar), $(error "You can't generate a release tarball from a non-tagged revision. Run 'git checkout <tag>', then 'make dist'"))
-dist $(REFUGE_TAG).tar.gz: distdir
+dist $(RCOUCH_TAG).tar.gz: distdir
cd distdir; \
- tar czf ../$(REFUGE_TAG).tar.gz $(REFUGE_TAG)
+ tar czf ../$(RCOUCH_TAG).tar.gz $(RCOUCH_TAG)
package: dist
@@ -81,5 +64,5 @@ pkgclean:
.PHONY: package
-export PKG_VERSION REPO REVISION REFUGE_TAG
+export PKG_VERSION REPO REVISION RCOUCH_TAG
View
@@ -1,19 +1,20 @@
-refuge - Data should be yours
------------------------------
+rcouch
+------
+
+rcouch is a static distribution of couchdb using rebar. It is an
+extraction of the refuge code to ease the distribution of couchdb.
+
+Based on the couchdb code it is tagged from time to time for stability
+purpose. At some point some supported branch may appear.
-Refuge main goal is to design an opensource, free, decentralized and
-secured and eventually anonymous platform. This platform will allow to
-share, render information and exchange messages offline or online.
-Information is on each nodes.
## Features:
-- Apache CouchDB 1.2x based (current trunk right now)
+- Apache CouchDB based
- Geocouch integrated
-- dnssd support
-- upnp support (coming)
-- P2P layer (coming)
+- rebar
+- relocatable
- Fully opensource. All the sources are on refuge GIT repository
(http://github.com/refuge) under Apache License 2.
@@ -30,15 +31,9 @@ Installation is pretty simple. Just run the command line:
$ make rel
-and it will generate a refuge folder in rel/refuge. This release is
+and it will generate a couch folder in rel/couch. This release is
fully relocatable, so you can put it where you want on your system.
-When developping on top of refuge, you could also run the command line:
-
- $ make dev
-
-Then ./dev/dev[1,2,3]/bin/refuge
-
To create package for your system run `make package` . For now we build
packages for OSX, Debian, Redhat & Solaris.
File renamed without changes.
@@ -1,6 +1,6 @@
-{application, refuge_common,
+{application, rcouch_common,
[
- {description, "common refuge modules"},
+ {description, "common rcouch modules"},
{vsn, "0.1"},
{registered, []},
{applications, [
@@ -4,15 +4,15 @@
%%% See the NOTICE for more information.
--module(refuge_common).
+-module(rcouch_common).
-export([get_version/0]).
get_version() ->
Releases = release_handler:which_releases(),
- Version = case [V || {"refuge", V, _, current} <- Releases] of
+ Version = case [V || {"rcouch", V, _, current} <- Releases] of
[] ->
- case [V || {"refuge", V, _, permanent} <- Releases] of
+ case [V || {"rcouch", V, _, permanent} <- Releases] of
[] ->
"dev";
[Permanent] ->
@@ -3,7 +3,7 @@
%%% This file is part of refuge released under the Apache 2 license.
%%% See the NOTICE for more information.
--module(refuge_common_httpd).
+-module(rcouch_common_httpd).
-include_lib("couch/include/couch_db.hrl").
@@ -17,7 +17,7 @@ couch_welcome_req(#httpd{method='GET'}=Req, WelcomeMessage) ->
couch_httpd:send_json(Req, {[
{couchdb, WelcomeMessage},
{version, list_to_binary(couch:version())},
- {refuge_version, refuge_common:get_version()}
+ {rcouch_version, rcouch_common:get_version()}
]});
couch_welcome_req(Req, _) ->
couch_httpd:send_method_not_allowed(Req, "GET,HEAD").
View
@@ -25,19 +25,19 @@ endif
APP = $(shell echo "$(REPO)" | sed -e 's/_/-/g')
# Assumes CURDIR is .../$(APP)/package/$(APP)/
-REFUGE_PATH ?= ..
+RCOUCH_PATH ?= ..
RELEASE ?=
-$(APP)-$(REVISION).tar.gz: ../$(REFUGE_TAG).tar.gz
+$(APP)-$(REVISION).tar.gz: ../$(RCOUCH_TAG).tar.gz
ln -s $< $@
pkgclean: $(PKGERDIR)/pkgclean
rm -rf $(APP)-$(REVISION).tar.gz working rpmbuild debuild packages osxbuild
pkgcheck:
- $(if $(REFUGE_TAG),,$(error "You can't generate a release tarball from a non-tagged revision. Run 'git checkout <tag>', then 'make dist'"))
+ $(if $(RCOUCH_TAG),,$(error "You can't generate a release tarball from a non-tagged revision. Run 'git checkout <tag>', then 'make dist'"))
$(if $(RELEASE),,$(error "You must provide a package release number via RELEASE= on the command line"))
- @echo "Packaging \"$(REFUGE_TAG)\""
+ @echo "Packaging \"$(RCOUCH_TAG)\""
# The heavy lifting is done by the individual packager Makefiles
package: pkgcheck build
View
@@ -1,5 +1,5 @@
-refuge (0.3.0-1) unstable; urgency=low
+rcouch (0.4.0-1) unstable; urgency=low
- * Initial release of Refuge in binary form for deb based systems
+ * Initial release of rcouch in binary form for deb based systems
-- benoitc <benoitc@refuge.io> Tue, 27 Sept 2009 14:47:00 +0200
View
@@ -1,14 +1,13 @@
-Source: refuge
+Source: rcouch
Section: net
Priority: extra
Maintainer: Benoit Chesneau <benoitc@refuge.io>
Build-Depends: debhelper (>= 7)
Standards-Version: 3.8.3
-Homepage: http://refuge.io/
+Homepage: http://refuge.io/rcouch
-Package: refuge
+Package: rcouch
Architecture: any
Depends: adduser, logrotate, ${shlibs:Depends}, ${misc:Depends}
-Description: Decentralized data platform
- The Refuge Project aims to provide a fully decentralized and opensource
-platform based on apacje CouchDB to share, collect and render data.
+Description: static distribution of couchdb
+
View
@@ -1,11 +1,3 @@
-This package was debianized by grant <grant@basho.com> on
-Fri, 19 Feb 2010 21:48:05 -0600.
-
-It was downloaded from <url://example.com>
-
-Upstream Author(s):
-
-
Copyright:
2011 The refuge project
@@ -24,7 +16,7 @@ License:
The Debian packaging is:
- 2011 The refuge prokect
+ 2011 The refuge project
and is licensed under the Apache License, Version 2.0
@@ -1,22 +1,22 @@
#! /bin/bash
### BEGIN INIT INFO
-# Provides: refuge
+# Provides: rcouch
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: A distributed key value store
-# Description: refuge decentralized data platform
+# Description: rcouch decentralized data platform
### END INIT INFO
# Original Author: Vladimir Osintsev <osintsev@gmail.com>
# Modified for Ubuntu by: Matt Heitzenroder <mheitzenroder@gmail.com>
-# Modified for refuge by: Grant Schofield <grant@basho.com>
+# Modified for rcouch by: Grant Schofield <grant@basho.com>
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="a decentralized data platform"
-NAME=refuge
-ERTS_PATH=/usr/lib/refuge/erts-5.7.5/bin
+NAME=rcouch
+ERTS_PATH=/usr/lib/rcouch/erts-5.7.5/bin
DAEMON=/usr/sbin/$NAME
RUNNER_LOG_DIR=/var/log/$NAME
RUNNER_USR_DIR=/usr
@@ -56,24 +56,24 @@ do_start()
# --chuid just doesn't seem to work at all
#
# start-stop-daemon --start \
-# --name refuge \
-# --chdir /var/lib/refuge \
-# --chuid refuge \
-# --user refuge \
+# --name rcouch \
+# --chdir /var/lib/rcouch \
+# --chuid rcouch \
+# --user rcouch \
# --exec $DAEMON -- $DAEMON_ARGS \
# || return 2
- su - refuge -c "$DAEMON $DAEMON_ARGS" || return 2
+ su - rcouch -c "$DAEMON $DAEMON_ARGS" || return 2
}
#
# Function that stops the daemon/service
#
do_stop()
{
- # Try to stop via "refuge stop" first
- RETVAL=`su - refuge -c "$DAEMON ping"`
- [ "$RETVAL" = "pong" ] && su - refuge -c "$DAEMON stop"
+ # Try to stop via "rcouch stop" first
+ RETVAL=`su - rcouch -c "$DAEMON ping"`
+ [ "$RETVAL" = "pong" ] && su - rcouch -c "$DAEMON stop"
sleep 2
RETVAL=`pidof $ERTS_PATH/beam.smp`
[ "$RETVAL" = "" ] && return 0
@@ -88,7 +88,7 @@ do_stop()
start-stop-daemon --stop \
--quiet \
--retry=TERM/30/KILL/5 \
- --user refuge \
+ --user rcouch \
--exec $ERTS_PATH/beam.smp
return $?
}
@@ -98,7 +98,7 @@ do_stop()
#
do_reload() {
# Restart the VM without exiting the process
- su - refuge -c "$DAEMON restart" && return $? || return 2
+ su - rcouch -c "$DAEMON restart" && return $? || return 2
}
View
@@ -1,10 +1,10 @@
etc/init.d
-etc/refuge
+etc/rcouch
etc/logrotate.d
-usr/lib/refuge
+usr/lib/rcouch
usr/sbin
-usr/share/refuge
-var/run/refuge
-var/lib/refuge
-var/log/refuge
-var/log/refuge/sasl
+usr/share/rcouch
+var/run/rcouch
+var/lib/rcouch
+var/log/rcouch
+var/log/rcouch/sasl
Oops, something went wrong.

0 comments on commit aa7f364

Please sign in to comment.