[Cdd-commits] r581 - in cdd/trunk/cdd: debian devtools examples
CDD Subversion Commit
noreply at alioth.debian.org
Sun Mar 2 11:52:38 UTC 2008
Author: tille
Date: Sun Mar 2 11:52:34 2008
New Revision: 581
Modified:
cdd/trunk/cdd/debian/changelog
cdd/trunk/cdd/debian/rules
cdd/trunk/cdd/devtools/Makefile
cdd/trunk/cdd/devtools/rules
cdd/trunk/cdd/examples/Makefile
Log:
First atempt to solve problems of building debian/control files at package build time
Modified: cdd/trunk/cdd/debian/changelog
==============================================================================
--- cdd/trunk/cdd/debian/changelog (original)
+++ cdd/trunk/cdd/debian/changelog Sun Mar 2 11:52:34 2008
@@ -1,10 +1,19 @@
-cdd (0.4.9) unstable; urgency=low
+cdd (0.5.0) unstable; urgency=low
* Add Depends: apt to cdd-dev package
Closes: #467650
* Removed VERSION file (which is hard to maintain) and
teach debian/rules to obtain version from debian/changelog
to build dist target
+ * devtools/rules:
+ - Added dist target to build source distribution tarball
+ * debian/rules:
+ several fixes to make use of make variables instead of
+ shell variables
+ * The source tarball of a CDD is now builded with prebuilded
+ debian/control file and is not rebuilded per package build
+ process.
+ Closes: #468346, #468345
-- Andreas Tille <tille at debian.org> Thu, 28 Feb 2008 14:19:57 +0100
Modified: cdd/trunk/cdd/debian/rules
==============================================================================
--- cdd/trunk/cdd/debian/rules (original)
+++ cdd/trunk/cdd/debian/rules Sun Mar 2 11:52:34 2008
@@ -7,6 +7,9 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+VERSION := $(shell grep '^cdd *(.\+)' debian/changelog | head -n 1 | sed 's/^cdd \+(\(.\+\)) .*/\1/' )
+DISTDIR := cdd-$(VERSION)
+
build: build-stamp
build-stamp:
dh_testdir
@@ -58,21 +61,20 @@
echo "File debian/changelog is missing. Something is wrong!" ; \
exit -1 ; \
fi
- VERSION=`grep "^cdd (.\+)" debian/changelog | head -n 1 | sed 's/^cdd *(\([^)]\+\)).*/\1/'` ; \
- if [ "$${VERSION}" = "" ] ; then \
+ if [ "$(VERSION)" = "" ] ; then \
echo "Unable to obtain version number from debian/changelog. Something is wrong!" ; \
exit -1 ; \
- fi ; \
- distdir=cdd-$${VERSION} ; \
- rm -rf $${distdir} ; \
- mkdir $${distdir} ; \
- chmod 777 $${distdir} ; \
- rsync -a --exclude $${distdir} --exclude CVS --exclude .svn --exclude svn-commit.tmp * $${distdir} ; \
- ln -sf sources.list.unstable $${distdir}/sources.list ; \
- # ln -s control.stub $${distdir}/examples/debian/control ; \
- rm -f `find . -name "*~"` ; \
- GZIP=-9 tar -czf ../cdd_$${VERSION}.tar.gz $${distdir} ; \
- rm -rf $${distdir}
+ fi ;
+ rm -rf $(DISTDIR)
+ mkdir $(DISTDIR)
+ chmod 777 $(DISTDIR)
+ rsync -a --exclude $(DISTDIR) --exclude CVS --exclude .svn --exclude svn-commit.tmp * $(DISTDIR)
+ ln -sf sources.list.unstable $(DISTDIR)/sources.list
+ # ln -s control.stub $(DISTDIR)/examples/debian/control
+ rm -f `find . -name "*~"`
+ GZIP=-9 tar -czf ../cdd_$(VERSION).tar.gz $(DISTDIR)
+ rm -rf $(DISTDIR)
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
+
Modified: cdd/trunk/cdd/devtools/Makefile
==============================================================================
--- cdd/trunk/cdd/devtools/Makefile (original)
+++ cdd/trunk/cdd/devtools/Makefile Sun Mar 2 11:52:34 2008
@@ -47,3 +47,6 @@
rm -f tasks/*~
rm -rf tasksel
rm -f packages.txt by_vote packages-sorted.txt
+
+dist: $(CDD)-tasks.desc debian/control
+ make -f debian/rules dist
Modified: cdd/trunk/cdd/devtools/rules
==============================================================================
--- cdd/trunk/cdd/devtools/rules (original)
+++ cdd/trunk/cdd/devtools/rules Sun Mar 2 11:52:34 2008
@@ -11,6 +11,9 @@
CDDMKFILE := /usr/share/cdd-dev/Makefile
CDD_INSTALL_HELPER := /usr/share/cdd-dev/cdd-install-helper
+VERSION := $(shell grep '^$(CDDNAME) *(.\+)' debian/changelog | head -n 1 | sed 's/^$(CDDNAME) \+(\(.\+\)) .*/\1/' )
+DISTDIR := $(CDDNAME)-$(VERSION)
+
all:
echo $(PREFIX), $(CDDNAME)
@@ -19,11 +22,14 @@
debian/control:
$(MAKE) -f $(CDDMKFILE) debian/control
+$(CDD)-tasks.desc:
+ $(MAKE) -f $(CDDMKFILE) $(CDD)-tasks.desc
+
build:
$(MAKE) -f $(CDDMKFILE) all
dh_testdir
-clean: debian/control
+clean:
dh_testdir
dh_testroot
$(MAKE) -f $(CDDMKFILE) clean
@@ -47,7 +53,24 @@
dh_clean build-stamp
-install: debian/control build
+dist: $(CDD)-tasks.desc debian/control
+ if [ ! -f debian/changelog ] ; then \
+ echo "File debian/changelog is missing. Something is wrong!" ; \
+ exit -1 ; \
+ fi
+ if [ "$(VERSION)" = "" ] ; then \
+ echo "Unable to obtain version number from debian/changelog. Something is wrong!" ; \
+ exit -1 ; \
+ fi ;
+ rm -rf $(DISTDIR)
+ mkdir $(DISTDIR)
+ chmod 777 $(DISTDIR)
+ rsync -a --exclude $(DISTDIR) --exclude CVS --exclude .svn --exclude svn-commit.tmp * $(DISTDIR)
+ rm -f `find . -name "*~"`
+ GZIP=-9 tar -czf ../$(CDDNAME)_$(VERSION).tar.gz $(DISTDIR)
+ rm -rf $(DISTDIR)
+
+install: build
dh_testdir
dh_testroot
dh_clean -k
@@ -112,4 +135,4 @@
dh_builddeb -i
binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure debian/control
+.PHONY: build clean binary-indep binary-arch binary install configure debian/control dist
Modified: cdd/trunk/cdd/examples/Makefile
==============================================================================
--- cdd/trunk/cdd/examples/Makefile (original)
+++ cdd/trunk/cdd/examples/Makefile Sun Mar 2 11:52:34 2008
@@ -1,3 +1,13 @@
#!/usr/bin/make -f
-include /usr/share/cdd-dev/Makefile
+CDDMAKEFILE=/usr/share/cdd-dev/Makefile
+
+CheckCDDMakefile := $(shell if [ -e $(CDDMAKEFILE) ] ; then echo 1 ; else echo 0 ; fi)
+ifeq ($(CheckCDDMakefile),1)
+ include $(CDDMAKEFILE)
+else
+ err := $(shell echo "$(CDDMAKEFILE) is missing. Please install cdd-dev package!")
+endif
+
+dummy:
+ @echo $(err)
More information about the Cdd-commits
mailing list