r30074 - in /trunk/libconfig-inifiles-perl/debian: cdbs/1/rules/package-relations.mk changelog rules

js at users.alioth.debian.org js at users.alioth.debian.org
Sat Jan 24 21:13:07 UTC 2009


Author: js
Date: Sat Jan 24 21:13:04 2009
New Revision: 30074

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=30074
Log:
Move dependency cleanup to new local snippet package-relations.mk.

Added:
    trunk/libconfig-inifiles-perl/debian/cdbs/1/rules/package-relations.mk
Modified:
    trunk/libconfig-inifiles-perl/debian/changelog
    trunk/libconfig-inifiles-perl/debian/rules

Added: trunk/libconfig-inifiles-perl/debian/cdbs/1/rules/package-relations.mk
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-inifiles-perl/debian/cdbs/1/rules/package-relations.mk?rev=30074&op=file
==============================================================================
--- trunk/libconfig-inifiles-perl/debian/cdbs/1/rules/package-relations.mk (added)
+++ trunk/libconfig-inifiles-perl/debian/cdbs/1/rules/package-relations.mk Sat Jan 24 21:13:04 2009
@@ -1,0 +1,50 @@
+# -*- 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)
+
+# 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.43)/ s/ *,* *\bcdbs (>= \(0.4.23-1.1\|0.4.27\|0.4.39\)) *,* */, /g')
+CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.39)/ s/ *,* *\bcdbs (>= \(0.4.23-1.1\|0.4.27\)) *,* */, /g')
+CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.27)/ s/ *,* *\bcdbs (>= \(0.4.23-1.1\)) *,* */, /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 '/\bdebhelper (>= 5.0.37.2)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\|5\)) *,* */, /g')
+CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 5)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\|4.2.21\|4.2.28\)) *,* */, /g')
+CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 4.2.28)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\|4.2.21\)) *,* */, /g')
+CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 4.2.21)/ s/ *,* *\bdebhelper (>= \(4.1.60\|4.2.0\)) *,* */, /g')
+CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bdebhelper (>= 4.2.0)/ s/ *,* *\bdebhelper (>= \(4.1.60\)) *,* */, /g')
+
+# Cleanup superfluous commas
+CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e 's/ *,/,/g' -e 's/^ *, *//' -e 's/ *, *$$//')
+
+# Apply CDBS-declared dependencies to binary packages
+$(patsubst %,binary-predeb/%,$(DEB_PACKAGES)) :: binary-predeb/%:
+	echo 'cdbs:Depends=$(CDBS_DEPENDS_ALL), $(or $(CDBS_DEPENDS_$(cdbs_curpkg)),$(CDBS_DEPENDS))' \
+	  | sed -e 's/ *,/,/g' -e 's/^ *, *//' -e 's/ *, *$$//' \
+	  >> debian/$(cdbs_curpkg).substvars
+
+endif

Modified: trunk/libconfig-inifiles-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-inifiles-perl/debian/changelog?rev=30074&op=diff
==============================================================================
--- trunk/libconfig-inifiles-perl/debian/changelog (original)
+++ trunk/libconfig-inifiles-perl/debian/changelog Sat Jan 24 21:13:04 2009
@@ -10,6 +10,7 @@
     + Simplify internal variables
     + Ignore no files by default in copyright-check.mk
     + Correct and update copyright hints of the snippets themselves
+    + Move dependency cleanup to new local snippet package-relations.mk.
   * Update debian/copyright and copyright hints:
     + Rewrite debian/copyright using new file format, version 428
     + Add info on CDBS snippets (new owners, no new licenses)

Modified: trunk/libconfig-inifiles-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libconfig-inifiles-perl/debian/rules?rev=30074&op=diff
==============================================================================
--- trunk/libconfig-inifiles-perl/debian/rules (original)
+++ trunk/libconfig-inifiles-perl/debian/rules Sat Jan 24 21:13:04 2009
@@ -25,5 +25,5 @@
 # in debian-installer.
 DEB_DH_PERL_ARGS = -d
 
-# Fix double cdbs build-dependencies
-CDBS_BUILD_DEPENDS := $(shell echo '$(CDBS_BUILD_DEPENDS)' | sed -e '/\bcdbs (>= 0.4.39)/ s/ *,* *\bcdbs (>= \(0.4.23-1.1\)) *,* */, /g' -e 's/^ *, *//' -e 's/ *, *$$//')
+# Resolve, cleanup and apply CDBS-declared dependencies
+include debian/cdbs/1/rules/package-relations.mk




More information about the Pkg-perl-cvs-commits mailing list