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

[PATCH]: libdetect0-pic for debian-installer



Package: libdetect0
Version: 0.9.72-5


I've patched libdetect to create a pic library suitable for mklibs.sh rather
than making udeb.  

This replaces my earlier (wrong) effort to solve this problem with
libdetect0-udeb.  This saves over 100k (uncompressed) on the nic autodetect
floppy.


-David


diff -ur detect-0.9.72-5.orig/debian/control detect-0.9.72/debian/control
--- detect-0.9.72-5.orig/debian/control	Sat Feb 10 22:37:46 2001
+++ detect-0.9.72/debian/control	Sat Feb 10 22:47:11 2001
@@ -26,11 +26,11 @@
  partitions, ethernet cards, floppy drives, modems, mice, SCSI,
  sound cards, and video cards.
 
-Package: libdetect0-udeb
-Section: debian-installer
+Package: libdetect0-pic
+Section: libs
 Architecture: i386 alpha powerpc sparc
 Depends: ${shlibs:Depends}
-Description: Detect is a library for automatic hardware detection.
- libdetect0-udeb is a minimal package used by the debian-installer.
- This library package contains only the symbols needed to detect the hardware
- that the debian-installer is interested in: ethernet cards.
+Description: Library for automatic hardware detection, share library subset kit.
+ This is used to develop subsets of the detect shared library for use
+ on custom installation floppies and in embedded systems. Unless you're
+ making one of those, you won't need this package.
diff -ur detect-0.9.72-5.orig/debian/rules detect-0.9.72/debian/rules
--- detect-0.9.72-5.orig/debian/rules	Sat Feb 10 22:37:46 2001
+++ detect-0.9.72/debian/rules	Sat Feb 10 23:10:28 2001
@@ -36,29 +36,22 @@
 
 	# Add here commands to compile the package.
 	$(MAKE)
+	
+	# This builds the pic library
+	ar cqv $(topdir)/src/libdetect_pic.a $(topdir)/src/*.lo
 
 	touch build-stamp
 
-UDEB_MAKE_VARS=libdetect_la_OBJECTS="pcmcia.lo pci.lo isa.lo ethernet.lo conv.lo modem.lo serial.lo utils.lo disk.lo cdrom.lo lst.lo"  sbin_PROGRAMS= SUBDIRS= libdetect_la_LIBADD= libdetect_la_DEPENDENCIES=
-
-build-udeb: build-udeb-stamp
-build-udeb-stamp:
-	dh_testdir
-	chmod +x $(topdir)/autogen.sh
-	$(topdir)/autogen.sh --with-kernel-source=/usr/src/kernel-headers-2.2.17 --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
-
-	(cd $(topdir)/src; $(MAKE) clean; $(MAKE) $(UDEB_MAKE_VARS) )
-	touch $@
-
 
 clean:
 	dh_testdir
 	dh_testroot
-	rm -f build-stamp build-udeb-stamp
+	rm -f build-stamp
 
 	# Add here commands to clean up after the build process.
 	-$(MAKE) distclean
 	rm -rf po/cat-id-tbl.c po/stamp-cat-id po/*.gmo
+	-rm -f $(topdir)/src/libdetect_pic.a
 
 	dh_clean
 
@@ -70,28 +63,22 @@
 
 	# Add here commands to install the package into debian/tmp.
 	$(MAKE) install prefix=`pwd`/debian/tmp/usr
-
-install-udeb: build-udeb
-	dh_testdir
-	dh_testroot
-	dh_clean -k
-	dh_installdirs
-	(cd $(topdir)/src/ && \
-	$(MAKE) install prefix=$(topdir)/debian/libdetect0-udeb/usr $(UDEB_MAKE_VARS) )
-
+	
+	mkdir -p debian/libdetect0-pic/usr/lib
+	cp $(topdir)/src/libdetect_pic.a debian/libdetect0-pic/usr/lib/
 
 # Build architecture-independent files here.
 binary-indep: build install
 # We have nothing to do by default.
 
 # Build architecture-dependent files here.
-binary-arch: libdetect0 libdetect0-udeb
+binary-arch: libdetect0
 
 libdetect0: build install
 #	dh_testversion
 	dh_testdir
 	dh_testroot
-	dh_installdocs --no-package=libdetect0-udeb
+	dh_installdocs
 	#
 	# build libdetect${major} package by moving files from detect-dev
 	#
@@ -104,50 +91,19 @@
                usr/share/man
 	rm -fr debian/tmp/usr/share/locale debian/tmp/usr/share/detect debian/tmp/usr/sbin debian/tmp/usr/share/man
 
-	dh_installmanpages --no-package=libdetect-dev
+	dh_installmanpages --no-package=libdetect-dev --no-package=libdetect0-pic
 	dh_installinfo
-	dh_installchangelogs ChangeLog --no-package=libdetect0-udeb
+	dh_installchangelogs ChangeLog
 	dh_link
 	dh_strip
 	dh_compress
 	dh_fixperms
-	dh_makeshlibs --no-package=libdetect0-udeb
-	dh_installdeb --no-package=libdetect0-udeb
-	dh_shlibdeps --no-package=libdetect0-udeb
-	dh_gencontrol --no-package=libdetect0-udeb
-	dh_md5sums --no-package=libdetect0-udeb
-	dh_builddeb --no-package=libdetect0-udeb
-
-UDEBPACKAGE=libdetect0-udeb
-VERSION=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
-ARCH=$(shell dpkg --print-architecture)
-FILENAME=$(UDEBPACKAGE)_$(VERSION)_$(ARCH).udeb
-PRIORITY=$(shell grep ^Priority: debian/control | cut -d ' ' -f 2)
-
-
-libdetect0-udeb: build-udeb install-udeb
-	mkdir -p debian/$@
-	@echo "Building $@"
-	dh_testdir
-	rm -rf debian/$@/usr/share/locale/ debian/$@/usr/share/man/ \
-		debian/$@/usr/lib/libdetect.a \
-		debian/$@/usr/lib/libdetect.la \
-		debian/$@/usr/sbin \
-		debian/$@/usr/sbin/detect debian/$@/usr/include/ \
-	dh_testroot
-	dh_installdirs
-	dh_strip -p$@
-	dh_compress -p$@
-	dh_fixperms -p$@
-	dh_installdeb -p$@
-	dh_shlibdeps -p$@
-	# Don't write your stupid guesses to debian/files.
-	dh_gencontrol -p$@ -- -fdebian/files~
-	# Register # file # manually.
-	dpkg-distaddfile $(FILENAME) debian-installer $(PRIORITY)
-	dh_md5sums -p$@
-	dh_builddeb -p$@ --filename=$(FILENAME)
-
+	dh_makeshlibs 
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
 
 
 binary: binary-indep binary-arch



Reply to: