[SCM] liblo packaging branch, master, updated. debian/0.26.repack-1-3-gd7016c2

js at users.alioth.debian.org js at users.alioth.debian.org
Tue Mar 2 01:54:30 UTC 2010


The following commit has been merged in the master branch:
commit 27ec7077f9d1d0e95b66f09456fc785da0b6aa5e
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Tue Mar 2 02:32:18 2010 +0100

    Use CDBS semi-automated build-dependency resolving.
    
    The following command refreshes debian/control:
    
      DEB_MAINTAINER_MODE=1 fakeroot debian/rules clean
    
    Double-check after each refresh!  Treat the automated build-dependencies
    only as suggestions: It is still your responsibility to maintain them,
    and you most probably want to document any changes in changelog anyway.
    
    package-relations.mk is included to cleanup duplicate depenencies. They
    technically do no harm but the poor cosmetics is frowned upon by some
    ftp-masters and possibly lintian too nowadays.
    
    This simple addition with no other changes revealed the following
    (unfortunately you dig out yourself the _reasons_ for the changes):
    
      Added: autotools-dev (to use up-to-date config.* files beneficial for
             exotic architectures)
    
      Tightened: cdbs (debhelper v7 is supported only since cdbs 0.4.53)
    
      Tightened: debhelper (one v7 feature is missing in 7.0.0)

diff --git a/debian/cdbs/1/rules/package-relations.mk b/debian/cdbs/1/rules/package-relations.mk
new file mode 100644
index 0000000..c241b0c
--- /dev/null
+++ b/debian/cdbs/1/rules/package-relations.mk
@@ -0,0 +1,70 @@
+# -*- mode: makefile; coding: utf-8 -*-
+# Copyright © 2008 Jonas Smedegaard <dr at jones.dk>
+# Description: Resolve, cleanup and apply package relationships
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
+
+_cdbs_scripts_path ?= /usr/lib/cdbs
+_cdbs_rules_path ?= /usr/share/cdbs/1/rules
+_cdbs_class_path ?= /usr/share/cdbs/1/class
+
+ifndef _cdbs_rules_package_relations
+_cdbs_rules_package_relations = 1
+
+include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
+
+# workaround for shell function choking on parens in regex
+leftparens = (
+
+# Merge build-dependencies on same packages
+# TODO: rewrite (in perl, probably) to be more generic
+CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.53)/ s/\bcdbs *\(,\|(>= \(0.4.23-1.1\|0.4.27\|0.4.39\|0.4.43\))\)/, /g')
+CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e 's/\bcdbs *\(,\|(>= \(0.4.23-1.1\|0.4.27\|0.4.39\|0.4.43\))\)/cdbs, /g')
+CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 7.0.1)/ s/\bdebhelper *\(,\|(>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\|5\|5.0.37.2\|5.0.44\|6\))\)/, /g')
+CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 6)/ s/\bdebhelper *\(,\|(>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\|5\|5.0.37.2\|5.0.44\))\)/, /g')
+CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 5.0.44)/ s/\bdebhelper *\(,\|(>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\|5\|5.0.37.2\))\)/, /g')
+CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e 's/\bdebhelper *\(,\|(>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\|5\|5.0.37.2\))\)/debhelper, /g')
+
+# Strip unversioned build-dependencies followed by same, versioned or not
+CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | perl -pe 's/((?<=\A)|(?<=,)) *(\w+) *,(?=([^,]*,)*? *\2 *(\$(leftparens)|,|\Z))//g')
+
+# Strip unversioned build-dependencies following same versioned
+CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | perl -pe 's/((?<=\A)|(?<=,))( *(\w+) +\$(leftparens)[^,]+,)(([^,]*,)*?) *\3 *((?=,)|(?=\Z))/\2\4/g')
+
+# TODO: Move these to buildcore.mk
+cdbs_curvar = $(or $($(1)_$(cdbs_curpkg)),$($1))
+cdbs_squash_commas = $(shell echo '$1' | sed -e 's/ *,[ ,]*/, /g' -e 's/^[ ,]*//' -e 's/[ ,]*$$//')
+
+# Cleanup superfluous commas and whitespace
+CDBS_BUILD_DEPENDS := $(call cdbs_squash_commas,$(CDBS_BUILD_DEPENDS))
+
+comma = ,
+cdbs_all_cur_squash_commas = $(call cdbs_squash_commas,$($(1)_ALL)$(comma) $(call cdbs_curvar,$1))
+
+# Apply CDBS-declared dependencies to binary packages
+$(patsubst %,binary-predeb/%,$(DEB_PACKAGES)) :: binary-predeb/%:
+	@echo 'Adding cdbs dependencies to debian/$(cdbs_curpkg).substvars'
+	@echo 'cdbs:Depends=$(call cdbs_all_cur_squash_commas,CDBS_DEPENDS)' >> debian/$(cdbs_curpkg).substvars
+	@echo 'cdbs:Pre-Depends=$(call cdbs_all_cur_squash_commas,CDBS_PREDEPENDS)' >> debian/$(cdbs_curpkg).substvars
+	@echo 'cdbs:Recommends=$(call cdbs_all_cur_squash_commas,CDBS_RECOMMENDS)' >> debian/$(cdbs_curpkg).substvars
+	@echo 'cdbs:Suggests=$(call cdbs_all_cur_squash_commas,CDBS_SUGGESTS)' >> debian/$(cdbs_curpkg).substvars
+	@echo 'cdbs:Breaks=$(call cdbs_all_cur_squash_commas,CDBS_BREAKS)' >> debian/$(cdbs_curpkg).substvars
+	@echo 'cdbs:Provides=$(call cdbs_all_cur_squash_commas,CDBS_PROVIDES)' >> debian/$(cdbs_curpkg).substvars
+	@echo 'cdbs:Replaces=$(call cdbs_all_cur_squash_commas,CDBS_REPLACES)' >> debian/$(cdbs_curpkg).substvars
+	@echo 'cdbs:Conflicts=$(call cdbs_all_cur_squash_commas,CDBS_CONFLICTS)' >> debian/$(cdbs_curpkg).substvars
+	@echo 'cdbs:Enhances=$(call cdbs_all_cur_squash_commas,CDBS_ENHANCES)' >> debian/$(cdbs_curpkg).substvars
+
+endif
diff --git a/debian/control b/debian/control.in
similarity index 98%
copy from debian/control
copy to debian/control.in
index 9967235..dbdff08 100644
--- a/debian/control
+++ b/debian/control.in
@@ -1,8 +1,7 @@
 Source: liblo
 Priority: optional
 Section: libs
-Build-Depends: debhelper (>= 7.0.0),
-               cdbs,
+Build-Depends: @cdbs@,
                dh-buildinfo,
                doxygen
 Homepage: http://liblo.sourceforge.net/
diff --git a/debian/rules b/debian/rules
index c83f807..53ea62f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -31,3 +31,6 @@ get-orig-source:
 	cd temp-pack && tar -czf $(ORIG_TARBALL) liblo-$(DEB_UPSTREAM_VERSION)
 	mv temp-pack/$(ORIG_TARBALL) .
 	rm -r temp-pack
+
+# Resolve, cleanup and apply CDBS-declared dependencies
+include debian/cdbs/1/rules/package-relations.mk

-- 
liblo packaging



More information about the pkg-multimedia-commits mailing list