Package: libarchive-dev
Severity: wishlist
Tags: patch
Version: 2.4.17-1

Please consider the improvements in the attached patch for debian/rules

- remove .save ugliness, use dpkg's feature of ignoring deleted files
  instead.
- add build-arch and build-dep (does not make a difference for this
  package, but the more packages have this, the better the chances out
  buildds will finally use it and not waste time on building arch-indep
  stuff)
- do not ignore make distclean errors
- there is no libarchive2, so no need to remove anything in it.
- link bsdtar and bsdcpio dynamically (this is unlike the rest a
  matter of taste, here it reduces bsdcpio by 75% and bsdtar package
  by 50%, though it of course make them depend on libarchive1 instead)

Hochachtungsvoll,
        Bernhard R. Link
Index: libarchive-2.4.17/debian/rules
===================================================================
--- libarchive-2.4.17.orig/debian/rules	2008-05-10 12:43:59.000000000 +0200
+++ libarchive-2.4.17/debian/rules	2008-05-10 13:14:04.000000000 +0200
@@ -35,24 +35,22 @@
 
 config.status: configure
 	dh_testdir
-	-cp config.aux/config.sub config.aux/config.sub.save
 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
 	cp -f /usr/share/misc/config.sub config.aux/config.sub
 endif
-	-cp config.aux/config.guess config.aux/config.guess.save
 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
 	cp -f /usr/share/misc/config.guess config.aux/config.guess
 endif
 	# Add here commands to configure the package.
-	$(SHELL) ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS=" -Wl,-z,defs" --enable-bsdcpio
+	$(SHELL) ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS=" -Wl,-z,defs" --enable-bsdcpio=shared --enable-bsdtar=shared
 
 
-build: build-stamp
+build-indep:
+build-arch: build-stamp
 build-stamp:  config.status
 	dh_testdir
 
 	# Add here commands to compile the package.
-	-mv tar/getdate.c tar/getdate.c.save
 	$(MAKE)
 
 	$(MAKE) check
@@ -65,15 +63,13 @@
 	rm -f build-stamp 
 
 	# Add here commands to clean up after the build process.
-	-$(MAKE) distclean
+	if test -f config.status ; then $(MAKE) distclean ; fi
 
-	-mv config.aux/config.guess.save config.aux/config.guess
-	-mv config.aux/config.sub.save config.aux/config.sub
-	-mv tar/getdate.c.save tar/getdate.c
+	rm -f config.aux/config.guess config.aux/config.sub tar/getdate.c
 
 	dh_clean 
 
-install: build
+install: build-arch
 	dh_testdir
 	dh_testroot
 	dh_clean -k 
@@ -84,12 +80,11 @@
 	ln -s -T libarchive.so.2 debian/tmp/usr/lib/libarchive.so.1
 	install -d debian/tmp/usr/share/lintian/overrides/
 	install -m 0644 debian/lintian-override debian/tmp/usr/share/lintian/overrides/libarchive1
-	${RM} -r debian/libarchive2/usr/share/
 
 binary-indep: 
 
 # Build architecture-dependent files here.
-binary-arch: build install
+binary-arch: install
 	dh_testdir
 	dh_testroot
 	dh_installchangelogs  -a NEWS
@@ -123,4 +118,5 @@
 	dh_builddeb -a
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install 
+build: build-indep build-arch
+.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install

Reply via email to