Browse Source

move file installation from rules to dh_install files

David Kalnischkies 13 years ago
parent
commit
2cf8c58b3f

+ 1 - 0
debian/apt-transport-https.dirs

@@ -0,0 +1 @@
+usr/lib/apt/methods

+ 1 - 0
debian/apt-transport-https.install

@@ -0,0 +1 @@
+bin/methods/https usr/lib/apt/methods

+ 1 - 0
debian/apt-utils.install

@@ -0,0 +1 @@
+bin/libapt-inst*.so.* usr/lib/

+ 5 - 0
debian/apt.install

@@ -0,0 +1,5 @@
+bin/apt-* usr/bin/
+bin/libapt-pkg*.so.* usr/lib/
+bin/methods/* usr/lib/apt/methods/
+scripts/dselect/* usr/lib/dpkg/methods/apt/
+locale usr/share/

+ 1 - 1
debian/control

@@ -6,7 +6,7 @@ Uploaders: Michael Vogt <mvo@debian.org>, Otavio Salvador <otavio@debian.org>,
  Christian Perrier <bubulle@debian.org>, Daniel Burrows <dburrows@debian.org>,
  Luca Bruno <lethalman88@gmail.com>, Julian Andres Klode <jak@debian.org>
 Standards-Version: 3.9.0
-Build-Depends: dpkg-dev (>= 1.15.8), debhelper (>= 7), libdb-dev, gettext (>= 0.12), libcurl4-gnutls-dev (>= 7.19.0), zlib1g-dev | libz-dev, debiandoc-sgml, xsltproc, docbook-xsl, docbook-xml, po4a (>= 0.34-2), autotools-dev, autoconf, automake, doxygen
+Build-Depends: dpkg-dev (>= 1.15.8), debhelper (>= 7.2.3~), libdb-dev, gettext (>= 0.12), libcurl4-gnutls-dev (>= 7.19.0), zlib1g-dev | libz-dev, debiandoc-sgml, xsltproc, docbook-xsl, docbook-xml, po4a (>= 0.34-2), autotools-dev, autoconf, automake, doxygen
 Build-Conflicts: autoconf2.13, automake1.4
 Vcs-Bzr: http://bzr.debian.org/apt/debian-sid/
 Vcs-Browser: http://bzr.debian.org/loggerhead/apt/debian-sid/

+ 3 - 0
debian/libapt-pkg-dev.install

@@ -0,0 +1,3 @@
+bin/libapt-pkg*.so usr/lib/
+bin/libapt-inst*.so usr/lib/
+include/apt-pkg/*.h usr/include/apt-pkg/

+ 13 - 32
debian/rules

@@ -172,24 +172,6 @@ apt: build build-doc
 #
 # apt install
 #
-	cp $(BLD)/bin/apt-* debian/$@/usr/bin/
-
-	# Remove the bits that are in apt-utils
-	rm $(addprefix debian/$@/usr/bin/apt-,$(APT_UTILS))
-
-	# install the shared libs
-	find $(BLD)/bin/ -type f -name "libapt-pkg*.so.*" -exec cp -a "{}" debian/$@/usr/lib/ \;
-	find $(BLD)/bin/ -type l -name "libapt-pkg*.so.*" -exec cp -a "{}" debian/$@/usr/lib/ \;
-
-	cp $(BLD)/bin/methods/* debian/$@/usr/lib/apt/methods/
-	# https has its own package
-	rm debian/$@/usr/lib/apt/methods/https
-
-	cp $(BLD)/scripts/dselect/* debian/$@/usr/lib/dpkg/methods/apt/
-	cp -r $(BLD)/locale debian/$@/usr/share/
-
-	cp debian/apt.logrotate debian/$@/etc/logrotate.d/apt
-
 	cp debian/apt.conf.autoremove debian/$@/etc/apt/apt.conf.d/01autoremove
 
 	# make rosetta happy and remove pot files in po/ (but leave stuff
@@ -197,6 +179,14 @@ apt: build build-doc
 	rm -f build/po/*.pot
 	rm -f po/*.pot
 
+	dh_install -p$@ --sourcedir=$(BLD)
+
+	# Remove the bits that are in apt-utils
+	rm $(addprefix debian/$@/usr/bin/apt-,$(APT_UTILS))
+
+	# https has its own package
+	rm debian/$@/usr/lib/apt/methods/https
+
 	# move the mirror failure script in place
 	#mv debian/$@/usr/bin/apt-report-mirror-failure \
 	#   debian/$@/usr/lib/apt/apt-report-mirror-failure \
@@ -208,6 +198,7 @@ apt: build build-doc
 	dh_installcron -p$@
 	dh_installdocs -p$@
 	dh_installchangelogs -p$@
+	dh_installlogrotate -p$@
 	dh_strip -p$@
 	dh_compress -p$@
 	dh_fixperms -p$@
@@ -226,13 +217,8 @@ libapt-pkg-dev: build
 #
 # libapt-pkg-dev install
 #
-	cp -a $(BLD)/bin/libapt-pkg*.so debian/libapt-pkg-dev/usr/lib/
-	cp -a $(BLD)/bin/libapt-inst*.so debian/libapt-pkg-dev/usr/lib/
-#	ln -s libapt-pkg.so.$(LIBAPTPKG_MAJOR) debian/libapt-pkg-dev/usr/lib/libapt-pkg.so
-	cp $(BLD)/include/apt-pkg/*.h debian/libapt-pkg-dev/usr/include/apt-pkg/
-
+	dh_install -p$@ --sourcedir=$(BLD)
 	dh_installdocs -p$@
-
 	dh_installchangelogs -p$@
 	dh_strip -p$@
 	dh_compress -p$@
@@ -249,11 +235,9 @@ apt-utils: build
 	dh_prep -p$@
 	dh_installdirs -p$@
 
-	# install the shared libs
-	find $(BLD)/bin/ -type f -name "libapt-inst*.so.*" -exec cp -a "{}" debian/$@/usr/lib/ \;
-	find $(BLD)/bin/ -type l -name "libapt-inst*.so.*" -exec cp -a "{}" debian/$@/usr/lib/ \;
-
 	cp $(addprefix $(BLD)/bin/apt-,$(APT_UTILS)) debian/$@/usr/bin/
+
+	dh_install -p$@ --sourcedir=$(BLD)
 	dh_installdocs -p$@
 	dh_installexamples -p$@
 
@@ -277,10 +261,7 @@ apt-transport-https: build libapt-pkg-dev
 	dh_prep -p$@
 	dh_installdirs -p$@
 
-	# install the method
-	mkdir --parents debian/$@/usr/lib/apt/methods
-	cp $(BLD)/bin/methods/https debian/$@/usr/lib/apt/methods
-
+	dh_install -p$@ --sourcedir=$(BLD)
 	dh_installdocs -p$@ debian/apt-transport-https.README
 	dh_installexamples -p$@
 

+ 1 - 1
methods/makefile

@@ -67,7 +67,7 @@ include $(PROGRAM_H)
 
 # The rred method
 PROGRAM=rred
-SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS)
+SLIBS = -lapt-pkg -lz $(SOCKETLIBS) $(INTLLIBS)
 LIB_MAKES = apt-pkg/makefile
 SOURCE = rred.cc
 include $(PROGRAM_H)