[Pkg-zenoss-commits] r160 - in /packages/zenoss/trunk/debian: get-orig-source.sh rules

zack at users.alioth.debian.org zack at users.alioth.debian.org
Tue Jun 19 11:28:25 UTC 2007


Author: zack
Date: Tue Jun 19 11:28:25 2007
New Revision: 160

URL: http://svn.debian.org/wsvn/pkg-zenoss/?sc=1&rev=160
Log:
reverted the sh split

Removed:
    packages/zenoss/trunk/debian/get-orig-source.sh
Modified:
    packages/zenoss/trunk/debian/rules

Modified: packages/zenoss/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-zenoss/packages/zenoss/trunk/debian/rules?rev=160&op=diff
==============================================================================
--- packages/zenoss/trunk/debian/rules (original)
+++ packages/zenoss/trunk/debian/rules Tue Jun 19 11:28:25 2007
@@ -145,13 +145,100 @@
 # get-orig-source will drop the orig.tar.gz in
 # ../tarballs, if the directory exists
 get-orig-source:
-	CURDIR=$(CURDIR) \
-	EXTRAVERSION=$(EXTRAVERSION) \
-	KEEP_UPSTREAM=$(KEEP_UPSTREAM) \
-	REVISION=$(REVISION) \
-	VERSION=$(VERSION) \
-	ZENOSS_SVN=$(ZENOSS_SVN) \
-		debian/get-orig-source.sh
+	set -e ;\
+	if dh_testroot 2>/dev/null; then \
+	    echo "You must NOT run get-orig-source as root!" ;\
+	    exit 1 ;\
+	fi ;\
+	\
+	\
+	echo "finding directories" ;\
+	    if [ -d ../tarballs ]; then \
+	        packbase="$(CURDIR)/../tarballs" ;\
+	        upstream="$(CURDIR)/../upstream" ;\
+	    else \
+	        packbase="$(CURDIR)" ;\
+	        upstream="$(CURDIR)/upstream" ;\
+	    fi ;\
+	    mkdir -p $$upstream ;\
+	    mkdir -p $$packbase ;\
+	\
+	echo "getting revision from svn" ;\
+	    if [ -z $(REVISION) ]; then \
+	        revision=`svn info $(ZENOSS_SVN) | \
+                          grep Revision | \
+                          sed 's,[^0-9]*,,g'` ;\
+	    else revision=$(REVISION) ;\
+	    fi ;\
+	\
+	echo "checking destinations for .orig dir and .orig.tar.gz" ;\
+	    tarball="zenoss_$(VERSION)$(EXTRAVERSION)+r$$revision.orig.tar.gz" ;\
+	    if [ -e $$packbase/$$tarball ]; then \
+	        echo "$$tarball exists in $$packbase" ;\
+	        echo "please remove it before trying to create a new one" ;\
+	        exit 1 ;\
+	    fi ;\
+	    origdirname="zenoss-$(VERSION)$(EXTRAVERSION)+r$$revision.orig" ;\
+	    packdir="$$packbase/$$origdirname" ;\
+	    if [ -d $$packdir ]; then \
+	        echo "$$packdir exists, please remove first" ;\
+	        exit 1 ;\
+	    fi ;\
+	\
+	echo "fetching the Zenoss source from svn" ;\
+	    if [ $(KEEP_UPSTREAM) -gt 0 ]; then \
+	        echo "   (keeping sources)" ;\
+	            if [ -d $$upstream/zenoss/.svn ]; then \
+	                svn up -r$$revision $$upstream/zenoss >/dev/null;\
+	            else \
+	                mkdir -p $$upstream ;\
+	                svn co -r$$revision $(ZENOSS_SVN) $$upstream/zenoss >/dev/null;\
+	            fi ;\
+	            svn export $$upstream/zenoss $$packdir ;\
+	    else \
+	        echo "   (not keeping sources)" ;\
+	        svn export -r$$revision $(ZENOSS_SVN) $$packdir ;\
+	    fi ;\
+	    pushd . >/dev/null ;\
+	    cd $$packdir ;\
+	\
+	echo "extracting needed external libs, removing the rest" ;\
+	    tar xfz inst/externallibs/PDIS-XPath-0.3.tar.gz ;\
+	    rm -rf inst/externallibs ;\
+	\
+	echo "removing what we don't want to have in the tarball" ;\
+	    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/ ;\
+            rm -f  Products/DataCollector/plugins/setignore.sh ;\
+	    rm -rf Products/Hotfix_20070320 ;\
+	    rm -rf wmi ;\
+	    rm -rf evtsys ;\
+	    rm -rf zenwin ;\
+	    rm -rf zenplugins ;\
+	    rm -rf pynetsnmp ;\
+	    rmdir test || echo "----> please fix: directory test not empty anymore!" ;\
+	    rm -rf inst/externallibs ;\
+	    rm -rf zendocs/Admin_Guide_1.0_Screens ;\
+	    rm -rf zendocs/Admin\ Guide\ 2.0/screens ;\
+	    rm -rf zendocs/Admin\ Guide\ 2.0/diagrams ;\
+	    rm -rf zendocs/QuickStartGuide-1.0 zendocs/ZenossQStart-1.0.pdf ;\
+	    find . -name .svnignore -print0 | xargs -0 rm -f ;\
+	    find . -name .cvsignore -print0 | xargs -0 rm -f ;\
+	    rm -f Products/ZenEvents/docs/rfc3164.txt ;\
+	\
+	echo "packaging the orig.tar.gz and cleaning up" ;\
+	    cd $$packdir/.. ;\
+	    tar cf - $$origdirname | gzip --best - > $$tarball ;\
+	    rm -rf $$origdirname ;\
+	    popd >/dev/null ;\
+	echo "tarball: $$packbase/$$tarball" ;\
+	echo "done."
 
 ##############################################################################
 




More information about the Pkg-zenoss-commits mailing list