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

[PATCH] isapnptools-udeb



This patch makes isapnptools 1.23-0.3 build a udeb.  I haven't gotten isapnp to
work properly in my chroot yet, so I'm not yet submitting this to the BTS, I'll
wait until I know I have something that works.

It is provided here so that we don't repeat work. 

I'm working on libdetect0-udeb now (which will depend on libisapnp-udeb for ISA
detection).

I'm not sure we need everything that I left in it, though pnpdump might
be helpful if there are problems during the install. isapnp, I'm going to need
read more about what it does to see if it would be useful.

$ dpkg -c isapnptools-udeb_1.23-0.3_i386.udeb 
drwxr-xr-x root/root         0 2000-12-30 17:03:30 ./
drwxr-xr-x root/root         0 2000-12-30 17:03:28 ./etc/
drwxr-xr-x root/root         0 2000-12-30 17:03:27 ./etc/init.d/
-rw-r--r-- root/root       776 2000-12-30 17:03:28 ./etc/isapnp.conf
-rw-r--r-- root/root       994 2000-12-30 17:03:28 ./etc/isapnp.gone
drwxrwxr-x root/root         0 2000-12-30 17:03:28 ./usr/
drwxrwxr-x root/root         0 2000-12-30 17:03:28 ./usr/lib/
-rw-r--r-- root/root     32246 2000-12-30 17:03:28 ./usr/lib/libisapnp.a
drwxrwxr-x root/root         0 2000-12-30 17:03:28 ./usr/sbin/
-rwxr-xr-x root/root     44897 2000-12-30 17:03:28 ./usr/sbin/pnpdump
drwxr-xr-x root/root         0 2000-12-30 17:03:28 ./sbin/
-rwxr-xr-x root/root     52366 2000-12-30 17:03:28 ./sbin/isapnp

$ ls -lh isapnptools-udeb_1.23-0.3_i386.udeb 
-rw-r--r-- 1 davidw ee 53k Dec 30 17:03 isapnptools-udeb_1.23-0.3_i386.udeb

-David


diff -ur isapnptools-1.23/debian/control isapnp/isapnptools-1.23/debian/control
--- isapnptools-1.23/debian/control	Sat Dec 30 14:44:28 2000
+++ isapnp/isapnptools-1.23/debian/control	Sat Dec 30 17:01:25 2000
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Frederic Lepied <Lepied@debian.org>
 Standards-Version: 3.1.1
-Build-Depends: debstd
+Build-Depends: debstd, debhelper
 
 Package: isapnptools
 Architecture: i386 alpha
@@ -23,3 +23,10 @@
  This package provides a header file and a static library for
  development of software that detects and configures ISA Plug-And-Play
  devices.
+
+Package: isapnptools-udeb
+Architecture: i386 alpha
+Depends: ${shlibs:Depends}, dpkg (>= 1.4.0.21)
+Description: ISA Plug-And-Play utilities for debian-installer.
+ isapnptools-udeb is a minimal package used by the debian-installer.
+
diff -ur isapnptools-1.23/debian/rules isapnp/isapnptools-1.23/debian/rules
--- isapnptools-1.23/debian/rules	Sat Dec 30 14:44:28 2000
+++ isapnp/isapnptools-1.23/debian/rules	Sat Dec 30 17:03:22 2000
@@ -14,26 +14,42 @@
 
 build:
 	$(checkdir)
+	# must make clean since udeb and deb build in same place
+	-$(MAKE) clean
 	./configure --prefix=/usr
 	$(MAKE)
 
 	touch build
 
+
+build-udeb: build-udeb-stamp
+build-udeb-stamp:
+	$(checkdir)
+	# must make clean since udeb and deb build in same place
+	-$(MAKE) clean
+	./configure --prefix=/usr
+	$(MAKE) CFLAGS="-Os -fomit-frame-pointer"
+
+	touch $@
+
 clean:
 	$(checkdir)
-	-rm -f build
+	-rm -f build build-udeb-stamp
 	-$(MAKE) distclean
 	-rm -f `find . -name "*~" -o -name "*.orig"`
-	-rm -rf debian/tmp debian/files* debian/libisapnp-dev core debian/substvars
+	-rm -rf debian/tmp debian/isapnptools-udeb debian/isapnptools-udeb.substvars debian/files* debian/libisapnp-dev core debian/substvars
 	-rm -rf debian/libisapnp-dev.copyright debian/libisapnp-dev.changelog
 
+
 binary-indep:	checkroot build
 	$(checkdir)
 # There are no architecture-independent files to be uploaded
 # generated by this package.  If there were any they would be
 # made here.
 
-binary-arch:	checkroot build
+binary-arch: isapnptools isapnptools-udeb	
+
+isapnptools: checkroot build
 	$(checkdir)
 	-rm -rf debian/tmp debian/libisapnp-dev debian/libisapnp-dev.copyright debian/libisapnp-dev.changelog
 	install -d debian/tmp/etc/init.d debian/libisapnp-dev/usr/share/doc/libisapnp-dev
@@ -53,6 +69,32 @@
 	chmod -R go=rX debian/tmp debian/libisapnp-dev
 	dpkg --build debian/tmp ..
 	dpkg --build debian/libisapnp-dev ..
+
+
+packageudeb=isapnptools-udeb
+VERSION=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
+ARCH=$(shell dpkg --print-architecture)
+FILENAME=$(packageudeb)_$(VERSION)_$(ARCH).udeb
+PRIORITY=$(shell grep ^Priority: debian/control | cut -d ' ' -f 2)
+
+isapnptools-udeb: checkroot build-udeb
+	$(checkdir)
+	-rm -rf debian/$@
+	install -d debian/$@/etc/init.d debian/libisapnp-dev/usr/share/doc/libisapnp-dev
+	make install DESTDIR=`pwd`/debian/$@
+	-rm -rf debian/$@/usr/include/ debian/$@/usr/man/
+	install -m 644 etc/* debian/$@/etc
+	install -d -m 755 `pwd`/debian/$@/sbin
+	mv `pwd`/debian/$@/usr/sbin/isapnp `pwd`/debian/$@/sbin/isapnp
+	# Don't write your stupid guesses to debian/files.
+	dh_shlibdeps -p$@
+	dh_gencontrol           -p$@ -- -fdebian/files~
+	# Register file manually.
+	dpkg-distaddfile        $(FILENAME) debian-installer $(PRIORITY)
+	dh_md5sums              -p$@
+	dh_builddeb             -p$@ --filename=$(FILENAME)
+
+
 
 define checkdir
 	test -f debian/rules



Reply to: