diff options
author | Jonas Smedegaard <dr@jones.dk> | 2008-08-07 18:39:00 (GMT) |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2008-08-07 18:39:00 (GMT) |
commit | 828d7f9c851cc0961ec7eb28b05ac9f2842c1263 (patch) | |
tree | 862c7ab3a76218efeea876e8ef9a4be3ea032501 | |
parent | 95b8a03d5edbb2d49b5d28ddebf13772813f955a (diff) |
Update cdbs, dependencies and copyright-hints.
* Update local cdbs snippets:
+ Restructure output of copyright-check.mk to match new proposed
copyright-format at
http://wiki.debian.org/Proposals/CopyrightFormat .
+ Improved multiflavor handling in makefile and autotools snippets.
+ Add new local package-relations.mk to merge duplicate
build-dependencies and more. Drop cleanup in debian/rules.
+ Update README.cdbs-tweaks.
-rw-r--r-- | debian/README.cdbs-tweaks | 17 | ||||
-rw-r--r-- | debian/cdbs/1/class/autotools-vars.mk | 2 | ||||
-rw-r--r-- | debian/cdbs/1/class/autotools.mk | 26 | ||||
-rw-r--r-- | debian/cdbs/1/class/makefile-vars.mk | 14 | ||||
-rw-r--r-- | debian/cdbs/1/class/makefile.mk | 56 | ||||
-rw-r--r-- | debian/cdbs/1/rules/copyright-check.mk | 26 | ||||
-rw-r--r-- | debian/cdbs/1/rules/package-relations.mk | 50 | ||||
-rw-r--r-- | debian/changelog | 8 | ||||
-rw-r--r-- | debian/copyright_hints | 192 | ||||
-rwxr-xr-x | debian/rules | 2 |
10 files changed, 324 insertions, 69 deletions
diff --git a/debian/README.cdbs-tweaks b/debian/README.cdbs-tweaks index 5880b2f..6130d0f 100644 --- a/debian/README.cdbs-tweaks +++ b/debian/README.cdbs-tweaks @@ -69,6 +69,13 @@ Handle packaging of Sugar activities. +New perl-build class +-------------------- + +Handle Perl modules using Module::Build. + + + New copyright-check rule ------------------------ @@ -84,6 +91,16 @@ Small wrapper around dh-kpatches, taking care of build-dependencies too. +New package-relations rule +-------------------------- + +Improved build-dependency handling (merging multiple dependencies on +same packages), and add dependency handling for binary packages (to ease +maintaining identical build-dependencies and dependencies for eg. Perl +modules meeding runtime stuff for buildtime tests). + + + New routines for handling upstream tarball ------------------------------------------ diff --git a/debian/cdbs/1/class/autotools-vars.mk b/debian/cdbs/1/class/autotools-vars.mk index 4b6de38..87e3a3c 100644 --- a/debian/cdbs/1/class/autotools-vars.mk +++ b/debian/cdbs/1/class/autotools-vars.mk @@ -28,7 +28,7 @@ _cdbs_class_autotools_vars = 1 #include $(_cdbs_class_path)/makefile.mk$(_cdbs_makefile_suffix) include debian/cdbs/1/class/makefile.mk -DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(DEB_DESTDIR) +DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(cdbs_curpkgdestdir) DEB_MAKE_CLEAN_TARGET = distclean #DEB_MAKE_CHECK_TARGET = check diff --git a/debian/cdbs/1/class/autotools.mk b/debian/cdbs/1/class/autotools.mk index bcff6e4..98850d7 100644 --- a/debian/cdbs/1/class/autotools.mk +++ b/debian/cdbs/1/class/autotools.mk @@ -28,32 +28,28 @@ _cdbs_class_autotools = 1 include debian/cdbs/1/class/autotools-vars.mk include $(_cdbs_class_path)/autotools-files.mk$(_cdbs_makefile_suffix) -cdbs_autotools_configure_stamps = $(if $(DEB_MAKE_FLAVORS),$(cdbs_make_builddir_check)$(patsubst %,debian/stamp-autotools-configure/%,$(DEB_MAKE_FLAVORS)),debian/stamp-autotools-configure) +cdbs_configure_stamps = $(if $(cdbs_make_multibuilds),$(cdbs_make_builddir_check)$(patsubst %,debian/stamp-autotools/%,$(cdbs_make_multibuilds)),debian/stamp-autotools) # Overriden from makefile-vars.mk. We pass CFLAGS and friends to ./configure, so # no need to pass them to make. DEB_MAKE_INVOKE = $(DEB_MAKE_ENVVARS) $(MAKE) -C $(cdbs_make_curbuilddir) pre-build:: - $(if $(DEB_MAKE_FLAVORS),mkdir -p debian/stamp-autotools-configure) + $(if $(cdbs_make_multibuilds),mkdir -p debian/stamp-autotools) common-configure-arch common-configure-indep:: common-configure-impl -common-configure-impl:: $(cdbs_autotools_configure_stamps) -$(cdbs_autotools_configure_stamps): +common-configure-impl:: $(cdbs_configure_stamps) +$(cdbs_configure_stamps): chmod a+x $(DEB_CONFIGURE_SCRIPT) - mkdir -p $(cdbs_make_curbuilddir) - $(DEB_CONFIGURE_INVOKE) $(cdbs_autotools_flags) $(DEB_CONFIGURE_EXTRA_FLAGS) $(DEB_CONFIGURE_USER_FLAGS) + $(if $(call cdbs_streq,$(cdbs_make_curbuilddir),$(DEB_BUILDDIR_$(cdbs_curpkg))),,mkdir -p $(cdbs_make_curbuilddir)) + $(DEB_CONFIGURE_INVOKE) $(cdbs_configure_flags) $(DEB_CONFIGURE_EXTRA_FLAGS) $(DEB_CONFIGURE_USER_FLAGS) $(if $(filter post,$(DEB_AUTO_UPDATE_LIBTOOL)),if [ -e $(cdbs_make_curbuilddir)/libtool ]; then cp -f /usr/bin/libtool $(cdbs_make_curbuilddir)/libtool; fi) touch $@ -cleanbuilddir:: $(patsubst %,cleanbuilddir/%,$(DEB_MAKE_FLAVORS)) - rm -rf debian/stamp-autotools-configure - -DEB_PHONY_RULES += $(patsubst %,cleanbuilddir/%,$(DEB_MAKE_FLAVORS)) -$(patsubst %,cleanbuilddir/%,$(DEB_MAKE_FLAVORS)):: - -rmdir $(cdbs_make_curbuilddir) -# FIXME: Avoid force-removing! -# -rm -rf $(cdbs_make_curbuilddir) - rm -f debian/stamp-autotools-configure/$(cdbs_make_curflavor) +makefile-clean:: + $(if $(cdbs_make_multibuilds),-rmdir --ignore-fail-on-non-empty debian/stamp-autotools,rm -f debian/stamp-autotools) +$(cdbs_make_clean_nonstamps):: + $(if $(call cdbs_streq,$(cdbs_make_curbuilddir),$(DEB_BUILDDIR_$(cdbs_curpkg))),,-rmdir --ignore-fail-on-non-empty $(cdbs_make_curbuilddir)) + $(if $(cdbs_make_multibuilds),rm -f $(@:makefile-clean%=debian/stamp-autotools%)) endif diff --git a/debian/cdbs/1/class/makefile-vars.mk b/debian/cdbs/1/class/makefile-vars.mk index 1719791..d731493 100644 --- a/debian/cdbs/1/class/makefile-vars.mk +++ b/debian/cdbs/1/class/makefile-vars.mk @@ -42,6 +42,8 @@ DEB_MAKE_BUILD_TARGET = $(DEB_BUILD_MAKE_TARGET) # looks like: install DESTDIR=$(DEB_DESTDIR) # If you're using automake though, you likely want to be including autotools.mk instead # of this file. +# For multi-flavored builds (see below) installed per-flavor, it looks like this: +# install DESTDIR=$(cdbs_curpkgdestdir) # This variable is deprecated. DEB_CLEAN_MAKE_TARGET = clean @@ -57,8 +59,14 @@ _cdbs_deprecated_vars += DEB_MAKE_TEST_TARGET # New in 0.4.2. DEB_MAKE_CHECK_TARGET = $(DEB_MAKE_TEST_TARGET) -# NB! This needs to be declared _before_ including makefile -#DEB_MAKE_FLAVORS = -DEB_MAKE_FLAVORS_BUILDDIRSKEL = $(DEB_BUILDDIR)/@FLAVOR@ +# If DEB_MAKE_FLAVORS is set compilation is done once per flavor. +# NB! This must be declared _before_ including makefile.mk +#DEB_MAKE_FLAVORS = light normal enhanced + +# If building multiple flavors, skeleton strings are used for +# DEB_BUILDDIR and DEB_DESTDIR, with @FLAVOR@ expanding to actual +# flavor. +DEB_MAKE_BUILDDIRSKEL = $(cdbs_curpkgbuilddir)/@FLAVOR@ +DEB_MAKE_DESTDIRSKEL = $(cdbs_curpkgdestdir)/@FLAVOR@ endif diff --git a/debian/cdbs/1/class/makefile.mk b/debian/cdbs/1/class/makefile.mk index 7f931ec..2f4e98f 100644 --- a/debian/cdbs/1/class/makefile.mk +++ b/debian/cdbs/1/class/makefile.mk @@ -29,51 +29,55 @@ include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix) #include $(_cdbs_class_path)/makefile-vars.mk$(_cdbs_makefile_suffix) include debian/cdbs/1/class/makefile-vars.mk -DEB_PHONY_RULES += makefile-clean - -# TODO: Move this to buildvars.mk +# TODO: Move these to buildcore.mk cdbs_curpkgbuilddir = $(if $(DEB_BUILDDIR_$(cdbs_curpkg)),$(DEB_BUILDDIR_$(cdbs_curpkg)),$(DEB_BUILDDIR)) - +cdbs_curpkgdestdir = $(if $(DEB_DESTDIR_$(cdbs_curpkg)),$(DEB_DESTDIR_$(cdbs_curpkg)),$(DEB_DESTDIR)) + +cdbs_make_multibuilds = $(sort $(DEB_MAKE_FLAVORS)) cdbs_make_builddir_check = $(if $(call cdbs_streq,$(DEB_BUILDDIR),$(DEB_SRCDIR)),$(error DEB_MAKE_FLAVORS in use: DEB_BUILDDIR must be different from DEB_SRCDIR, and needs to be declared before including makefile.mk)) -cdbs_make_build_targets = $(if $(DEB_MAKE_FLAVORS),$(cdbs_make_builddir_check)$(patsubst %,debian/stamp-makefile-build/%,$(DEB_MAKE_FLAVORS)),debian/stamp-makefile-build) -cdbs_make_install_targets = $(if $(DEB_MAKE_FLAVORS),$(cdbs_make_builddir_check)$(patsubst %,debian/stamp-makefile-install/%,$(DEB_MAKE_FLAVORS)),debian/stamp-makefile-install) -cdbs_make_check_targets = $(if $(DEB_MAKE_FLAVORS),$(cdbs_make_builddir_check)$(patsubst %,debian/stamp-makefile-check/%,$(DEB_MAKE_FLAVORS)),debian/stamp-makefile-check) -cdbs_make_clean_targets = $(if $(DEB_MAKE_CLEAN_TARGET),$(if $(DEB_MAKE_FLAVORS),$(patsubst %,makefile-clean/%,$(DEB_MAKE_FLAVORS)),makefile-clean)) -cdbs_make_curflavor = $(notdir $@) -cdbs_make_curbuilddir = $(if $(DEB_MAKE_FLAVORS),$(subst @FLAVOR@,$(cdbs_make_curflavor),$(DEB_MAKE_FLAVORS_BUILDDIRSKEL)),$(cdbs_curpkgbuilddir)) +cdbs_make_build_stamps = $(if $(cdbs_make_multibuilds),$(cdbs_make_builddir_check)$(patsubst %,debian/stamp-makefile-build/%,$(cdbs_make_multibuilds)),debian/stamp-makefile-build) +cdbs_make_install_stamps = $(if $(cdbs_make_multibuilds),$(cdbs_make_builddir_check)$(patsubst %,debian/stamp-makefile-install/%,$(cdbs_make_multibuilds)),debian/stamp-makefile-install) +cdbs_make_check_stamps = $(if $(cdbs_make_multibuilds),$(cdbs_make_builddir_check)$(patsubst %,debian/stamp-makefile-check/%,$(cdbs_make_multibuilds)),debian/stamp-makefile-check) +cdbs_make_clean_nonstamps = $(if $(cdbs_make_multibuilds),$(patsubst %,makefile-clean/%,$(cdbs_make_multibuilds)),makefile-clean) +cdbs_make_curflavor = $(filter-out %/,$(subst /,/ ,$@)) +cdbs_make_curbuilddir = $(if $(cdbs_make_multibuilds),$(subst @FLAVOR@,$(cdbs_make_curflavor),$(DEB_MAKE_BUILDDIRSKEL)),$(cdbs_curpkgbuilddir)) + +DEB_PHONY_RULES += makefile-clean $(cdbs_make_clean_nonstamps) pre-build:: - $(if $(DEB_MAKE_FLAVORS),mkdir -p debian/stamp-makefile-build debian/stamp-makefile-install) - $(if $(and $(DEB_MAKE_FLAVORS),$(DEB_MAKE_CHECK_TARGET)),mkdir -p debian/stamp-makefile-check) + $(if $(cdbs_make_multibuilds),mkdir -p debian/stamp-makefile-build debian/stamp-makefile-install) + $(and $(cdbs_make_multibuilds),$(not $(findstring nocheck,$(DEB_BUILD_OPTIONS))),$(DEB_MAKE_CHECK_TARGET),mkdir -p debian/stamp-makefile-check) -common-build-arch common-build-indep:: $(cdbs_make_build_targets) -$(cdbs_make_build_targets): +common-build-arch common-build-indep:: $(cdbs_make_build_stamps) +$(cdbs_make_build_stamps): +$(DEB_MAKE_INVOKE) $(DEB_MAKE_BUILD_TARGET) touch $@ cleanbuilddir:: makefile-clean -makefile-clean:: $(cdbs_make_clean_targets) - $(if $(DEB_MAKE_CLEAN_TARGET),,@echo "DEB_MAKE_CLEAN_TARGET unset, not running clean") - rm -rf debian/stamp-makefile-build debian/stamp-makefile-install +makefile-clean:: $(if $(cdbs_make_multibuilds),$(cdbs_make_clean_nonstamps)) + $(if $(cdbs_make_multibuilds),-rmdir --ignore-fail-on-non-empty debian/stamp-makefile-build debian/stamp-makefile-install,rm -f debian/stamp-makefile-build debian/stamp-makefile-install) -DEB_PHONY_RULES += makefile-clean $(cdbs_make_clean_targets) -$(cdbs_make_clean_targets):: - +-$(DEB_MAKE_INVOKE) -k $(DEB_MAKE_CLEAN_TARGET) +$(cdbs_make_clean_nonstamps):: + $(if $(DEB_MAKE_CLEAN_TARGET),+-$(DEB_MAKE_INVOKE) -k $(DEB_MAKE_CLEAN_TARGET),@echo "DEB_MAKE_CLEAN_TARGET unset, not running clean") + $(if $(cdbs_make_multibuilds),rm -f $(@:makefile-clean%=debian/stamp-makefile-build%) $(@:makefile-clean%=debian/stamp-makefile-install%)) common-install-arch common-install-indep:: common-install-impl -common-install-impl:: $(cdbs_make_install_targets) -$(cdbs_make_install_targets): +common-install-impl:: $(cdbs_make_install_stamps) +$(cdbs_make_install_stamps):: $(if $(DEB_MAKE_INSTALL_TARGET),+$(DEB_MAKE_INVOKE) $(DEB_MAKE_INSTALL_TARGET),@echo "DEB_MAKE_INSTALL_TARGET unset, skipping default makefile.mk common-install target") $(if $(DEB_MAKE_INSTALL_TARGET),touch $@) ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) -common-build-arch common-build-indep:: $(cdbs_make_check_targets) -$(cdbs_make_check_targets) : debian/stamp-makefile-check% : debian/stamp-makefile-build% +common-build-arch common-build-indep:: $(cdbs_make_check_stamps) +$(cdbs_make_check_stamps) : debian/stamp-makefile-check% : debian/stamp-makefile-build% $(if $(DEB_MAKE_CHECK_TARGET),+$(DEB_MAKE_INVOKE) $(DEB_MAKE_CHECK_TARGET),@echo "DEB_MAKE_CHECK_TARGET unset, not running checks") $(if $(DEB_MAKE_CHECK_TARGET),touch $@) -clean:: - rm -rf debian/stamp-makefile-check +makefile-clean:: + $(if $(DEB_MAKE_CHECK_TARGET),rm -f debian/stamp-makefile-check) + +$(cdbs_make_clean_nonstamps):: + $(if $(cdbs_make_multibuilds),rm -f $(@:makefile-clean%=debian/stamp-makefile-check%)) endif endif diff --git a/debian/cdbs/1/rules/copyright-check.mk b/debian/cdbs/1/rules/copyright-check.mk index 645363b..d96681a 100644 --- a/debian/cdbs/1/rules/copyright-check.mk +++ b/debian/cdbs/1/rules/copyright-check.mk @@ -28,6 +28,9 @@ include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix) CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), devscripts (>= 2.10.7) +# Set to yes to fail on changed/new hints are found +#DEB_COPYRIGHT_CHECK_STRICT := yes + # Single regular expression for files to include or ignore DEB_COPYRIGHT_CHECK_REGEX = .* DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^(debian/.*|(.*/)?config\.(guess|sub|rpath)(\..*)?)$ @@ -35,13 +38,17 @@ DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^(debian/.*|(.*/)?config\.(guess|sub|rpath)(\ pre-build:: debian/stamp-copyright-check debian/stamp-copyright-check: - @echo 'Scanning upstream source for new/changed copyright notices (except debian subdir!)...' + @echo 'Scanning upstream source for new/changed copyright notices...' + @echo licensecheck -c '$(DEB_COPYRIGHT_CHECK_REGEX)' -r --copyright -i '$(DEB_COPYRIGHT_CHECK_IGNORE_REGEX)' * \ + "| some-output-filtering..." # Perl in shell in make requires extra care: # * Single-quoting ('...') protects against shell expansion # * Double-dollar ($$) expands to plain dollar ($) in make - licensecheck -c '$(DEB_COPYRIGHT_CHECK_REGEX)' -r --copyright -i '$(DEB_COPYRIGHT_CHECK_IGNORE_REGEX)' * \ + @licensecheck -c '$(DEB_COPYRIGHT_CHECK_REGEX)' -r --copyright -i '$(DEB_COPYRIGHT_CHECK_IGNORE_REGEX)' * \ | LC_ALL=C perl -e \ + 'print "Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=XXX\n";'\ + 'print "Upstream-Name: Untrusted draft - double-check copyrights yourself!\n\n";'\ '$$n=0; while (<>) {'\ ' s/[^[:print:]]//g;'\ ' if (/^([^:\s][^:]+):[\s]+(\S.*?)\s*$$/) {'\ @@ -56,8 +63,15 @@ debian/stamp-copyright-check: 'foreach $$file (@files) {'\ ' $$file->{license} =~ s/\s*\(with incorrect FSF address\)//;'\ ' $$file->{license} =~ s/\s+\(v([^)]+) or later\)/-$$1+/;'\ + ' $$file->{license} =~ s/\s*(\*No copyright\*)\s*// and $$file->{copyright} = $$1;'\ + ' $$file->{license} =~ s/^\s*(GENERATED FILE)/UNKNOWN ($$1)/;'\ + ' $$file->{license} =~ s/\s+(GENERATED FILE)/ ($$1)/;'\ ' $$file->{copyright} =~ s/(?<=(\b\d{4}))(?{$$y=$$^N})\s*[,-]\s*((??{$$y+1}))\b/-$$2/g;'\ ' $$file->{copyright} =~ s/(?<=\b\d{4})\s*-\s*\d{4}(?=\s*-\s*(\d{4})\b)//g;'\ + ' $$file->{copyright} =~ s/\b(\d{4})\s+([\S^\d])/$$1, $$2/g;'\ + ' $$file->{copyright} =~ s/^\W*\s+\/\s+//g;'\ + ' $$file->{copyright} =~ s/\s+\/\s+\W*$$//;'\ + ' $$file->{copyright} =~ s/\s+\/\s+/\n\t/g;'\ ' $$pattern = "$$file->{license} [$$file->{copyright}]";'\ ' push @{ $$patternfiles{"$$pattern"} }, $$file->{name};'\ '};'\ @@ -66,7 +80,10 @@ debian/stamp-copyright-check: ' ||'\ ' $$a cmp $$b'\ ' } keys %patternfiles ) {'\ - ' print "$$pattern: ", join("\n\t", sort @{ $$patternfiles{$$pattern} }), "\n";'\ + ' ($$license, $$copyright) = $$pattern =~ /(.*) \[(.*)\]/s;'\ + ' print "Files: ", join("\n\t", sort @{ $$patternfiles{$$pattern} }), "\n";'\ + ' print "Copyright: $$copyright\n";'\ + ' print "License: $$license\n\n";'\ '};'\ > debian/copyright_newhints @patterncount="`cat debian/copyright_newhints | sed 's/^[^:]*://' | LANG=C sort -u | grep . -c -`"; \ @@ -74,13 +91,14 @@ debian/stamp-copyright-check: @if [ ! -f debian/copyright_hints ]; then touch debian/copyright_hints; fi @newstrings=`diff -u debian/copyright_hints debian/copyright_newhints | sed '1,2d' | egrep '^\+' - | sed 's/^\+//'`; \ if [ -n "$$newstrings" ]; then \ - echo "WARNING: The following new or changed copyright notices discovered:"; \ + echo "$(if $(DEB_COPYRIGHT_CHECK_STRICT),ERROR,WARNING): The following new or changed copyright notices discovered:"; \ echo; \ echo "$$newstrings"; \ echo; \ echo "To fix the situation please do the following:"; \ echo " 1) Investigate the above changes and update debian/copyright as needed"; \ echo " 2) Replace debian/copyright_hints with debian/copyright_newhints"; \ + $(if $(DEB_COPYRIGHT_CHECK_STRICT),exit 1,:); \ else \ echo 'No new copyright notices found - assuming no news is good news...'; \ rm -f debian/copyright_newhints; \ diff --git a/debian/cdbs/1/rules/package-relations.mk b/debian/cdbs/1/rules/package-relations.mk new file mode 100644 index 0000000..3a92eb7 --- /dev/null +++ b/debian/cdbs/1/rules/package-relations.mk @@ -0,0 +1,50 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2004-2006 Jonas Smedegaard <dr@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 diff --git a/debian/changelog b/debian/changelog index b1dbbf9..a00d08e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,14 @@ sugar-base (0.82.1-1) unstable; urgency=low * New upstream release. + * Update local cdbs snippets: + + Restructure output of copyright-check.mk to match new proposed + copyright-format at + http://wiki.debian.org/Proposals/CopyrightFormat . + + Improved multiflavor handling in makefile and autotools snippets. + + Add new local package-relations.mk to merge duplicate + build-dependencies and more. Drop cleanup in debian/rules. + + Update README.cdbs-tweaks. -- Jonas Smedegaard <dr@jones.dk> Thu, 07 Aug 2008 20:08:04 +0200 diff --git a/debian/copyright_hints b/debian/copyright_hints index 5e3bdb5..6be47d7 100644 --- a/debian/copyright_hints +++ b/debian/copyright_hints @@ -1,37 +1,191 @@ -*No copyright* UNKNOWN []: Makefile.am +Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=XXX +Upstream-Name: Untrusted draft - double-check copyrights yourself! + +Files: po/af.po + po/am.po + po/ar.po + po/ay.po + po/bg.po + po/bn.po + po/bn_IN.po + po/ca.po + po/de.po + po/dz.po + po/el.po + po/en.po + po/es.po + po/fa.po + po/fa_AF.po + po/ff.po + po/fr.po + po/gu.po + po/ha.po + po/hi.po + po/ht.po + po/ig.po + po/is.po + po/it.po + po/ja.po + po/km.po + po/ko.po + po/mk.po + po/ml.po + po/mn.po + po/mr.po + po/mvo.po + po/nb.po + po/ne.po + po/nl.po + po/pa.po + po/pap.po + po/pis.po + po/pl.po + po/ps.po + po/pt.po + po/pt_BR.po + po/qu.po + po/ro.po + po/ru.po + po/rw.po + po/sd.po + po/si.po + po/sl.po + po/te.po + po/th.po + po/tpi.po + po/tr.po + po/ur.po + po/vi.po + po/yo.po + po/zh_CN.po + po/zh_TW.po +Copyright: YEAR THE PACKAGE'S HOLDER +License: UNKNOWN + +Files: Makefile.am NEWS configure.ac m4/python.m4 + po/ChangeLog + po/POTFILES.in src/Makefile.am src/sugar/Makefile.am src/sugar/_sugarbaseext.defs src/sugar/_sugarbaseext.override -LGPL-2+ [2003 Jonathan Blandford <jrb@alum.mit.edu> / 2003 Red Hat, Inc]: src/sugar/xdgmime.h +Copyright: *No copyright* +License: UNKNOWN + +Files: src/sugar/xdgmime.h src/sugar/xdgmimeglob.c src/sugar/xdgmimeglob.h src/sugar/xdgmimeint.c src/sugar/xdgmimeint.h src/sugar/xdgmimemagic.c src/sugar/xdgmimemagic.h -GENERATED FILE [1994-2002]: Makefile.in +Copyright: 2003, Jonathan Blandford <jrb@alum.mit.edu> + 2003, Red Hat, Inc +License: LGPL-2+ + +Files: Makefile.in src/Makefile.in src/sugar/Makefile.in -LGPL-2+ [200 Matthias Clasen <mclasen@redhat.com> / 2004 Red Hat, Inc]: src/sugar/xdgmimealias.h +Copyright: 1994-2002 +License: UNKNOWN (GENERATED FILE) + +Files: src/sugar/xdgmimealias.h src/sugar/xdgmimeparent.h -LGPL-2+ [2004 Matthias Clasen <mclasen@redhat.com> / 2004 Red Hat, Inc]: src/sugar/xdgmimealias.c +Copyright: 200 Matthias Clasen <mclasen@redhat.com> + 2004, Red Hat, Inc +License: LGPL-2+ + +Files: src/sugar/xdgmimealias.c src/sugar/xdgmimeparent.c -LGPL-2+ [2005 Matthias Clasen <mclasen@redhat.com>]: src/sugar/xdgmimecache.c +Copyright: 2004, Matthias Clasen <mclasen@redhat.com> + 2004, Red Hat, Inc +License: LGPL-2+ + +Files: src/sugar/xdgmimecache.c src/sugar/xdgmimecache.h -GENERATED FILE [1992-1996, 1998-2001]: configure -GPL GENERATED FILE [1996-1997, 1999-2000, 2002-2006]: missing -GPL GENERATED FILE [1999-2000, 2003-2007 Free Software]: depcomp -GPL GENERATED FILE [2000-2001, 2003-2005 Free Software Foundation, Inc]: py-compile -GPL-2+ GENERATED FILE [1996-2001, 2003-2006]: ltmain.sh -LGPL-2+ [2003-2004 Red Hat, Inc / 2003-2004 Jonathan Blandford <jrb@alum.mit.edu>]: src/sugar/xdgmime.c -LGPL-2+ [2006-2007, Red Hat, Inc / 2007-2008, One Laptop Per Child]: src/sugar/__init__.py -LGPL-2+ [2006-2007, Red Hat, Inc]: src/sugar/_sugarbaseextmodule.c -LGPL-2+ [2007 Red Hat, Inc]: src/sugar/logger.py -LGPL-2+ [2007, One Laptop Per Child / 2006-2007, Red Hat, Inc]: src/sugar/mime.py -MIT/X11 (BSD like) [1994 X Consortium]: install-sh -UNKNOWN [1996-2004]: aclocal.m4 -UNKNOWN [the / 1991, 1999 Free Software Foundation, Inc]: COPYING +Copyright: 2005, Matthias Clasen <mclasen@redhat.com> +License: LGPL-2+ + +Files: missing +Copyright: 1996-1997, 1999-2000, 2002-2006 +License: GPL (GENERATED FILE) + +Files: depcomp +Copyright: 1999-2000, 2003-2007, Free Software +License: GPL (GENERATED FILE) + +Files: py-compile +Copyright: 2000-2001, 2003-2005, Free Software Foundation, Inc +License: GPL (GENERATED FILE) + +Files: intltool-merge.in +Copyright: 2000-2001, Eazel, Inc + 2000, 2003, Free Software Foundation +License: GPL (GENERATED FILE) + +Files: intltool-update.in +Copyright: 2000-2003, Free Software Foundation +License: GPL (GENERATED FILE) + +Files: ltmain.sh +Copyright: 1996-2001, 2003-2006 +License: GPL-2+ (GENERATED FILE) + +Files: intltool-extract.in +Copyright: 2000-2001, 2003, Free Software Foundation +License: GPL-2+ (GENERATED FILE) + +Files: m4/intltool.m4 +Copyright: 2001, Eazel, Inc +License: GPL-2+ (GENERATED FILE) + +Files: src/sugar/xdgmime.c +Copyright: 2003-2004, Red Hat, Inc + 2003-2004, Jonathan Blandford <jrb@alum.mit.edu> +License: LGPL-2+ + +Files: src/sugar/__init__.py +Copyright: 2006-2007, Red Hat, Inc + 2007-2008, One Laptop Per Child +License: LGPL-2+ + +Files: src/sugar/_sugarbaseextmodule.c +Copyright: 2006-2007, Red Hat, Inc +License: LGPL-2+ + +Files: src/sugar/mime.py +Copyright: 2007, One Laptop Per Child + 2006-2007, Red Hat, Inc +License: LGPL-2+ + +Files: src/sugar/logger.py +Copyright: 2007, Red Hat, Inc +License: LGPL-2+ + +Files: install-sh +Copyright: 1994, X Consortium +License: MIT/X11 (BSD like) + +Files: configure +Copyright: 1992-1996, 1998-2001 +License: UNKNOWN (GENERATED FILE) + +Files: aclocal.m4 +Copyright: 1995-2002, Free Software Foundation, Inc + 2001-2004, Red Hat, Inc + 1996-2004 +License: UNKNOWN (GENERATED FILE) + +Files: po/Makefile.in.in +Copyright: 1995-1997, by Ulrich Drepper <drepper@gnu.ai.mit.edu> + 2004-2008, Rodney Dawes <dobey.pwns@gmail.com> +License: UNKNOWN + +Files: COPYING +Copyright: the + 1991, 1999, Free Software Foundation, Inc +License: UNKNOWN + diff --git a/debian/rules b/debian/rules index 0b08aa5..87fa4cf 100755 --- a/debian/rules +++ b/debian/rules @@ -36,4 +36,4 @@ CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), python-gtk2-dev, python-gobject-dev CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), chrpath # Merge duplicate build-dependencies -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' -e 's/^ *, *//' -e 's/ *, *$$//') +include debian/cdbs/1/rules/package-relations.mk |