[Fusionforge-commits] r14528 - trunk

Christian Bayle cbayle at fusionforge.org
Sun Oct 2 21:08:42 CEST 2011


Author: cbayle
Date: 2011-10-02 21:08:42 +0200 (Sun, 02 Oct 2011)
New Revision: 14528

Modified:
   trunk/Makefile.debian
Log:
Remove Warning, add support for PKGURL


Modified: trunk/Makefile.debian
===================================================================
--- trunk/Makefile.debian	2011-10-02 18:56:58 UTC (rev 14527)
+++ trunk/Makefile.debian	2011-10-02 19:08:42 UTC (rev 14528)
@@ -14,7 +14,7 @@
 
 FUSIONFORGE=FusionForge
 PKGDIR=src
-PKGNAME:=$(shell head -1 $(PKGDIR)/debian/changelog | sed 's/ .*//')
+PKGNAME:=$(shell [ ! -f $(PKGDIR)/debian/changelog ] || head -1 $(PKGDIR)/debian/changelog | sed 's/ .*//')
 PKGLETTER:=$(shell echo $(PKGNAME) | cut -c1)
 ORIGIN=debian.fusionforge.org
 # BRANCH set to 'svn' if checkout from trunk or 'brc' otherwise
@@ -83,7 +83,7 @@
 ASKPASS=--ask-passphrase
 ASKPASS=
 
-MAJOR:=$(shell dpkg-parsechangelog -l$(PKGDIR)/debian/changelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
+MAJOR:=$(shell [ ! -f $(PKGDIR)/debian/changelog ] || dpkg-parsechangelog -l$(PKGDIR)/debian/changelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
 # SMAJOR is MAJOR without epoch if any
 SMAJOR:=$(shell echo $(MAJOR) | sed 's/^.://')
 
@@ -306,11 +306,15 @@
 
 $(BUILDFILES)/$(DSCFILE):
 	@echo "================> Have to cowbuild $@ <=================="
-	cd $(PKGDIR) ; debclean
-	find $(PKGDIR) -type f -or -type l | grep -v '/CVS/' | \
-		grep -v '/.svn/' | grep -v '/.testbox/' | \
-		grep -v rpm-specific | grep -v docs/phpdoc/docs | \
-		grep -v ^./debian/ | cpio -pdumB $(BUILDFILES)/
+	if [ -z "$(PKGURL)" ] ; then \
+		(cd $(PKGDIR) ; debclean) ; \
+		find $(PKGDIR) -type f -or -type l | grep -v '/CVS/' | \
+			grep -v '/.svn/' | grep -v '/.testbox/' | \
+			grep -v rpm-specific | grep -v docs/phpdoc/docs | \
+			grep -v ^./debian/ | cpio -pdumB $(BUILDFILES)/ ; \
+	else \
+		(cd $(BUILDFILES) ; dget -x $(PKGURL)) ; \
+	fi
 	# Set version for given distrib
 	cd $(BUILDFILES)/$(PKGDIR); dch -b -v $(MAJOR)$(MINOR) -D UNRELEASED "This is $(DISTRIB)-$(ARCH) autobuild"
 	perl -pi -e "s/UNRELEASED/$(DISTRIB)/" $(BUILDFILES)/$(PKGDIR)/debian/changelog




More information about the Fusionforge-commits mailing list