[Pkg-sugar-commit] [sugar-browse-activity] 18/32: Drop all local CDBS snippets: included with main cdbs package now.

Jonas Smedegaard dr at jones.dk
Mon Apr 20 09:46:45 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/108-10
in repository sugar-browse-activity.

commit c043eb8914a519cb8ad000d5b6c0a2130bb71769
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Wed Mar 24 10:59:04 2010 +0100

    Drop all local CDBS snippets: included with main cdbs package now.
---
 debian/cdbs/1/class/python-sugar.mk      | 127 --------------------------
 debian/cdbs/1/class/python-vars.mk       | 109 ----------------------
 debian/cdbs/1/rules/buildinfo.mk         |  40 ---------
 debian/cdbs/1/rules/copyright-check.mk   | 113 -----------------------
 debian/cdbs/1/rules/package-relations.mk |  66 --------------
 debian/cdbs/1/rules/upstream-tarball.mk  | 150 -------------------------------
 debian/rules                             |  17 +---
 7 files changed, 4 insertions(+), 618 deletions(-)

diff --git a/debian/cdbs/1/class/python-sugar.mk b/debian/cdbs/1/class/python-sugar.mk
deleted file mode 100644
index a21de8c..0000000
--- a/debian/cdbs/1/class/python-sugar.mk
+++ /dev/null
@@ -1,127 +0,0 @@
-# -*- mode: makefile; coding: utf-8 -*-
-# Copyright © 2008 Jonas Smedegaard <dr at jones.dk>
-# Description: Class to build and install Sugar packages
-#
-# 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., 51 Franklin St, Fifth Floor, 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_class_python_sugar
-_cdbs_class_python_sugar = 1
-
-#include $(_cdbs_class_path)/python-vars.mk$(_cdbs_makefile_suffix)
-include debian/cdbs/1/class/python-vars.mk
-include $(_cdbs_rules_path)/debhelper.mk$(_cdbs_makefile_suffix)
-
-# Space-delimited list of supported branches, lowest listed first
-# (comment out if all current branches are supported)
-# NB! This variable must be declared *above* inclusion of this snippet
-#DEB_SUGAR_BRANCHES = 0.84 0.86
-
-# FIXME: move these to buildvars.mk
-comma = ,
-cdbs_delimit = $(firstword $1)$(foreach word,$(wordlist 2,$(words $1),$1),$2$(word))
-
-# List "packages multiplied with branches", or just packages if no branches
-# FIXME: move this to buildvars.mk
-cdbs_expand_branches = $(subst WORDDELIMITER,$3,$(subst BRANCHDELIMITER,$4,$(call cdbs_delimit,$(if $2,$(foreach pkg,$1,$(call cdbs_delimit,$(foreach branch,$2,$(pkg)$(branch:%=-%)),BRANCHDELIMITER)),$1),WORDDELIMITER)))
-
-# convenience wrappers to expand Sugar branches for package dependencies
-cdbs_sugar_allbranchdeps = $(call cdbs_expand_branches,$1,$(DEB_SUGAR_BRANCHES),$(comma) ,$(comma) )
-cdbs_sugar_anybranchdeps = $(call cdbs_expand_branches,$1,$(DEB_SUGAR_BRANCHES),$(comma) , | )
-
-# Declare Build-Deps for packages using this file
-CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), $(call cdbs_sugar_anybranchdeps,python-sugar python-sugar-toolkit), unzip
-# FIXME: Resolve DEB_PYTHON_PACKAGES in build targets only
-ifeq (,$(cdbs_python_pkg_check)$(DEB_PYTHON_ARCH_PACKAGES))
-  ifneq (, $(cdbs_python_compile_version))
-    CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), python$(cdbs_python_compile_version)-dev, python (>= 2.3.5-11)
-  else
-    CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), python-dev (>= 2.3.5-11)
-  endif
-else
-CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), python-all-dev (>= 2.3.5-11)
-endif
-ifeq (pysupport, $(DEB_PYTHON_SYSTEM))
-CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), python-support (>= 0.3.2)
-else
-CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), python-central (>= 0.5.6)
-endif
-
-# Convenience variable for e.g. conflicts/provides/replaces
-DEB_SUGAR_SOURCE_PKGBASE ?= $(DEB_SOURCE_PACKAGE:%-$(firstword $(DEB_SUGAR_BRANCHES))=%)
-
-DEB_PYTHON_SUGAR_PACKAGES ?= $(filter $(call cdbs_expand_branches,sugar-%-activity,$(DEB_SUGAR_BRANCHES)), $(DEB_PACKAGES))
-
-# TODO: Move this to buildvars.mk
-cdbs_pkgsrcdir = $(if $(DEB_PKGSRCDIR_$(cdbs_curpkg)),$(DEB_PKGSRCDIR_$(cdbs_curpkg)),$(DEB_SRCDIR))
-
-pre-build::
-	mkdir -p debian/stamps-configure
-
-$(patsubst %,build/%,$(DEB_PYTHON_SUGAR_PACKAGES)) :: build/%:
-	[ ! -e $(cdbs_pkgsrcdir)/MANIFEST ] || [ -e $(cdbs_pkgsrcdir)/MANIFEST.upstream ] || mv $(cdbs_pkgsrcdir)/MANIFEST $(cdbs_pkgsrcdir)/MANIFEST.upstream
-	[ ! -e $(cdbs_pkgsrcdir)/MANIFEST.upstream ] || egrep -v '^locale/.*/(.*\.mo|activity\.linfo)$$' $(cdbs_pkgsrcdir)/MANIFEST.upstream > $(cdbs_pkgsrcdir)/MANIFEST
-	for pythonver in $(cdbs_python_build_versions); do \
-		/usr/bin/python$$ver $(cdbs_pkgsrcdir)/setup.py build; \
-	done
-	[ ! -e $(cdbs_pkgsrcdir)/MANIFEST.upstream ] || IFS="`printf '\n'`" find "$(cdbs_pkgsrcdir)/locale" -type f \( -name '*.mo' -or -name 'activity.linfo' \) | while read path; do \
-		echo "$$path" | sed 's!^$(cdbs_pkgsrcdir)/!!' >> $(cdbs_pkgsrcdir)/MANIFEST; \
-	done
-
-$(patsubst %,install/%,$(DEB_PYTHON_SUGAR_PACKAGES)) :: install/%:
-	mkdir -p $(DEB_DESTDIR)usr/share/sugar/activities
-	for pythonver in $(cdbs_python_build_versions); do \
-		LANG=C /usr/bin/python$$ver $(cdbs_pkgsrcdir)/setup.py install --prefix="$(DEB_DESTDIR)/usr"; \
-	done
-
-$(patsubst %,binary-install/%,$(DEB_PYTHON_SUGAR_PACKAGES)) :: binary-install/%:
-ifeq (pysupport, $(DEB_PYTHON_SYSTEM))
-	dh_pysupport -p$(cdbs_curpkg) $(DEB_PYTHON_PRIVATE_MODULES_DIRS) $(DEB_PYTHON_PRIVATE_MODULES_DIRS_$(cdbs_curpkg))
-else
-	dh_pycentral -p$(cdbs_curpkg)
-endif
-
-# Replace superfluous COPYING files with symlinks
-$(patsubst %,binary-post-install/%,$(DEB_PYTHON_SUGAR_PACKAGES)) :: binary-post-install/%:
-	! test -f $(DEB_DESTDIR)/usr/share/sugar/activities/*.activity/COPYING \
-	|| ! diff -q /usr/share/common-licenses/GPL-2 $(DEB_DESTDIR)/usr/share/sugar/activities/*.activity/COPYING \
-	|| ln -sfT ../../../common-licenses/GPL-2 $(DEB_DESTDIR)/usr/share/sugar/activities/*.activity/COPYING
-
-reverse-config:: $(patsubst %,cleanpythonsugar-reverse-config/%,$(DEB_PYTHON_SUGAR_PACKAGES))
-$(patsubst %,cleanpythonsugar-reverse-config/%,$(DEB_PYTHON_SUGAR_PACKAGES)) :: cleanpythonsugar-reverse-config/% : 
-	[ ! -e $(cdbs_pkgsrcdir)/MANIFEST.upstream ] || mv -f $(cdbs_pkgsrcdir)/MANIFEST.upstream $(cdbs_pkgsrcdir)/MANIFEST
-
-clean:: $(patsubst %,cleanpythonsugar/%,$(DEB_PYTHON_SUGAR_PACKAGES))
-ifeq (, $(cdbs_selected_pycompat))
-	echo "$(cdbs_pycompat)" >debian/pycompat
-endif # use pycompat
-
-$(patsubst %,cleanpythonsugar/%,$(DEB_PYTHON_SUGAR_PACKAGES)) :: cleanpythonsugar/% : 
-	-IFS="`printf '\n'`" find "$(cdbs_pkgsrcdir)/locale" -type f \( -name '*.mo' -or -name 'activity.linfo' \) | while read path; do \
-		rm -f "$$path"; \
-		rmdir --ignore-fail-on-non-empty "`dirname "$$path"`"; \
-	done
-	-rmdir --ignore-fail-on-non-empty "$(cdbs_pkgsrcdir)/locale"
-
-## TODO: Drop this when DEB_PYTHON_PACKAGES is only resolved in build targets
-pre-build clean::
-	$(cdbs_python_pkgresolve_check)
-
-endif
diff --git a/debian/cdbs/1/class/python-vars.mk b/debian/cdbs/1/class/python-vars.mk
deleted file mode 100644
index 729a3c2..0000000
--- a/debian/cdbs/1/class/python-vars.mk
+++ /dev/null
@@ -1,109 +0,0 @@
-# -*- mode: makefile; coding: utf-8 -*-
-# Copyright © 2003,2008 Jonas Smedegaard <dr at jones.dk>
-# Description: Defines useful variables for Python packages
-#
-# 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., 51 Franklin St, Fifth Floor, 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_class_python_vars
-_cdbs_class_python_vars = 1
-
-include $(_cdbs_rules_path)/buildvars.mk$(_cdbs_makefile_suffix)
-
-DEB_PYTHON_PACKAGES = $(filter-out %-doc %-dev %-common, $(DEB_PACKAGES))
-
-DEB_PYTHON_ARCH_PACKAGES = $(filter $(DEB_PYTHON_PACKAGES), $(DEB_ARCH_PACKAGES))
-DEB_PYTHON_INDEP_PACKAGES = $(filter $(DEB_PYTHON_PACKAGES), $(DEB_INDEP_PACKAGES))
-
-## FIXME: Resolve DEB_PYTHON_PACKAGES in build targets only
-# Avoid including buildcore.mk to not risk breaking when hopefully removing again
-cdbs_python_streq = $(if $(filter-out xx,x$(subst $1,,$2)$(subst $2,,$1)x),,yes)
-cdbs_python_packages_pre := $(DEB_PYTHON_ARCH_PACKAGES)$(DEB_PYTHON_INDEP_PACKAGES)
-cdbs_python_pkgresolve_check = $(if $(call cdbs_python_streq,$(DEB_PYTHON_ARCH_PACKAGES)$(DEB_PYTHON_INDEP_PACKAGES),$(cdbs_python_packages_pre)),, $(warning Setting DEB_PYTHON_*PACKAGES after python-vars in included is currently unsupported))
-## TODO: Rephrase when DEB_PYTHON_PACKAGES is only resolved in build targets
-cdbs_python_pkg_check = $(if $(DEB_PYTHON_ARCH_PACKAGES)$(DEB_PYTHON_INDEP_PACKAGES),, $(warning No Python packages found or declared - either rename binary packages or set DEB_PYTHON_PACKAGES (or one or both of DEB_PYTHON_ARCH_PACKAGES and DEB_PYTHON_INDEP_PACKAGES) before including python-vars.mk))
-
-# check python system
-cdbs_use_xs_field := $(shell grep -q "^XS-Python-Version:" debian/control && echo yes)
-cdbs_selected_pycompat := $(shell if [ -e debian/pycompat ]; then cat debian/pycompat; fi)
-cdbs_pycompat = $(cdbs_selected_pycompat)
-ifeq (pysupport, $(DEB_PYTHON_SYSTEM))
-  ifeq (, $(cdbs_selected_pycompat))
-    cdbs_pycompat = 2
-  endif # use pycompat
-  # warning pysupport compatibility mode
-  ifneq (, $(cdbs_use_xs_field))
-    $(warning Use of XS-Python-Version and XB-Python-Version fields in 'debian/control' is deprecated with pysupport method, use 'debian/pyversions' if you need to specify specific versions)
-  endif # use XS field (compat)
-else
-  ifeq (pycentral, $(DEB_PYTHON_SYSTEM))
-    ifeq (, $(cdbs_selected_pycompat))
-      cdbs_pycompat = 2
-    endif # use pycompat
-  else
-    ifneq (, $(DEB_PYTHON_SYSTEM))
-      $(error unsupported Python system: $(DEB_PYTHON_SYSTEM) (select either pysupport or pycentral))
-    else
-      ifneq (, $(cdbs_use_xs_field))
-        $(error Your package uses the new Python policy; you must set DEB_PYTHON_SYSTEM to "pysupport" or "pycentral".)
-      endif
-      ifneq (, $(cdbs_selected_pycompat))
-        ifeq (yes, $(shell expr $(cdbs_selected_pycompat) \> 1 >/dev/null && echo yes))
-          $(error Your package uses the new Python policy; you must set DEB_PYTHON_SYSTEM to "pysupport" or "pycentral".)
-        endif
-      endif # use pycompat
-    endif # unknown method
-  endif # pycentral
-endif # pysupport
-
-# Calculate cdbs_python_build_versions
-cdbs_python_current_version := $(shell pyversions -vd)
-## FIXME: Resolve DEB_PYTHON_PACKAGES in build targets only
-ifeq (,$(cdbs_python_pkg_check)$(DEB_PYTHON_ARCH_PACKAGES))
-  # check if current is in build versions
-  ifneq ($(cdbs_python_current_version), $(filter $(cdbs_python_current_version), $(shell pyversions -vr)))
-    cdbs_python_compile_version := $(firstword $(strip $(sort $(shell pyversions -vr))))
-    cdbs_python_build_versions := $(cdbs_python_compile_version)
-  else
-    cdbs_python_build_versions := $(cdbs_python_current_version)
-  endif
-else
-cdbs_python_build_versions := $(shell pyversions -vr)
-endif # archall
-
-# check if build is possible
-ifeq (, $(cdbs_python_build_versions))
-ifeq (pysupport, $(DEB_PYTHON_SYSTEM))
-$(error invalid setting in 'debian/pyversions')
-else
-$(error invalid setting for XS-Python-Version)
-endif # system selected
-endif # build versions empty
-
-# TODO: Support multiple python programs built for different python versions
-# FIXME: Understand the above sentence and rephrase it
-cdbs_python_curpkg_build_versions = $(cdbs_python_build_versions)
-
-## TODO: Drop this when DEB_PYTHON_PACKAGES is only resolved in build targets
-pre-build clean::
-	$(cdbs_python_pkgresolve_check)
-
-endif
diff --git a/debian/cdbs/1/rules/buildinfo.mk b/debian/cdbs/1/rules/buildinfo.mk
deleted file mode 100644
index b1298cc..0000000
--- a/debian/cdbs/1/rules/buildinfo.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- mode: makefile; coding: utf-8 -*-
-# Copyright © 2004-2007 Jonas Smedegaard <dr at jones.dk>
-# Description: Generate and include build information
-#
-# 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_buildinfo
-_cdbs_rules_buildinfo = 1
-
-include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
-
-CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), dh-buildinfo
-
-common-install-arch common-install-indep:: debian/stamp-buildinfo
-
-debian/stamp-buildinfo:
-	dh_buildinfo
-	touch debian/stamp-buildinfo
-
-clean::
-	rm -f debian/stamp-buildinfo
-
-endif
diff --git a/debian/cdbs/1/rules/copyright-check.mk b/debian/cdbs/1/rules/copyright-check.mk
deleted file mode 100644
index 132cbb7..0000000
--- a/debian/cdbs/1/rules/copyright-check.mk
+++ /dev/null
@@ -1,113 +0,0 @@
-# -*- mode: makefile; coding: utf-8 -*-
-# Copyright © 2005-2008 Jonas Smedegaard <dr at jones.dk>
-# Description: Check for changes to copyright notices in source
-#
-# 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_copyright_check
-_cdbs_rules_copyright_check := 1
-
-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)(\..*)?)$
-DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^debian/(changelog|copyright(|_hints|_newhints))$
-
-pre-build:: debian/stamp-copyright-check
-
-debian/stamp-copyright-check:
-	@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)' * \
-		| LC_ALL=C perl -e \
-	'print "Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=REVISION\n";'\
-	'print "Name: Untrusted draft - double-check copyrights yourself!\n\n";'\
-	'$$n=0; while (<>) {'\
-	'	s/[^[:print:]]//g;'\
-	'	if (/^([^:\s][^:]+):[\s]+(\S.*?)\s*$$/) {'\
-	'		$$files[$$n]{name}=$$1;'\
-	'		$$files[$$n]{license}=$$2;'\
-	'	};'\
-	'	if (/^\s*\[Copyright:\s*(\S.*?)\s*\]/) {'\
-	'		$$files[$$n]{copyright}=$$1;'\
-	'	};'\
-	'	/^$$/ and $$n++;'\
-	'};'\
-	'foreach $$file (@files) {'\
-	'	$$file->{license} =~ s/\s*\(with incorrect FSF address\)//;'\
-	'	$$file->{license} =~ s/\s+\(v([^)]+) or later\)/-$$1+/;'\
-	'	$$file->{license} =~ s/\s+\(v([^)]+)\)/-$$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};'\
-	'};'\
-	'foreach $$pattern ( sort {'\
-	'			@{$$patternfiles{$$b}} <=> @{$$patternfiles{$$a}}'\
-	'			||'\
-	'			$$a cmp $$b'\
-	'		} keys %patternfiles ) {'\
-	'	($$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 -`"; \
-		echo "Found $$patterncount different copyright and licensing combinations."
-	@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 "$(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; \
-		fi
-	touch $@
-
-clean::
-	rm -f debian/stamp-copyright-check
-
-endif
diff --git a/debian/cdbs/1/rules/package-relations.mk b/debian/cdbs/1/rules/package-relations.mk
deleted file mode 100644
index 5183d4c..0000000
--- a/debian/cdbs/1/rules/package-relations.mk
+++ /dev/null
@@ -1,66 +0,0 @@
-# -*- 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 (>= 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 '/\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')
-
-# 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/cdbs/1/rules/upstream-tarball.mk b/debian/cdbs/1/rules/upstream-tarball.mk
deleted file mode 100644
index fb3df53..0000000
--- a/debian/cdbs/1/rules/upstream-tarball.mk
+++ /dev/null
@@ -1,150 +0,0 @@
-# -*- mode: makefile; coding: utf-8 -*-
-# Copyright © 2007-2008 Jonas Smedegaard <dr at jones.dk>
-# Description: Convenience rules for dealing with upstream tarballs
-#
-# 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_upstream_tarball
-_cdbs_rules_upstream_tarball := 1
-
-include $(_cdbs_rules_path)/buildvars.mk$(_cdbs_makefile_suffix)
-
-CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), cdbs (>= 0.4.39)
-
-# Prefix for upstream location of all upstream tarballs (mandatory!)
-#DEB_UPSTREAM_URL = 
-
-DEB_UPSTREAM_PACKAGE = $(DEB_SOURCE_PACKAGE)
-DEB_UPSTREAM_TARBALL_VERSION = $(if $(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE)),$(DEB_UPSTREAM_VERSION:$(DEB_UPSTREAM_REPACKAGE_DELIMITER)$(DEB_UPSTREAM_REPACKAGE_TAG)=),$(DEB_UPSTREAM_VERSION))
-DEB_UPSTREAM_TARBALL_EXTENSION = tar.gz
-# Checksum to ensure integrity of downloadeds using get-orig-source (optional)
-#DEB_UPSTREAM_TARBALL_MD5 = 
-
-DEB_UPSTREAM_WORKDIR = ../tarballs
-
-# Base filename (without extension) as used in upstream URL
-DEB_UPSTREAM_TARBALL_BASENAME = $(DEB_UPSTREAM_PACKAGE)-$(DEB_UPSTREAM_TARBALL_VERSION)
-
-# Perl regexp to change locally used string into that in upstream URL and srcdir
-#DEB_UPSTREAM_TARBALL_BASENAME_MANGLE =
-
-# Base directory within tarball
-DEB_UPSTREAM_TARBALL_SRCDIR = $(cdbs_upstream_tarball_basename)
-
-# Space-delimited list of directories and files to strip (optional)
-#DEB_UPSTREAM_REPACKAGE_EXCLUDE = CVS .cvsignore doc/rfc*.txt doc/draft*.txt
-DEB_UPSTREAM_REPACKAGE_TAG = dfsg
-DEB_UPSTREAM_REPACKAGE_DELIMITER = ~
-
-# TODO: Move this to buildcore.mk
-cdbs_findargs-path-or-name = $(if $(findstring /,$(firstword $(1))),-path './$(patsubst ./%,%,$(firstword $(1)))',-name '$(firstword $(1))') $(foreach obj,$(wordlist 2,$(words $(1)),$(1)),-or $(if $(findstring /,$(obj)),-path './$(obj:./%=%)',-name '$(obj)'))
-
-cdbs_upstream_tarball_basename = $(if $(strip $(DEB_UPSTREAM_TARBALL_BASENAME_MANGLE)),$(shell echo '$(DEB_UPSTREAM_TARBALL_BASENAME)' | perl -pe '$(DEB_UPSTREAM_TARBALL_BASENAME_MANGLE)'),$(DEB_UPSTREAM_TARBALL_BASENAME))
-cdbs_upstream_tarball = $(cdbs_upstream_tarball_basename).$(DEB_UPSTREAM_TARBALL_EXTENSION)
-cdbs_upstream_received_tarball = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_TARBALL_VERSION).orig.$(if $(findstring $(DEB_UPSTREAM_TARBALL_EXTENSION),tgz),tar.gz,$(DEB_UPSTREAM_TARBALL_EXTENSION))
-cdbs_upstream_local_basename = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_TARBALL_VERSION)$(if $(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE)),$(DEB_UPSTREAM_REPACKAGE_DELIMITER)$(DEB_UPSTREAM_REPACKAGE_TAG))
-cdbs_upstream_local_srcdir = $(cdbs_upstream_tarball_basename)$(if $(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE)),$(DEB_UPSTREAM_REPACKAGE_DELIMITER)$(DEB_UPSTREAM_REPACKAGE_TAG))
-
-# # These variables are deprecated
-_cdbs_deprecated_vars += DEB_UPSTREAM_TARBALL DEB_UPSTREAM_LOCAL_TARBALL DEB_UPSTREAM_REPACKAGE_TARBALL DEB_UPSTREAM_TARBALL_VERSION_MANGLE
-_cdbs_deprecated_vars += DEB_UPSTREAM_REPACKAGE_EXCLUDES
-DEB_UPSTREAM_REPACKAGE_EXCLUDE += $(DEB_UPSTREAM_REPACKAGE_EXCLUDES)
-
-print-version:
-	@@echo "Debian version:          $(DEB_VERSION)"
-	@@echo "Upstream version:        $(DEB_UPSTREAM_TARBALL_VERSION)"
-
-get-orig-source:
-	@@dh_testdir
-	@@mkdir -p "$(DEB_UPSTREAM_WORKDIR)"
-
-	@if [ ! -s "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" ] ; then \
-		if [ -f "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" ] ; then \
-			rm "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" ; \
-		fi ; \
-		echo "Downloading $(cdbs_upstream_received_tarball) from $(DEB_UPSTREAM_URL)/$(cdbs_upstream_tarball) ..." ; \
-		wget -nv -T10 -t3 -O "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" "$(DEB_UPSTREAM_URL)/$(cdbs_upstream_tarball)" ; \
-	else \
-		echo "Upstream source tarball have been already downloaded: $(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" ; \
-	fi
-
-	@md5current=`md5sum "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" | sed -e 's/ .*//'`; \
-	if [ -n "$(DEB_UPSTREAM_TARBALL_MD5)" ] ; then \
-		if [ "$$md5current" != "$(DEB_UPSTREAM_TARBALL_MD5)" ] ; then \
-			echo "Expecting upstream tarball md5sum $(DEB_UPSTREAM_TARBALL_MD5), but $$md5current found" ; \
-			echo "Upstream tarball md5sum is NOT trusted! Possible upstream tarball forge!" ; \
-			echo "Purging downloaded file. Try new download." ; \
-			rm -f "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" ; \
-			false ; \
-		else \
-			echo "Upstream tarball is trusted!" ; \
-		fi; \
-	else \
-		echo "Upstream tarball NOT trusted (current md5sum is $$md5current)!" ; \
-	fi
-
-# TODO: Rewrite using make variables like cdbs_upstream_unpack_cmd and
-# DEB_UPSTREAM_SUPPORTED_COMPRESSIONS (recent dpkg supports bz2)
-# TODO: Add .orig suffix to top folder inside tarball when only
-# recompressing (when $uncompress set and ...REPACKAGE_EXCLUDE unset)
-	@untar="tar -x -C"; \
-	case "$(cdbs_upstream_received_tarball)" in \
-	    *.tar.gz)  unpack="gunzip -c";; \
-	    *.tar.bz2) unpack="bunzip2 -c";    uncompress="bunzip2";; \
-	    *.tar.Z)   unpack="uncompress -c"; uncompress="uncompress";; \
-	    *.zip)     unpack="unzip -q";      uncompress="false";       untar="-d"; nopipe="true";; \
-	    *.tar)     unpack="cat";           uncompress="true";; \
-	    *) echo "Unknown extension for upstream tarball $(cdbs_upstream_received_tarball)"; false;; \
-	esac && \
-	if [ -n "$(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE))" ] || [ "$$uncompress" = "false" ]; then \
-		echo "Repackaging tarball ..." && \
-		mkdir -p "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" && \
-		if [ -n "$$nopipe" ]; then \
-			$$unpack "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" \
-				$$untar "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" $(patsubst %,--exclude='%',$(DEB_UPSTREAM_REPACKAGE_EXCLUDE)); \
-		else \
-			$$unpack "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)" \
-				| $$untar "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" $(patsubst %,--exclude='%',$(DEB_UPSTREAM_REPACKAGE_EXCLUDE)); \
-		fi && \
-		if [ "$(DEB_UPSTREAM_TARBALL_SRCDIR)" != "$(cdbs_upstream_local_srcdir)" ]; then \
-			mv -T "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)/$(DEB_UPSTREAM_TARBALL_SRCDIR)" "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)/$(cdbs_upstream_local_srcdir)"; \
-		fi && \
-		GZIP=-9 tar -b1 -czf "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_basename).orig.tar.gz" -C "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" "$(cdbs_upstream_local_srcdir)" && \
-		echo "Cleaning up" && \
-		rm -rf "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)"; \
-	elif [ -n "$$uncompress" ]; then \
-		echo "Recompressing tarball ..." && \
-		$$uncompress "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_received_tarball)"; \
-		gzip -9 "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_basename).orig.tar"; \
-	fi
-
-fail-source-not-repackaged:
-	@if find . $(call cdbs_findargs-path-or-name,$(DEB_UPSTREAM_REPACKAGE_EXCLUDE)) | grep '.*'; then \
-		echo; \
-		echo 'ERROR: Source contains the files/paths listed above'; \
-		echo '       which was intended to not be distributed with the source.'; \
-		echo '       Please repackage source with these items stripped!'; \
-		echo '       (get-orig-source target can automate this - see README.source)'; \
-		exit 1; \
-	fi
-
-DEB_PHONY_RULES += print-version get-orig-source fail-source-not-repackaged
-
-endif
diff --git a/debian/rules b/debian/rules
index ef58ba6..a02b9fd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
 # -*- mode: makefile; coding: utf-8 -*-
-# Copyright © 2008-2009 Jonas Smedegaard <dr at jones.dk>
+# Copyright © 2008-2010 Jonas Smedegaard <dr at jones.dk>
 # Description: Main Debian packaging script for Browse
 #
 # This program is free software; you can redistribute it and/or
@@ -20,16 +20,10 @@
 
 DEB_PYTHON_SYSTEM = pycentral
 DEB_SUGAR_BRANCHES = 0.84
-ifneq (,$(DEB_MAINTAINER_MODE))
-  # Enable stuff not policy compliant (eg. unsuitable for build daemons)
-  DEB_COPYRIGHT_CHECK_STRICT = yes
-  DEB_AUTO_UPDATE_DEBIAN_CONTROL = yes
-endif
-include debian/cdbs/1/rules/upstream-tarball.mk
-include debian/cdbs/1/class/python-sugar.mk
-include debian/cdbs/1/rules/copyright-check.mk
+include /usr/share/cdbs/1/rules/upstream-tarball.mk
+include /usr/share/cdbs/1/rules/utils.mk
+include /usr/share/cdbs/1/class/python-sugar.mk
 include /usr/share/cdbs/1/rules/patchsys-quilt.mk
-include debian/cdbs/1/rules/buildinfo.mk
 
 DEB_UPSTREAM_PACKAGE = Browse
 DEB_UPSTREAM_URL = http://download.sugarlabs.org/sources/sucrose/fructose/$(DEB_UPSTREAM_PACKAGE)
@@ -53,6 +47,3 @@ CDBS_REPLACES = $(DEB_SUGAR_SOURCE_PKGBASE)
 CDBS_PROVIDES += , sugar-web-activity
 CDBS_CONFLICTS += , sugar-web-activity
 CDBS_REPLACES += , sugar-web-activity
-
-# Resolve, cleanup and apply CDBS-declared dependencies
-include debian/cdbs/1/rules/package-relations.mk

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sugar/sugar-browse-activity.git



More information about the pkg-sugar-commit mailing list