--- Begin Message ---
Package: bzip2
Version: 1.0.6-5
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: origin-ubuntu utopic ubuntu-patch
Hi folks,
In Ubuntu, we ran into an issue with the libbz2-1.0 package not having
automatic detached symbols packages (ddebs) being built. Looking at the
bzip2 source, the reason for this is clear: this package does not use
debhelper for building, and ddeb package generation relies on integration
with dh_strip.
I don't think there's any good reason for bzip2 (or any package) to build
with a raw debian/rules nowadays instead of using dh(1). Aside from
corner-case bugs like the one we ran into in Ubuntu (which although
currently Ubuntu-specific, would also be an issue in Debian if and when
Debian starts providing its own ddeb infrastructure), this makes
debian/rules quite difficult to read, with at least 200 lines of unnecessary
boilerplate (my first crack at dh reduces the file from 410 lines to 177,
with further improvements possible).
Please consider including the attached patch in Debian. I consider non-dh
packaging sufficiently onerous to deal with that I am uploading the attached
change to the Ubuntu archive, even if it does not get accepted into Debian.
Since this change also involves introducing some new executable files under
debian/, I am also pushing this to a git branch in the collab-maint repo;
please feel free to pick this up from the 'dh1' branch there instead, which
will also give you a richer history than this patch will.
Changelog for the attached diff:
* Non-maintainer upload
* Convert packaging to dh(1).
* Drop obsolete maintainer script which hasn't been needed for a decade.
* Fix dependencies of lib32bz2-dev on ppc64 (dev:Depends, not
shlibs:Depends).
* Refactor the build targets so that we can move texinfo to
Build-Depends-Indep.
Thanks for considering the patch.
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
[email protected] [email protected]
=== renamed file 'debian/docbase' => 'debian/bzip2-doc.doc-base'
=== added file 'debian/bzip2-doc.info'
--- debian/bzip2-doc.info 1970-01-01 00:00:00 +0000
+++ debian/bzip2-doc.info 2014-07-10 00:29:41 +0000
@@ -0,0 +1 @@
+bzip2.info*
=== added file 'debian/bzip2-doc.install'
--- debian/bzip2-doc.install 1970-01-01 00:00:00 +0000
+++ debian/bzip2-doc.install 2014-07-10 00:35:08 +0000
@@ -0,0 +1,3 @@
+*.ps /usr/share/doc/bzip2
+*.html /usr/share/doc/bzip2
+*.texi /usr/share/doc/bzip2
=== added file 'debian/bzip2.install'
--- debian/bzip2.install 1970-01-01 00:00:00 +0000
+++ debian/bzip2.install 2014-07-09 22:16:46 +0000
@@ -0,0 +1,2 @@
+bin
+usr/share/man
=== modified file 'debian/changelog'
=== added file 'debian/compat'
--- debian/compat 1970-01-01 00:00:00 +0000
+++ debian/compat 2014-07-09 21:52:49 +0000
@@ -0,0 +1 @@
+9
=== modified file 'debian/control'
--- debian/control 2013-08-13 00:07:30 +0000
+++ debian/control 2014-07-10 02:13:05 +0000
@@ -1,10 +1,12 @@
Source: bzip2
Section: utils
Priority: important
-Maintainer: Anibal Monsalve Salazar <[email protected]>
+Maintainer: Ubuntu Developers <[email protected]>
+XSBC-Original-Maintainer: Anibal Monsalve Salazar <[email protected]>
Uploaders: Santiago Ruano Rincón <[email protected]>, Jorge Ernesto Guevara Cuenca <[email protected]>
Standards-Version: 3.9.4
-Build-depends: texinfo, gcc-multilib [amd64 i386 kfreebsd-amd64 powerpc ppc64 s390 sparc] | gcc-4.1 (<< 4.1.2) [amd64 i386 kfreebsd-amd64 powerpc ppc64 s390 sparc], dpkg-dev (>= 1.16.0)
+Build-Depends: gcc-multilib [amd64 i386 kfreebsd-amd64 powerpc ppc64 s390 sparc] | gcc-4.1 (<< 4.1.2) [amd64 i386 kfreebsd-amd64 powerpc ppc64 s390 sparc], dpkg-dev (>= 1.16.0), debhelper (>= 9), dh-exec
+Build-Depends-Indep: texinfo
Homepage: http://www.bzip.org/
Vcs-Git: git://git.debian.org/collab-maint/bzip2.git
Vcs-Browser: http://git.debian.org/?p=collab-maint/bzip2.git
=== added file 'debian/lib32bz2-1.0.install'
--- debian/lib32bz2-1.0.install 1970-01-01 00:00:00 +0000
+++ debian/lib32bz2-1.0.install 2014-07-09 23:01:41 +0000
@@ -0,0 +1 @@
+usr/lib32/*.so.*
=== added file 'debian/lib32bz2-dev.install'
--- debian/lib32bz2-dev.install 1970-01-01 00:00:00 +0000
+++ debian/lib32bz2-dev.install 2014-07-09 23:01:51 +0000
@@ -0,0 +1,2 @@
+usr/lib32/*.so
+usr/lib32/*.a
=== added file 'debian/lib64bz2-1.0.install'
--- debian/lib64bz2-1.0.install 1970-01-01 00:00:00 +0000
+++ debian/lib64bz2-1.0.install 2014-07-09 23:35:01 +0000
@@ -0,0 +1 @@
+usr/lib64/*.so.*
=== added file 'debian/libbz2-1.0.install'
--- debian/libbz2-1.0.install 1970-01-01 00:00:00 +0000
+++ debian/libbz2-1.0.install 2014-07-09 23:01:57 +0000
@@ -0,0 +1,2 @@
+#!/usr/bin/dh-exec
+lib/libbz2.so.* /lib/${DEB_HOST_MULTIARCH}
=== added file 'debian/libbz2-dev.install'
--- debian/libbz2-dev.install 1970-01-01 00:00:00 +0000
+++ debian/libbz2-dev.install 2014-07-09 23:02:06 +0000
@@ -0,0 +1,4 @@
+#!/usr/bin/dh-exec
+lib/libbz2.a /usr/lib/${DEB_HOST_MULTIARCH}
+include /usr
+usr/lib/${DEB_HOST_MULTIARCH}/libbz2.so
=== removed file 'debian/postinst-lib'
--- debian/postinst-lib 2005-05-28 14:05:46 +0000
+++ debian/postinst-lib 1970-01-01 00:00:00 +0000
@@ -1,15 +0,0 @@
-#!/bin/sh
-set -eu
-
-# Ldconfig
-if [ "$1" = "configure" ]; then
- ldconfig
-fi
-
-# FHS
-#pkg=libbz2-1.0
-#if [ "$1" = "configure" ]; then
-# if [ -d /usr/doc ] && [ ! -e /usr/doc/$pkg ] && [ -d /usr/share/doc/$pkg ]; then
-# ln -sf ../share/doc/$pkg /usr/doc/$pkg
-# fi
-#fi
=== removed file 'debian/postrm-lib'
--- debian/postrm-lib 2002-02-06 19:23:15 +0000
+++ debian/postrm-lib 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-#!/bin/sh
-set -eu
-
-# Ldconfig
-if [ "$1" = "remove" ]; then
- ldconfig
-fi
=== removed file 'debian/preinst-run'
--- debian/preinst-run 2005-05-28 14:05:46 +0000
+++ debian/preinst-run 1970-01-01 00:00:00 +0000
@@ -1,20 +0,0 @@
-#!/bin/sh
-set -eu
-
-# If and only if we are uprading from a version lower than 0.9.5d-3,
-# then we want to break the old /usr/share/doc/libbz2 symlink (which was
-# pointing to libbz2).
-if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" "<<" "0.9.5d-3"
-then
- if test -L /usr/share/doc/bzip2
- then
- rm -f /usr/share/doc/bzip2
- fi
-fi
-
-# And we should never ever have a directory in /usr/doc/bzip2
-if [ -d /usr/doc/bzip2 ] && [ ! -L /usr/doc/bzip2 ]
-then
- echo "Cleaning up left-over /usr/doc/bzip2."
- rm -fr /usr/doc/bzip2
-fi
=== modified file 'debian/rules'
--- debian/rules 2013-08-13 00:07:30 +0000
+++ debian/rules 2014-07-10 02:02:33 +0000
@@ -2,12 +2,9 @@
# debian/rules file for building the Debian GNU/Linux package bzip2.
# Copyright (C) 1999, 2000, 2001, 2002 Philippe Troin
# Copyright (C) 2004-2007 Anibal Monsalve Salazar <[email protected]>
+# Copyright 2014 Canonical Ltd.
SHELL = /bin/bash
-package = bzip2
-
-testdir=test -x debian/rules && test -f bzip2.c
-testroot=test "`id -nu`" = root
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
@@ -18,23 +15,15 @@
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
CROSS=CC=$(DEB_HOST_GNU_TYPE)-gcc
CC=$(DEB_HOST_GNU_TYPE)-gcc
- DEBSTRIP=$(DEB_HOST_GNU_TYPE)-strip
else
CROSS=CC=gcc
CC=gcc
- DEBSTRIP=strip
endif
DEBCFLAGS:=`dpkg-buildflags --get CFLAGS`
DEBCFLAGS +=`dpkg-buildflags --get CPPFLAGS`
WGET=wget
-ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-DEBSTRIP:=:
-endif
-
-gen_md5sums = cd debian/tmp-$(1)/ && find -type f \! -regex '.*/DEBIAN/.*' -printf '%P\0' | xargs -r0 md5sum >DEBIAN/md5sums
-
DEBVERSION:=$(shell head -n 1 debian/changelog \
| sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/-[0-9.]*$$//')
@@ -52,19 +41,21 @@
lib32 := usr/lib32
endif
-build-arch: build
-build-indep: build
-build: build-stamp $(build32-stamp) $(build64-stamp)
+%:
+ dh $@
+
+build-arch: build-stamp $(build32-stamp) $(build64-stamp)
build-stamp:
- $(testdir)
# Add here commands to compile the package.
- $(MAKE) $(CROSS) DEBCFLAGS="$(DEBCFLAGS)"
-ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
- $(MAKE) DEBCFLAGS="$(DEBCFLAGS)" test
-endif
+ dh_auto_build -- $(CROSS) DEBCFLAGS="$(DEBCFLAGS)"
+ touch build-stamp
+
+build-indep: bzip2.info
+bzip2.info: manual.texi
makeinfo -o bzip2.info manual.texi
- cat debian/copyright.in LICENSE > debian/copyright
- touch build-stamp
+
+override_dh_auto_test:
+ dh_auto_test -- DEBCFLAGS="$(DEBCFLAGS)"
# requires: docbook-xml docbook2x
manual.texi: manual.xml
@@ -89,312 +80,91 @@
$(MAKE) -C 64 CC="$(CC64)" DEBCFLAGS="$(DEBCFLAGS)"
touch build64-stamp
-
-clean:
- $(testdir)
+override_dh_auto_clean:
rm -f build*-stamp
- [ ! -f Makefile ] || $(MAKE) clean
+ dh_auto_clean
rm -rf 32 64
rm -rf *.sho libbz2.so*
- rm -f debian/substvars debian/files bzip2.info*
- rm -fr debian/tmp*
- find . -name "*~" -print0 | xargs -r0 rm -f
-
-# Build architecture-independent files here.
-binary-indep: build
- $(testdir)
- $(testroot)
-
- # Info
- install -d debian/tmp-doc/usr/share/info
- cp bzip2.info* debian/tmp-doc/usr/share/info/
- gzip -v9 debian/tmp-doc/usr/share/info/*
-
- install -d debian/tmp-doc/usr/share/doc/bzip2
- install -d debian/tmp-doc/usr/share/doc/bzip2-doc
- cp *.ps *.html *.texi debian/tmp-doc/usr/share/doc/bzip2
- gzip -v9 debian/tmp-doc/usr/share/doc/bzip2/*.{ps,texi}
- for i in debian/tmp-doc/usr/share/doc/bzip2/*.{ps.gz,texi.gz,html}; do \
+ rm -f bzip2.info*
+
+override_dh_link:
+ dh_link
+ifneq (,$(filter $(shell dh_listpackages), bzip2-doc))
+ for i in debian/bzip2-doc/usr/share/doc/bzip2/*.{ps,texi,html}; do \
b=$$(basename $$i); \
- ln -sf ../bzip2/$$b debian/tmp-doc/usr/share/doc/bzip2-doc/$$b; \
- done
-
- cp debian/changelog \
- debian/tmp-doc/usr/share/doc/bzip2-doc/changelog.Debian
- gzip -v9 -n debian/tmp-doc/usr/share/doc/bzip2-doc/changelog*
- cp debian/copyright debian/tmp-doc/usr/share/doc/bzip2-doc/
-
- # Doc-base support
- install -d debian/tmp-doc/usr/share/doc-base
- cp debian/docbase debian/tmp-doc/usr/share/doc-base/bzip2
-
- # Control files
- install -d debian/tmp-doc/DEBIAN
-
- dpkg-gencontrol -isp -Pdebian/tmp-doc -pbzip2-doc
-
- # Add md5sums
- $(call gen_md5sums,doc)
-
- # Fix perms
- chown -R root.root debian/tmp-doc
- chmod -R a+rX-wts,u+w debian/tmp-doc
-
- # Buildit
- dpkg --build debian/tmp-doc ..
-
-# Build architecture-dependent files here.
-binary-arch: build
- $(testdir)
- $(testroot)
- rm -fr debian/tmp*
- install -d debian/tmp/usr
-
- $(MAKE) PREFIX=`pwd`/debian/tmp install
-
- ### Split
-
- # Development package
- install -d debian/tmp-dev/usr/lib/$(DEB_HOST_MULTIARCH)
- rm debian/tmp/lib/libbz2.so
- ln -s /lib/$(DEB_HOST_MULTIARCH)/libbz2.so.1.0 debian/tmp-dev/usr/lib/$(DEB_HOST_MULTIARCH)/libbz2.so
- mv debian/tmp/lib/libbz2.a debian/tmp-dev/usr/lib/$(DEB_HOST_MULTIARCH)/
- mv debian/tmp/include debian/tmp-dev/usr/include
-
-
- # Library package
- install -d debian/tmp-lib/lib/$(DEB_HOST_MULTIARCH)
- for i in $$(ls debian/tmp/lib/libbz2.so*); do \
- (set -x; echo $$i; mv $$i debian/tmp-lib/lib/$(DEB_HOST_MULTIARCH)/); \
- done
- ln -s libbz2.so.1.0.4 debian/tmp-lib/lib/$(DEB_HOST_MULTIARCH)/libbz2.so.1
- chmod -x debian/tmp-lib/lib/$(DEB_HOST_MULTIARCH)/*
-
- # Binary package
- install -d debian/tmp-run
- mv debian/tmp/bin debian/tmp-run/bin
- ln -sf bzdiff debian/tmp-run/bin/bzcmp
- ln -sf bzgrep debian/tmp-run/bin/bzegrep
- ln -sf bzgrep debian/tmp-run/bin/bzfgrep
- ln -sf bzmore debian/tmp-run/bin/bzless
- install -d debian/tmp-run/usr/share
- mv debian/tmp/man debian/tmp-run/usr/share/man
-
- ### Check the install
- test "$$(find debian/tmp ! -type d -print | wc -l)" -eq 0
- rm -fr debian/tmp
-
- ### Finalize documentation
-
- # Man pages
- gzip -v9 debian/tmp-run/usr/share/man/man1/*.1
- ( cd debian/tmp-run/usr/share/man/man1 && \
+ ln -sf ../bzip2/$$b debian/bzip2-doc/usr/share/doc/bzip2-doc/$$b; \
+ done
+endif
+ifneq (,$(filter $(shell dh_listpackages), bzip2))
+ ( cd debian/bzip2/usr/share/man/man1 && \
for i in bunzip2 bzcat bzip2recover; do \
ln -s bzip2.1.gz $$i.1.gz; \
done )
-
- # Other docs in lib package
- install -d debian/tmp-run/usr/share/doc/bzip2
- cp CHANGES debian/tmp-run/usr/share/doc/bzip2/changelog
- cp debian/changelog \
- debian/tmp-run/usr/share/doc/bzip2/changelog.Debian
- gzip -v9 -n debian/tmp-run/usr/share/doc/bzip2/changelog*
- cp debian/copyright debian/tmp-run/usr/share/doc/bzip2/
-
- # Library package
- install -d debian/tmp-lib/usr/share/doc/libbz2-1.0
- cp debian/copyright debian/tmp-lib/usr/share/doc/libbz2-1.0/
- cp CHANGES debian/tmp-lib/usr/share/doc/libbz2-1.0/changelog
- cp debian/changelog \
- debian/tmp-lib/usr/share/doc/libbz2-1.0/changelog.Debian
- gzip -v9 -n debian/tmp-lib/usr/share/doc/libbz2-1.0/changelog*
-
- # Other packages point to libbz2-1.0
- install -d debian/tmp-dev/usr/share/doc
- ln -s libbz2-1.0 debian/tmp-dev/usr/share/doc/libbz2-dev
-
- ### Package finalize
-
- # Stripping
- for i in debian/tmp-run/bin/*; \
- do \
- if [ ! -h $$i ] && head -n 1 $$i | grep -vq '^#!'; \
- then \
- (set -x; $(DEBSTRIP) -R .note -R .comment $$i); \
- fi; \
- done
- $(DEBSTRIP) --strip-unneeded -R .note -R .comment \
- debian/tmp-lib/lib/$(DEB_HOST_MULTIARCH)/*.so*
- $(DEBSTRIP) --strip-debug debian/tmp-dev/usr/lib/$(DEB_HOST_MULTIARCH)/*.a
-
- # Control files
- install -d debian/tmp-{lib,dev,run}/DEBIAN
- cp debian/shlibs debian/tmp-lib/DEBIAN/shlibs
-
- dpkg-shlibdeps debian/tmp-lib/lib/$(DEB_HOST_MULTIARCH)/*.so*
- dpkg-gencontrol -isp -Pdebian/tmp-lib -plibbz2-1.0
- rm debian/substvars
- dpkg-gencontrol -isp -Pdebian/tmp-dev -plibbz2-dev
- dpkg-shlibdeps debian/tmp-run/bin/*
- dpkg-gencontrol -isp -Pdebian/tmp-run -pbzip2
-
- for i in run dev lib; do \
- cp debian/postinst-$$i debian/tmp-$$i/DEBIAN/postinst; \
- chmod +x debian/tmp-$$i/DEBIAN/postinst; \
- done
- cp debian/preinst-run debian/tmp-run/DEBIAN/preinst
- cp debian/postrm-lib debian/tmp-lib/DEBIAN/postrm
- chmod +x debian/tmp-run/DEBIAN/preinst debian/tmp-lib/DEBIAN/postrm
-
- # Add md5sums
- $(call gen_md5sums,run)
- $(call gen_md5sums,lib)
- $(call gen_md5sums,dev)
-
- # Fix perms
- chown -R root.root debian/tmp*
- chmod -R a+rX-wts,u+w debian/tmp*
-
- # Buildit
- dpkg --build debian/tmp-run ..
- dpkg --build debian/tmp-lib ..
- dpkg --build debian/tmp-dev ..
-
+endif
+
+override_dh_auto_install:
+ dh_auto_install -- PREFIX=$(CURDIR)/debian/tmp
+ # Development package
+ rm debian/tmp/lib/libbz2.so
+ install -d debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
+
+ # This isn't the soname, and nothing should be looking for this file,
+ # but leave it alone for now
+ ln -s libbz2.so.1.0.4 debian/tmp/lib/libbz2.so.1
+
+ ln -s /lib/$(DEB_HOST_MULTIARCH)/libbz2.so.1.0 debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libbz2.so
+ ln -sf bzdiff debian/tmp/bin/bzcmp
+ ln -sf bzgrep debian/tmp/bin/bzegrep
+ ln -sf bzgrep debian/tmp/bin/bzfgrep
+ ln -sf bzmore debian/tmp/bin/bzless
+ install -d debian/tmp/usr/share
+ mv debian/tmp/man debian/tmp/usr/share/man
+
+ifneq (,$(build32-stamp))
+ install -d debian/tmp/$(lib32)
+ cp -a 32/libbz2.so* 32/libbz2.a debian/tmp/$(lib32)/
+ # This isn't the soname, and nothing should be looking for this file,
+ # but leave it alone for now
+ ln -s libbz2.so.1.0.4 debian/tmp/$(lib32)/libbz2.so.1
+endif
ifneq (,$(build64-stamp))
- rm -rf debian/tmp-lib64
- rm -rf debian/tmp-dev64
-
- install -d debian/tmp-lib64/usr/lib64
- cp -a 64/libbz2.so.* debian/tmp-lib64/usr/lib64/
- ln -s libbz2.so.1.0.4 debian/tmp-lib64/usr/lib64/libbz2.so.1
- chmod -x debian/tmp-lib64/usr/lib64/*
-
- install -d debian/tmp-dev64/usr/lib64
- cp -a 64/libbz2.so 64/libbz2.a debian/tmp-dev64/usr/lib64/
- chmod -x debian/tmp-dev64/usr/lib64/*.a
-
- install -d debian/tmp-lib64/usr/share/doc/lib64bz2-1.0
- cp debian/copyright debian/tmp-lib64/usr/share/doc/lib64bz2-1.0/
- cp debian/changelog \
- debian/tmp-lib64/usr/share/doc/lib64bz2-1.0/changelog.Debian
- gzip -v9 -n debian/tmp-lib64/usr/share/doc/lib64bz2-1.0/changelog*
-
- install -d debian/tmp-dev64/usr/share/doc
- ln -s lib64bz2-1.0 debian/tmp-dev64/usr/share/doc/lib64bz2-dev
-
- $(DEBSTRIP) --strip-unneeded -R .note -R .comment \
- debian/tmp-lib64/usr/lib64/*.so*
- $(DEBSTRIP) --strip-debug debian/tmp-dev64/usr/lib64/*.a
-
- install -d debian/tmp-{lib,dev}64/DEBIAN
- /bin/echo -e 'libbz2\t1.0\tlib64bz2-1.0' > debian/tmp-lib64/DEBIAN/shlibs
-
- -dpkg-shlibdeps debian/tmp-lib/usr/lib64/*.so*
-ifeq ($(DEB_HOST_ARCH),i386)
- echo 'shlibs:Depends=libc6-amd64' > debian/substvars
-endif
-ifeq ($(DEB_HOST_ARCH),powerpc)
- echo 'shlibs:Depends=libc6-ppc64' > debian/substvars
-endif
-#ifeq ($(DEB_HOST_ARCH),s390)
-# echo 'shlibs:Depends=libc6-s390x' > debian/substvars
-#endif
-#ifeq ($(DEB_HOST_ARCH),sparc)
-# echo 'shlibs:Depends=libc6-sparc64' > debian/substvars
-#endif
- dpkg-gencontrol -isp -Pdebian/tmp-lib64 -plib64bz2-1.0
- rm -f debian/substvars
-
-ifeq ($(DEB_HOST_ARCH),i386)
- echo 'dev:Depends=libc6-dev-amd64' > debian/substvars
-endif
-ifeq ($(DEB_HOST_ARCH),powerpc)
- echo 'dev:Depends=libc6-dev-ppc64' > debian/substvars
+ install -d debian/tmp/usr/lib64
+ cp -a 64/libbz2.so.* 64/libbz2.a debian/tmp/usr/lib64/
+ # This isn't the soname, and nothing should be looking for this file,
+ # but leave it alone for now
+ ln -s libbz2.so.1.0.4 debian/tmp/usr/lib64/libbz2.so.1
+endif
+
+override_dh_gencontrol:
+ifeq ($(DEB_HOST_ARCH),amd64)
+ echo 'dev:Depends=libc6-dev-i386' >> debian/lib32bz2-dev.substvars
+endif
+ifeq ($(DEB_HOST_ARCH),ppc64)
+ echo 'dev:Depends=libc6-dev-powerpc' >> debian/lib32bz2-dev.substvars
+endif
+ifeq ($(DEB_HOST_ARCH),i386)
+ echo 'dev:Depends=libc6-dev-amd64' > debian/lib64bz2-dev.substvars
+endif
+ifeq ($(DEB_HOST_ARCH),powerpc)
+ echo 'dev:Depends=libc6-dev-ppc64' > debian/lib64bz2-dev.substvars
endif
ifeq ($(DEB_HOST_ARCH),s390)
- echo 'dev:Depends=libc6-dev-s390x' > debian/substvars
+ echo 'dev:Depends=libc6-dev-s390x' > debian/lib64bz2-dev.substvars
endif
ifeq ($(DEB_HOST_ARCH),sparc)
- echo 'dev:Depends=libc6-dev-sparc64' > debian/substvars
-endif
- dpkg-gencontrol -isp -Pdebian/tmp-dev64 -plib64bz2-dev
-
- for i in dev lib; do \
- cp debian/postinst-$$i debian/tmp-$${i}64/DEBIAN/postinst; \
- chmod +x debian/tmp-$${i}64/DEBIAN/postinst; \
- done
-
- $(call gen_md5sums,lib64)
- $(call gen_md5sums,dev64)
-
- chown -R root.root debian/tmp*64
- chmod -R a+rX-wts,u+w debian/tmp*64
-
- dpkg --build debian/tmp-lib64 ..
- dpkg --build debian/tmp-dev64 ..
-endif
-
-ifneq (,$(build32-stamp))
- rm -rf debian/tmp-lib32
- rm -rf debian/tmp-dev32
-
- install -d debian/tmp-lib32/$(lib32)
- cp -a 32/libbz2.so.* debian/tmp-lib32/$(lib32)/
- ln -s libbz2.so.1.0.4 debian/tmp-lib32/$(lib32)/libbz2.so.1
- chmod -x debian/tmp-lib32/$(lib32)/*
-
- install -d debian/tmp-dev32/$(lib32)
- cp -a 32/libbz2.so 32/libbz2.a debian/tmp-dev32/$(lib32)/
- chmod -x debian/tmp-dev32/$(lib32)/*.a
-
- install -d debian/tmp-lib32/usr/share/doc/lib32bz2-1.0
- cp debian/copyright debian/tmp-lib32/usr/share/doc/lib32bz2-1.0/
- cp debian/changelog \
- debian/tmp-lib32/usr/share/doc/lib32bz2-1.0/changelog.Debian
- gzip -v9 -n debian/tmp-lib32/usr/share/doc/lib32bz2-1.0/changelog*
-
- install -d debian/tmp-dev32/usr/share/doc
- ln -s lib32bz2-1.0 debian/tmp-dev32/usr/share/doc/lib32bz2-dev
-
- $(DEBSTRIP) --strip-unneeded -R .note -R .comment \
- debian/tmp-lib32/$(lib32)/*.so*
- $(DEBSTRIP) --strip-debug debian/tmp-dev32/$(lib32)/*.a
-
- install -d debian/tmp-{lib,dev}32/DEBIAN
- /bin/echo -e 'libbz2\t1.0\tlib32bz2-1.0' > debian/tmp-lib32/DEBIAN/shlibs
-
- -dpkg-shlibdeps debian/tmp-lib/$(lib32)/*.so*
-ifeq ($(DEB_HOST_ARCH),amd64)
- echo 'shlibs:Depends=libc6-i386' > debian/substvars
-endif
-ifeq ($(DEB_HOST_ARCH),ppc64)
- echo 'shlibs:Depends=libc6-powerpc' > debian/substvars
-endif
- dpkg-gencontrol -isp -Pdebian/tmp-lib32 -plib32bz2-1.0
- rm -f debian/substvars
-
-ifeq ($(DEB_HOST_ARCH),amd64)
- echo 'dev:Depends=libc6-dev-i386' > debian/substvars
-endif
-ifeq ($(DEB_HOST_ARCH),ppc64)
- echo 'shlibs:Depends=libc6-dev-powerpc' > debian/substvars
-endif
- dpkg-gencontrol -isp -Pdebian/tmp-dev32 -plib32bz2-dev
-
- for i in dev lib; do \
- cp debian/postinst-$$i debian/tmp-$${i}32/DEBIAN/postinst; \
- chmod +x debian/tmp-$${i}32/DEBIAN/postinst; \
- done
-
- $(call gen_md5sums,lib32)
- $(call gen_md5sums,dev32)
-
- chown -R root.root debian/tmp*32
- chmod -R a+rX-wts,u+w debian/tmp*32
-
- dpkg --build debian/tmp-lib32 ..
- dpkg --build debian/tmp-dev32 ..
-endif
+ echo 'dev:Depends=libc6-dev-sparc64' > debian/lib64bz2-dev.substvars
+endif
+ dh_gencontrol
+
+override_dh_install:
+ dh_install --fail-missing
+
+override_dh_installdocs:
+ cat debian/copyright.in LICENSE > debian/copyright
+ dh_installdocs -plibbz2-dev --link-doc=libbz2-1.0
+ dh_installdocs -plib32bz2-dev --link-doc=lib32bz2-1.0
+ dh_installdocs -plib64bz2-dev --link-doc=lib64bz2-1.0
+ dh_installdocs -Nlibbz2-dev -Nlib32bz2-dev -Nlib64bz2-dev
print-version:
@@echo "Debian version: $(DEBVERSION)"
@@ -404,7 +174,4 @@
$(WGET) -O bzip2_$(UPVERSION).orig.tar.gz \
ftp://sourceware.cygnus.com/pub/bzip2/v100/bzip2-$(UPVERSION).tar.gz
-binary: binary-indep binary-arch
-
-.PHONY: build clean binary-indep binary-arch binary print-version \
- get-orig-source
+.PHONY: print-version get-orig-source
--- End Message ---