r794 - zenoss/trunk/debian

Bernd Zeimetz bzed-guest at alioth.debian.org
Fri Apr 13 00:56:36 UTC 2007


Author: bzed-guest
Date: 2007-04-13 00:56:35 +0000 (Fri, 13 Apr 2007)
New Revision: 794

Modified:
   zenoss/trunk/debian/rules
Log:
get-orig-source target.

original tarball from upstream: 50MB+
our tarball: 20MB (and way more easy to package)



Modified: zenoss/trunk/debian/rules
===================================================================
--- zenoss/trunk/debian/rules	2007-04-12 21:55:44 UTC (rev 793)
+++ zenoss/trunk/debian/rules	2007-04-13 00:56:35 UTC (rev 794)
@@ -7,7 +7,11 @@
 # This has to be exported to make some magic below work.
 export DH_OPTIONS
 
+# Define the Zenoss' version we're packaging
+ZENOSS_VERSION := $(shell dpkg-parsechangelog  | grep '^Version' | sed 's,.* ,,g;s,-.*,,g')
+ZENOSS_SVN := http://dev.zenoss.com/svn/tags/zenoss-$(ZENOSS_VERSION)
 
+
 #Architecture 
 build: build-arch build-indep
 
@@ -31,7 +35,6 @@
 	rm -f build-arch-stamp build-indep-stamp 
 
 	# Add here commands to clean up after the build process.
-	-$(MAKE) clean
 
 	dh_clean 
 
@@ -90,6 +93,9 @@
 	dh_gencontrol
 	dh_md5sums
 	dh_builddeb
+
+
+
 # Build architecture independant packages using the common target.
 binary-indep: build-indep install-indep
 	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
@@ -99,32 +105,48 @@
 	$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
 
 binary: binary-arch binary-indep
-.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure
 
 
+get-orig-source: clean
+	tarball="zenoss_$(ZENOSS_VERSION).orig.tar.gz" ;\
+	if test -e ../tarballs/$$tarball; then \
+		echo "$$tarball exists in ../tarballs" ;\
+		echo "please remove it before trying to create a new one" ;\
+		exit 1 ;\
+	fi ;\
+	pushd . ;\
+	packdir="../tarballs/zenoss-$(ZENOSS_VERSION).orig" ;\
+	mkdir -p $$packdir ;\
+	cd $$packdir ;\
+	svn export $(ZENOSS_SVN)/Products ;\
+	svn export $(ZENOSS_SVN)/inst/externallibs/PDIS-XPath-0.3.tar.gz ;\
+	tar xfz PDIS-XPath-0.3.tar.gz ;\
+	rm PDIS-XPath-0.3.tar.gz ;\
+	rm -rf Products/OFolder/ ;\
+	rm -rf Products/ManagableIndex/ ;\
+	rm -rf Products/AdvancedQuery/ ;\
+	rm -rf Products/CMFCore/ ;\
+	rm -rf Products/GenericSetup/ ;\
+	rm -rf Products/Five/ ;\
+	rm -rf Products/PluggableAuthService/ ;\
+	rm -rf Products/PluginRegistry/ ;\
+	svn -N export $(ZENOSS_SVN)/inst ;\
+	pushd . ;\
+	cd inst/ ;\
+	svn export $(ZENOSS_SVN)/inst/docs ;\
+	svn export $(ZENOSS_SVN)/inst/fs ;\
+	svn export $(ZENOSS_SVN)/inst/conf/ ;\
+	svn export $(ZENOSS_SVN)/bin ;\
+	rm -rf docs/BUILD_* ;\
+	rm -rf docs/INSTALL_* ;\
+	popd ;\
+	find . -name \.cvsignore -exec rm -f {} \; ;\
+	find . -name \.svnignore -exec rm -f {} \; ;\
+	cd .. ;\
+	tar cvf - zenoss-$(ZENOSS_VERSION).orig | gzip --best - \
+		> $$tarball ;\
+	rm -rf zenoss-$(ZENOSS_VERSION).orig ;\
+	popd
 
 
-
-#TODO: for the get-orig-source target
-#svn export http://dev.zenoss.com/svn/tags/zenoss-1.1.1/Products
-#svn export http://dev.zenoss.com/svn/tags/zenoss-1.1.1/inst/externallibs/PDIS-XPath-0.3.tar.gz
-#tar xfz PDIS-XPath-0.3.tar.gz
-#rm PDIS-XPath-0.3.tar.gz
-#rm -rf Products/OFolder/
-#rm -rf Products/ManagableIndex/
-#rm -rf Products/AdvancedQuery/
-#rm -rf Products/CMFCore/
-#rm -rf Products/GenericSetup/
-#rm -rf Products/Five/
-#rm -rf Products/PluggableAuthService/
-#rm -rf Products/PluginRegistry/
-#svn -N export http://dev.zenoss.com/svn/tags/zenoss-1.1.1/inst
-#cd inst/
-#svn export http://dev.zenoss.com/svn/tags/zenoss-1.1.1/inst/docs
-#svn export http://dev.zenoss.com/svn/tags/zenoss-1.1.1/inst/fs
-#svn export http://dev.zenoss.com/svn/tags/zenoss-1.1.1/inst/conf/
-#svn export http://dev.zenoss.com/svn/tags/zenoss-1.1.1/bin
-#cd ..
-#find . -name \.cvsignore -exec rm -f {} \;
-#find . -name \.svnignore -exec rm -f {} \;
-
+.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch get-orig-source




More information about the pkg-zope-commits mailing list