Browse files

MB-5821: Add bdist target for source tarball

Change-Id: Iab501975d1eed9673dc75492e910fefe13c5925c
Reviewed-on: http://review.couchbase.org/18176
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Bin Cui <bin.cui@gmail.com>
  • Loading branch information...
1 parent 437522d commit 0d57d80c3cef28142dd3a423303b1e8cef56421b @bcui6611 bcui6611 committed Jul 10, 2012
Showing with 18 additions and 1 deletion.
  1. +18 −1 Makefile.am
View
19 Makefile.am
@@ -1,3 +1,6 @@
+TMP_DIR = ./tmp
+TMP_VER = $(TMP_DIR)/version_num.tmp
+
COUCHBASE_PYTHON_CLIENT = ../couchbase-python-client/couchbase \
../couchbase-python-client/httplib2 \
../couchbase-python-client/simplejson \
@@ -22,4 +25,18 @@ EXTRA_DIST = $(pythonlib_SCRIPTS)
install-data-hook:
cp -rf $(COUCHBASE_PYTHON_CLIENT) $(pythonlibdir)
-
+clean-local:
+ rm -f workload-generator*tar.gz
+ rm -rf $(TMP_DIR)
+
+bdist:
+ test -d $(TMP_DIR) || mkdir $(TMP_DIR)
+ git describe | sed s/-/_/g > $(TMP_VER)
+ rm -f ./workload-generator_*.tar.gz
+ rm -rf $(TMP_DIR)/cbworkloadgen
+ mkdir -p $(TMP_DIR)/workload-generator
+ cp -rf $(COUCHBASE_PYTHON_CLIENT) $(TMP_DIR)/workload-generator
+ cp $(pythonlib_SCRIPTS) $(TMP_DIR)/workload-generator
+ (cd $(TMP_DIR); tar cf - workload-generator) | gzip -9 > workload-generator_`cat $(TMP_VER)`-`uname -s`.`uname -m`.tar.gz
+ echo created workload-generator_`cat $(TMP_VER)`-`uname -s`.`uname -m`.tar.gz
+ rm -rf $(TMP_DIR)

0 comments on commit 0d57d80

Please sign in to comment.