couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [02/14] examples commit: updated refs/heads/master to 8a630c5
Date Thu, 17 Jul 2014 16:14:23 GMT
custom Makefile for my-first-couchdb-plugin


Project: http://git-wip-us.apache.org/repos/asf/couchdb-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-examples/commit/1d8d0511
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-examples/tree/1d8d0511
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-examples/diff/1d8d0511

Branch: refs/heads/master
Commit: 1d8d051155a265a7f230df386890a5a8e84d9a73
Parents: 92fb480
Author: Jan Lehnardt <jan@apache.org>
Authored: Fri Oct 4 15:02:04 2013 +0200
Committer: Jan Lehnardt <jan@apache.org>
Committed: Fri Oct 4 15:02:04 2013 +0200

----------------------------------------------------------------------
 Makefile.am   | 21 +++++++++++++++++++++
 Makefile.dist | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-examples/blob/1d8d0511/Makefile.am
----------------------------------------------------------------------
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..cb3b70f
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,21 @@
+## Licensed under the Apache License, Version 2.0 (the "License"); you may not
+## use this file except in compliance with the License. You may obtain a copy of
+## the License at
+##
+##   http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+## License for the specific language governing permissions and limitations under
+## the License.
+
+EXTRA_DIST =
+  .gitignore \
+  Makefile.dist \
+  Makefile.am \
+  priv/default.d/my_first_couchdb_plugin.ini \
+  README.md \
+  src/my_first_couchdb_plugin.app.src \
+  src/my_first_couchdb_plugin.erl \
+  test/my_first_couchdb_plugin_tests.erl

http://git-wip-us.apache.org/repos/asf/couchdb-examples/blob/1d8d0511/Makefile.dist
----------------------------------------------------------------------
diff --git a/Makefile.dist b/Makefile.dist
new file mode 100644
index 0000000..7806bd7
--- /dev/null
+++ b/Makefile.dist
@@ -0,0 +1,38 @@
+## Licensed under the Apache License, Version 2.0 (the "License"); you may not
+## use this file except in compliance with the License. You may obtain a copy of
+## the License at
+##
+##   http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+## License for the specific language governing permissions and limitations under
+## the License.
+
+# Customize here
+NAME=my_first_couchdb_plugin
+VERSION=1.0.0
+# Stop customizing here
+
+ERL=$(shell couch-config --erl-bin)
+ERLANG_VERSION=$(shell couch-config --erlang-version)
+COUCHDB_VERSION=$(shell couch-config --couch-version | sed 's/\+.*//')
+PLUGIN_DIRS=ebin priv
+PLUGIN_VERSION_SLUG=$(NAME)-$(VERSION)-$(ERLANG_VERSION)-$(COUCHDB_VERSION)
+PLUGIN_DIST=$(PLUGIN_VERSION_SLUG)
+
+all: compile
+
+compile:
+	ERL_LIBS=$(shell couch-config --erl-libs-dir):$(ERL_LIBS) rebar compile
+
+dev:
+	@ERL_LIBS=$(shell pwd) couchdb -i -a priv/default.d/*.ini
+
+plugin: compile
+	@mkdir -p $(PLUGIN_DIRS)
+	@mkdir -p $(PLUGIN_DIST)
+	@cp -r $(PLUGIN_DIRS) $(PLUGIN_DIST)
+	@tar czf $(PLUGIN_VERSION_SLUG).tar.gz $(PLUGIN_DIST)
+	@$(ERL) -eval 'File = "$(PLUGIN_VERSION_SLUG).tar.gz", {ok, Data} = file:read_file(File),io:format("~s:
~s~n", [File, base64:encode(crypto:sha(Data))]),halt()' -noshell


Mime
View raw message