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

Re: cdebconf-slang-udeb for use in cdrom 2.88 MiB floppy?



On Sat, Jan 25, 2003 at 12:11:39PM +0100, Petter Reinholdtsen wrote:
> [Matt Kraai]
> > No.  For each frontend, create a udeb that contains only its shared
> > library (e.g., /usr/lib/cdebconf/frontend/slang.so in
> > cdebconf-slang-udeb) and include the slang package on the 2.88
> > CD-ROM image (in addition to cdebconf-udeb).
> 
> OK, agreed.  Lets split the task in two, one is making the frontend
> available, and the other is choosing it at boot time.
> 
> Can you fix this change?  I'm not good enough with debian packages and
> debhelper to do this.

Would you please test the following patch?

Matt

diff -ur debian-installer.orig/tools/cdebconf/debian/control debian-installer/tools/cdebconf/debian/control
--- debian-installer.orig/tools/cdebconf/debian/control	2002-11-23 15:24:03.000000000 -0800
+++ debian-installer/tools/cdebconf/debian/control	2003-01-25 10:24:01.000000000 -0800
@@ -49,6 +49,19 @@
  cdebconf-udeb is a minimal cdebconf package used by the 
  debian-installer
 
+Package: cdebconf-slang-udeb
+Architecture: any
+Section: debian-installer
+Priority: standard
+Description: S-Lang frontend for Debian Configuration Management System
+ Debconf is a configuration management system for Debian packages. It is
+ used by some packages to prompt you for information before they are
+ installed. This is a reimplementation of the original debconf version
+ in C.
+ .
+ cdebconf-slang-udeb is a minimal S-Lang frontend cdebconf package used
+ by the debian-installer.
+
 Package: libdebconf1
 Architecture: any
 Section: libs
diff -ur debian-installer.orig/tools/cdebconf/debian/rules debian-installer/tools/cdebconf/debian/rules
--- debian-installer.orig/tools/cdebconf/debian/rules	2002-12-04 15:34:25.000000000 -0800
+++ debian-installer/tools/cdebconf/debian/rules	2003-01-25 10:37:07.000000000 -0800
@@ -12,13 +12,16 @@
 udebbuild=$(topdir)/debian/build-udeb
 debbuild=$(topdir)/debian/build
 
-PACKAGE=cdebconf-udeb
 VERSION=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
 DEB_HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
-FILENAME=$(PACKAGE)_$(VERSION)_$(DEB_HOST_ARCH).udeb
-PRIORITY=$(shell grep '^Package: cdebconf-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
 CONFFILE=/etc/cdebconf.conf
 
+udebname=cdebconf-udeb_$(VERSION)_$(DEB_HOST_ARCH).udeb
+udebpriority=$(shell grep '^Package: cdebconf-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
+
+slang_udebname=cdebconf-slang-udeb_$(VERSION)_$(DEB_HOST_ARCH).udeb
+slang_udebpriority=$(shell grep '^Package: cdebconf-slang-udeb' debian/control -A 10 | grep ^Priority: | cut -d ' ' -f 2)
+
 #package names
 LIBDEBCONFDEV=libdebconf1-dev
 LIBDEBCONF=libdebconf1
@@ -54,7 +57,7 @@
 	(cd $(udebbuild); CFLAGS="$(CFLAGS) $(SIZEOPTFLAG) -fomit-frame-pointer" \
 		$(topdir)/configure --prefix=/usr --sysconfdir=/etc \
 		--without-rpath --with-db="rfc822db" \
-		--with-frontend="text" $(DEBUG_CONFIGURE_OPT) \
+		--with-frontend="text slang" $(DEBUG_CONFIGURE_OPT) \
 		--with-conffile=$(CONFFILE))
 	(cd $(udebbuild); $(MAKE) clean; $(MAKE))
 	touch $@
@@ -83,8 +86,18 @@
 		etcdir=$(shell pwd)/debian/cdebconf-udeb/etc )
 	rm -rf $(shell pwd)/debian/cdebconf-udeb/usr/include
 	rm -rf $(shell pwd)/debian/cdebconf-udeb/usr/share/man
+	rm -rf $(shell pwd)/debian/cdebconf-udeb/usr/lib/cdebconf/frontend/slang.so
 	rm -rf $(shell pwd)/debian/cdebconf-udeb/usr/lib/lib*.a
 
+install-slang-udeb: build-udeb
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+	dh_installdebconf -n -pcdebconf-slang-udeb
+	(cd $(udebbuild)/src/modules/frontend/slang; \
+		$(MAKE) install prefix=$(shell pwd)/debian/cdebconf-slang-udeb/usr )
+
 install: build
 	dh_testdir
 	dh_testroot
@@ -108,7 +121,7 @@
 # Build architecture-dependent files here.
 #
 # Note that this builds a .udeb, which is not policy compliant or anything.
-binary-arch: cdebconf cdebconf-udeb
+binary-arch: cdebconf cdebconf-udeb cdebconf-slang-udeb
 
 $(LIBDEBCONF): install
 	dh_testdir
@@ -176,10 +189,28 @@
 	# Don't write your stupid guesses to debian/files.
 	dh_gencontrol 		-p$@ -- -fdebian/files~
 	# Register file manually.
-	dpkg-distaddfile	$(FILENAME) debian-installer $(PRIORITY)
+	dpkg-distaddfile	$(udebname) debian-installer $(udebpriority)
+# udebs shouldn't have md5sums.
+#	dh_md5sums		-p$@
+	dh_builddeb		-p$@ --filename=$(udebname)
+
+cdebconf-slang-udeb: install-slang-udeb
+	@echo "Building $@"
+	dh_testdir
+	dh_testroot
+	dh_installdirs
+	dh_strip		-p$@
+	dh_compress		-p$@
+	dh_fixperms		-p$@
+	dh_installdeb		-p$@
+	dh_shlibdeps -p$@ -ldebian/$@/usr/lib
+	# Don't write your stupid guesses to debian/files.
+	dh_gencontrol 		-p$@ -- -fdebian/files~
+	# Register file manually.
+	dpkg-distaddfile	$(slang_udebname) debian-installer $(slang_udebpriority)
 # udebs shouldn't have md5sums.
 #	dh_md5sums		-p$@
-	dh_builddeb		-p$@ --filename=$(FILENAME)
+	dh_builddeb		-p$@ --filename=$(slang_udebname)
 
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install



Reply to: