Codebase list libhtml-wikiconverter-perl / 2172adb
drop cdbs support Krzysztof Krzyzaniak 15 years ago
4 changed file(s) with 0 addition(s) and 387 deletion(s). Raw diff Collapse all Expand all
+0
-111
debian/README.cdbs-tweaks less more
0 CDBS tweak
1 ==========
2
3 CDBS is great. In some corner cases, however, some parts of CDBS
4 sometimes needs a few tweaks to work optimally.
5
6 This is a collection of such tweaks. The goal is for these tweaks to be
7 absorbed into upstream CDBS. We just haven't found time yet to discuss
8 them at the CDBS developers' mailinglist. And possible we do not all
9 agree that the tweaks are so great - therefore this "staging area".
10
11 If you found this file below debian/ subdir in a source package, most
12 probably only a subset of the below mentioned tweaks are relevant and
13 have been shipped with the package. The repository of all these tweaks
14 is here: svn://svn.debian.org/build-common/people/js/overlay/
15
16 Web access: http://svn.debian.org/wsvn/build-common/people/js/overlay/
17
18
19
20 New buildinfo rule
21 ------------------
22
23 See package description for "buildinfo" for more info.
24
25
26
27 Improved support for multiple compilations
28 ------------------------------------------
29
30 Create and clean builddir _after_ resolving per-package DEB_BUILDDIR.
31
32 Honour per-package DEB_BUILDDIR in makefile and autotools classes.
33
34 Support multiple build flavors in makefile and autotools classes.
35
36
37
38 Various improvements to python-distutils class
39 ----------------------------------------------
40
41 Use full path to Python interpreter (Python Policy section 1.3.2).
42
43 Add CDBS_BUILD_DEPENDS to old policy method.
44
45 Fix CDBS_BUILD_DEPENDS in new policy methods to only depend on debhelper
46 when actually used.
47
48 Fix DEB_PYTHON_SIMPLE_PACKAGES sometimes installed twice (and only one
49 of them honouring DEB_PYTHON_COMPILE_VERSION).
50
51 Unify install path using new DEB_PYTHON_DESTDIR.
52
53 Quote install path.
54
55
56
57 New python-autotools class
58 --------------------------
59
60 Handle autotools-based Python packaging.
61
62
63
64 New python-sugar class
65 ----------------------
66
67 Handle packaging of Sugar activities.
68
69
70
71 New copyright-check rule
72 ------------------------
73
74 Refuse to build if the source is found to contain different copyright
75 info than earlier builds.
76
77
78
79 New kernelpatches rule
80 ----------------------
81
82 Small wrapper around dh-kpatches, taking care of build-dependencies too.
83
84
85
86 New routines for handling upstream tarball
87 ------------------------------------------
88
89 Rules and variables to help downloading, validating and repackaging
90 upstream tarball.
91
92 Implements the rules print-version and get-orig-source commonly used
93 for group-maintained packages with Debian-specific patches maintained in
94 SVN or some other VCS, and automated fetching virgin upstream tarball
95 (possibly massaged after download e.g. to strip non-DFSG material).
96
97
98
99 Support for custom BTS info
100 ---------------------------
101
102 Include BTS control info found in debian/*.bts files, or alternatively
103 redirect bug reports to the email address defined in DEB_BTS_EMAIL.
104
105
106
107 New dict class
108 --------------
109
110 Rules for packaging ispell, aspell, myspell and wordlist dictionaries.
+0
-40
debian/cdbs/1/rules/buildinfo.mk less more
0 # -*- mode: makefile; coding: utf-8 -*-
1 # Copyright © 2004-2006 Jonas Smedegaard <dr@jones.dk>
2 # Description: Generate and include build information
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 2, or (at
7 # your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 # 02111-1307 USA.
18
19 _cdbs_scripts_path ?= /usr/lib/cdbs
20 _cdbs_rules_path ?= /usr/share/cdbs/1/rules
21 _cdbs_class_path ?= /usr/share/cdbs/1/class
22
23 ifndef _cdbs_rules_buildinfo
24 _cdbs_rules_buildinfo = 1
25
26 include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
27
28 CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), dh-buildinfo
29
30 common-install-arch common-install-indep:: debian/stamp-buildinfo
31
32 debian/stamp-buildinfo:
33 dh_buildinfo
34 touch debian/stamp-buildinfo
35
36 clean::
37 rm -f debian/stamp-buildinfo
38
39 endif
+0
-97
debian/cdbs/1/rules/copyright-check.mk less more
0 # -*- mode: makefile; coding: utf-8 -*-
1 # Copyright © 2005-2008 Jonas Smedegaard <dr@jones.dk>
2 # Description: Check for changes to copyright notices in source
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 2, or (at
7 # your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 # 02111-1307 USA.
18
19 _cdbs_scripts_path ?= /usr/lib/cdbs
20 _cdbs_rules_path ?= /usr/share/cdbs/1/rules
21 _cdbs_class_path ?= /usr/share/cdbs/1/class
22
23 ifndef _cdbs_rules_copyright-check
24 _cdbs_rules_copyright-check := 1
25
26 include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
27
28 CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), devscripts (>= 2.10.7)
29
30 # Set to yes to fail on changed/new hints are found
31 #DEB_COPYRIGHT_CHECK_STRICT := yes
32
33 # Single regular expression for files to include or ignore
34 DEB_COPYRIGHT_CHECK_REGEX = .*
35 DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^(debian/.*|(.*/)?config\.(guess|sub|rpath)(\..*)?)$
36
37 pre-build:: debian/stamp-copyright-check
38
39 debian/stamp-copyright-check:
40 @echo 'Scanning upstream source for new/changed copyright notices (except debian subdir!)...'
41
42 # Perl in shell in make requires extra care:
43 # * Single-quoting ('...') protects against shell expansion
44 # * Double-dollar ($$) expands to plain dollar ($) in make
45 licensecheck -c '$(DEB_COPYRIGHT_CHECK_REGEX)' -r --copyright -i '$(DEB_COPYRIGHT_CHECK_IGNORE_REGEX)' * \
46 | LC_ALL=C perl -e \
47 '$$n=0; while (<>) {'\
48 ' s/[^[:print:]]//g;'\
49 ' if (/^([^:\s][^:]+):[\s]+(\S.*?)\s*$$/) {'\
50 ' $$files[$$n]{name}=$$1;'\
51 ' $$files[$$n]{license}=$$2;'\
52 ' };'\
53 ' if (/^\s*\[Copyright:\s*(\S.*?)\s*\]/) {'\
54 ' $$files[$$n]{copyright}=$$1;'\
55 ' };'\
56 ' /^$$/ and $$n++;'\
57 '};'\
58 'foreach $$file (@files) {'\
59 ' $$file->{license} =~ s/\s*\(with incorrect FSF address\)//;'\
60 ' $$file->{license} =~ s/\s+\(v([^)]+) or later\)/-$$1+/;'\
61 ' $$file->{copyright} =~ s/(?<=(\b\d{4}))(?{$$y=$$^N})\s*[,-]\s*((??{$$y+1}))\b/-$$2/g;'\
62 ' $$file->{copyright} =~ s/(?<=\b\d{4})\s*-\s*\d{4}(?=\s*-\s*(\d{4})\b)//g;'\
63 ' $$pattern = "$$file->{license} [$$file->{copyright}]";'\
64 ' push @{ $$patternfiles{"$$pattern"} }, $$file->{name};'\
65 '};'\
66 'foreach $$pattern ( sort {'\
67 ' @{$$patternfiles{$$b}} <=> @{$$patternfiles{$$a}}'\
68 ' ||'\
69 ' $$a cmp $$b'\
70 ' } keys %patternfiles ) {'\
71 ' print "$$pattern: ", join("\n\t", sort @{ $$patternfiles{$$pattern} }), "\n";'\
72 '};'\
73 > debian/copyright_newhints
74 @patterncount="`cat debian/copyright_newhints | sed 's/^[^:]*://' | LANG=C sort -u | grep . -c -`"; \
75 echo "Found $$patterncount different copyright and licensing combinations."
76 @if [ ! -f debian/copyright_hints ]; then touch debian/copyright_hints; fi
77 @newstrings=`diff -u debian/copyright_hints debian/copyright_newhints | sed '1,2d' | egrep '^\+' - | sed 's/^\+//'`; \
78 if [ -n "$$newstrings" ]; then \
79 echo "$(if $(DEB_COPYRIGHT_CHECK_STRICT),ERROR,WARNING): The following new or changed copyright notices discovered:"; \
80 echo; \
81 echo "$$newstrings"; \
82 echo; \
83 echo "To fix the situation please do the following:"; \
84 echo " 1) Investigate the above changes and update debian/copyright as needed"; \
85 echo " 2) Replace debian/copyright_hints with debian/copyright_newhints"; \
86 $(if $(DEB_COPYRIGHT_CHECK_STRICT),exit 1,:); \
87 else \
88 echo 'No new copyright notices found - assuming no news is good news...'; \
89 rm -f debian/copyright_newhints; \
90 fi
91 touch $@
92
93 clean::
94 rm -f debian/stamp-copyright-check
95
96 endif
+0
-139
debian/cdbs/1/rules/upstream-tarball.mk less more
0 # -*- mode: makefile; coding: utf-8 -*-
1 # Copyright © 2007-2008 Jonas Smedegaard <dr@jones.dk>
2 # Description: Convenience rules for dealing with upstream tarballs
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 2, or (at
7 # your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 # 02111-1307 USA.
18
19 _cdbs_scripts_path ?= /usr/lib/cdbs
20 _cdbs_rules_path ?= /usr/share/cdbs/1/rules
21 _cdbs_class_path ?= /usr/share/cdbs/1/class
22
23 ifndef _cdbs_rules_upstream_tarball
24 _cdbs_rules_upstream_tarball := 1
25
26 include $(_cdbs_rules_path)/buildvars.mk$(_cdbs_makefile_suffix)
27
28 CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), cdbs (>= 0.4.39)
29
30 # Prefix for upstream location of all upstream tarballs (mandatory!)
31 #DEB_UPSTREAM_URL =
32
33 DEB_UPSTREAM_PACKAGE = $(DEB_SOURCE_PACKAGE)
34 DEB_UPSTREAM_TARBALL_VERSION = $(if $(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE)),$(DEB_UPSTREAM_VERSION:$(DEB_UPSTREAM_REPACKAGE_DELIMITER)$(DEB_UPSTREAM_REPACKAGE_TAG)=),$(DEB_UPSTREAM_VERSION))
35 DEB_UPSTREAM_TARBALL_EXTENSION = tar.gz
36 # Checksum to ensure integrity of downloadeds using get-orig-source (optional)
37 #DEB_UPSTREAM_TARBALL_MD5 =
38
39 DEB_UPSTREAM_WORKDIR = ../tarballs
40
41 # Perl regexp to change locally used string into that in upstream URL and srcdir
42 #DEB_UPSTREAM_TARBALL_VERSION_MANGLE
43 cdbs_upstream_tarball_version_mangled = $(if $(strip $(DEB_UPSTREAM_TARBALL_VERSION_MANGLE)),$(shell echo '$(DEB_UPSTREAM_TARBALL_VERSION)' | perl -pe '$(DEB_UPSTREAM_TARBALL_VERSION_MANGLE)'),$(DEB_UPSTREAM_TARBALL_VERSION))
44
45 # Base filename (without extension) as used in upstream URL
46 DEB_UPSTREAM_TARBALL_BASENAME = $(DEB_UPSTREAM_PACKAGE)-$(cdbs_upstream_tarball_version_mangled)
47
48 # Base directory within tarball
49 DEB_UPSTREAM_TARBALL_SRCDIR = $(DEB_UPSTREAM_PACKAGE)-$(cdbs_upstream_tarball_version_mangled)
50
51 # Space-delimited list of directories and files to strip (optional)
52 #DEB_UPSTREAM_REPACKAGE_EXCLUDE = CVS .cvsignore doc/rfc*.txt doc/draft*.txt
53 DEB_UPSTREAM_REPACKAGE_TAG = dfsg
54 DEB_UPSTREAM_REPACKAGE_DELIMITER = ~
55
56 cdbs_upstream_tarball = $(DEB_UPSTREAM_TARBALL_BASENAME).$(DEB_UPSTREAM_TARBALL_EXTENSION)
57 cdbs_upstream_local_tarball = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_TARBALL_VERSION).orig.$(if $(findstring $(DEB_UPSTREAM_TARBALL_EXTENSION),tgz),tar.gz,$(DEB_UPSTREAM_TARBALL_EXTENSION))
58 cdbs_upstream_repackaged_basename = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_TARBALL_VERSION)$(DEB_UPSTREAM_REPACKAGE_DELIMITER)$(DEB_UPSTREAM_REPACKAGE_TAG).orig
59 cdbs_upstream_uncompressed_tarball = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_TARBALL_VERSION).orig.tar
60
61 # # These variables are deprecated
62 _cdbs_deprecated_vars += DEB_UPSTREAM_TARBALL DEB_UPSTREAM_LOCAL_TARBALL DEB_UPSTREAM_REPACKAGE_TARBALL
63 _cdbs_deprecated_vars += DEB_UPSTREAM_REPACKAGE_EXCLUDES
64 DEB_UPSTREAM_REPACKAGE_EXCLUDE += $(DEB_UPSTREAM_REPACKAGE_EXCLUDES)
65
66 print-version:
67 @@echo "Debian version: $(DEB_VERSION)"
68 @@echo "Upstream version: $(DEB_UPSTREAM_TARBALL_VERSION)"
69
70 get-orig-source:
71 @@dh_testdir
72 @@mkdir -p "$(DEB_UPSTREAM_WORKDIR)"
73
74 @if [ ! -s "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" ] ; then \
75 if [ -f "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" ] ; then \
76 rm "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" ; \
77 fi ; \
78 echo "Downloading $(cdbs_upstream_local_tarball) from $(DEB_UPSTREAM_URL)/$(cdbs_upstream_tarball) ..." ; \
79 wget -nv -T10 -t3 -O "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" "$(DEB_UPSTREAM_URL)/$(cdbs_upstream_tarball)" ; \
80 else \
81 echo "Upstream source tarball have been already downloaded: $(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" ; \
82 fi
83
84 @md5current=`md5sum "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" | sed -e 's/ .*//'`; \
85 if [ -n "$(DEB_UPSTREAM_TARBALL_MD5)" ] ; then \
86 if [ "$$md5current" != "$(DEB_UPSTREAM_TARBALL_MD5)" ] ; then \
87 echo "Expecting upstream tarball md5sum $(DEB_UPSTREAM_TARBALL_MD5), but $$md5current found" ; \
88 echo "Upstream tarball md5sum is NOT trusted! Possible upstream tarball forge!" ; \
89 echo "Purging downloaded file. Try new download." ; \
90 rm -f "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" ; \
91 false ; \
92 else \
93 echo "Upstream tarball is trusted!" ; \
94 fi; \
95 else \
96 echo "Upstream tarball NOT trusted (current md5sum is $$md5current)!" ; \
97 fi
98
99 # TODO: Rewrite using make variables like cdbs_upstream_unpack_cmd and
100 # DEB_UPSTREAM_SUPPORTED_COMPRESSIONS (recent dpkg supports bz2)
101 @untar="tar -x -C"; \
102 case "$(cdbs_upstream_local_tarball)" in \
103 *.tar.gz) unpack="gunzip -c";; \
104 *.tar.bz2) unpack="bunzip2 -c"; uncompress="bunzip2";; \
105 *.tar.Z) unpack="uncompress -c"; uncompress="uncompress";; \
106 *.zip) unpack="unzip -q"; uncompress="false"; untar="-d"; nopipe="true";; \
107 *.tar) unpack="cat"; uncompress="true";; \
108 *) echo "Unknown extension for upstream tarball $(cdbs_upstream_local_tarball)"; false;; \
109 esac && \
110 if [ -n "$(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE))" ] || [ "$$uncompress" = "false" ]; then \
111 echo "Repackaging tarball ..." && \
112 mkdir -p "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" && \
113 if [ -n "$$nopipe" ]; then \
114 $$unpack "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" \
115 $$untar "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" $(patsubst %,--exclude='%',$(DEB_UPSTREAM_REPACKAGE_EXCLUDE)); \
116 else \
117 $$unpack "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)" \
118 | $$untar "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" $(patsubst %,--exclude='%',$(DEB_UPSTREAM_REPACKAGE_EXCLUDE)); \
119 fi && \
120 if [ "$(DEB_UPSTREAM_TARBALL_SRCDIR)" != "$(cdbs_upstream_repackaged_basename)" ]; then \
121 mv -T "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)/$(DEB_UPSTREAM_TARBALL_SRCDIR)" "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)/$(cdbs_upstream_repackaged_basename)"; \
122 fi && \
123 if [ -n "$(strip $(DEB_UPSTREAM_REPACKAGE_EXCLUDE))" ]; then \
124 GZIP=-9 tar -b1 -czf "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_repackaged_basename).tar.gz" -C "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" "$(cdbs_upstream_repackaged_basename)"; \
125 else \
126 GZIP=-9 tar -b1 -czf "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_uncompressed_tarball).gz" -C "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)" "$(cdbs_upstream_repackaged_basename)"; \
127 fi && \
128 echo "Cleaning up" && \
129 rm -rf "$(DEB_UPSTREAM_WORKDIR)/$(DEB_UPSTREAM_REPACKAGE_TAG)"; \
130 elif [ -n "$$uncompress" ]; then \
131 echo "Recompressing tarball ..." && \
132 $$uncompress "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_local_tarball)"; \
133 gzip -9 "$(DEB_UPSTREAM_WORKDIR)/$(cdbs_upstream_uncompressed_tarball)"; \
134 fi
135
136 DEB_PHONY_RULES += print-version get-orig-source
137
138 endif