[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Please review libpopt0 udeb patch



On Mon, Apr 24, 2006 at 02:42:43AM +0200, Frans Pop wrote:
(sorry for the delay)

No problem, thanks for the review.

On Friday 21 April 2006 10:58, David Härdeman wrote:
The patch is attached to bug report 358671:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=358671

I get one error from lintian:
E: libpopt0-udeb udeb: ldconfig-symlink-missing-for-shlib lib/libpopt.so.0 lib/libpopt.so.0.0.0 libpopt.so.0

Okey, I've updated the patch to include the symlink. Lintian seems to think that the udeb is allright. Does the attached patch look ok? (only changes are to debian/libpopt0-udeb.install and the "mv" line in the debian/rules install target)

Regards,
David


Index: quilty/popt-1.7/debian/control
===================================================================
--- quilty.orig/popt-1.7/debian/control	2006-04-15 10:27:59.000000000 +0200
+++ quilty/popt-1.7/debian/control	2006-04-15 10:31:15.000000000 +0200
@@ -38,3 +38,20 @@
  strings into argv[] arrays using shell-like rules.
  .
  This package contains the popt static library and header file.
+
+Package: libpopt0-udeb
+XC-Package-Type: udeb
+Architecture: any
+Section: debian-installer
+Depends: ${shlibs:Depends}
+Description: lib for parsing cmdline parameters
+ Popt was heavily influenced by the getopt() and getopt_long() functions,
+ but it allows more powerful argument expansion. It can parse arbitrary
+ argv[] style arrays and automatically set variables based on command
+ line arguments. It also allows command line arguments to be aliased via
+ configuration files and includes utility functions for parsing arbitrary
+ strings into argv[] arrays using shell-like rules.
+ .
+ This package contains the runtime library and locale data.
+ .
+ This is a minimal package for use in debian-installer.
Index: quilty/popt-1.7/debian/rules
===================================================================
--- quilty.orig/popt-1.7/debian/rules	2006-04-15 10:27:59.000000000 +0200
+++ quilty/popt-1.7/debian/rules	2006-04-24 20:39:56.000000000 +0200
@@ -24,6 +24,7 @@
 else
 cflags = -O2 -Wall -g
 endif
+cflags_udeb = -Os -Wall -g
 
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 install = install
@@ -31,28 +32,69 @@
 install = install-strip
 endif
 
+objdir = $(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE)
+objdir_udeb = $(objdir)-udeb
 
-configure: configure-stamp
-configure-stamp:
+configure: configure-deb-stamp configure-udeb-stamp
+
+configure-deb-stamp:
+	dh_testdir
+	# make build dir
+	mkdir $(objdir)
+	# Fix it so that automake doesn't run
+	cp -a $(CURDIR)/configure.in $(CURDIR)/configure.ac
+	# Add here commands to configure the package.
+	cd $(objdir) && \
+		../configure --prefix=/usr --mandir=/usr/share/man --enable-shared
+	touch $@
+
+configure-udeb-stamp:
 	dh_testdir
+	# make build dir
+	mkdir $(objdir_udeb)
 	# Fix it so that automake doesn't run
 	cp -a $(CURDIR)/configure.in $(CURDIR)/configure.ac
 	# Add here commands to configure the package.
-	./configure --prefix=/usr --mandir=/usr/share/man --enable-shared
-	touch configure-stamp
+	cd $(objdir_udeb) && \
+		../configure --prefix=/usr --mandir=/usr/share/man --enable-shared
+	touch $@
+
+build: build-arch build-indep
+build-arch: build-arch-deb-stamp build-arch-udeb-stamp
+
+build-arch-deb-stamp: configure-deb-stamp
+	dh_testdir
+
+	cd $(objdir) && \
+		$(MAKE) CFLAGS="$(cflags)"
 
-build: configure-stamp build-stamp
-build-stamp:
+	touch $@
+
+build-arch-udeb-stamp: configure-udeb-stamp
 	dh_testdir
 
-	$(MAKE) CFLAGS="$(cflags)"
+	cd $(objdir_udeb) && \
+		$(MAKE) CFLAGS="$(cflags_udeb)"
+
+	touch $@
 
-	touch build-stamp
+build-indep: build-indep-stamp
+build-indep-stamp:
+	dh_testdir
+	touch $@
 
 clean:
 	dh_testdir
 	dh_testroot
-	rm -f build-stamp configure-stamp config.log
+	rm -f config.log
+	rm -f build-arch-deb-stamp build-arch-udeb-stamp build-indep-stamp
+	rm -f configure-deb-stamp configure-udeb-stamp
+
+	# Remove build trees
+	rm -rf $(objdir) $(objdir_udeb)
+
+	# Remove install dirs
+	rm -rf $(CURDIR)/debian/tmp $(CURDIR)/debian/tmp-udeb
 
 	# Add here commands to clean up after the build process.
 	-$(MAKE) distclean
@@ -67,8 +109,18 @@
 	dh_clean -k
 	dh_installdirs
 
-	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp $(install)
-
+        # Main install
+	cd $(objdir) && \
+		$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+
+	# udeb install
+	cd $(objdir_udeb) && \
+		$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp-udeb
+
+	# Move the udeb library to /lib
+	mkdir $(CURDIR)/debian/tmp-udeb/lib/
+	mv $(CURDIR)/debian/tmp-udeb/usr/lib/libpopt.so.* \
+		$(CURDIR)/debian/tmp-udeb/lib/
 
 # Build architecture-independent files here.
 binary-indep: build install
@@ -98,7 +150,7 @@
 	dh_strip
 	dh_compress
 	dh_fixperms
-	dh_makeshlibs -V "libpopt0 (>= $(version))"
+	dh_makeshlibs -V "libpopt0 (>= $(version))" -plibpopt0 --add-udeb="libpopt0-udeb"
 	dh_installdeb
 #	dh_perl
 	dh_shlibdeps
Index: quilty/popt-1.7/debian/libpopt0-udeb.install
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ quilty/popt-1.7/debian/libpopt0-udeb.install	2006-04-24 20:40:13.000000000 +0200
@@ -0,0 +1 @@
+debian/tmp-udeb/lib/libpopt.so.*			lib

Reply to: