[PATCH] ash udeb build support for debian-installer
Package: ash
Severity: wishlist
Version: 0.3.7
Herbert, as you may have heard, debian-installer uses udeb packages to
create the initial boot system. Here's a patch that allows ash to build
.udeb packages.
randolph
--
Debian Developer <tausq@debian.org>
http://www.TauSq.org/
diff -uNr ash-0.3.7/debian/rules ash-0.3.7-new/debian/rules
--- ash-0.3.7/debian/rules Sat Dec 9 23:03:43 2000
+++ ash-0.3.7-new/debian/rules Sat Dec 9 23:01:08 2000
@@ -6,20 +6,29 @@
CDEF = -g -O2 -Wall -DBSD=1 -DSMALL -D_GNU_SOURCE \
-DGLOB_BROKEN \
-D__COPYRIGHT\(x\)= -D__RCSID\(x\)= -D_DIAGASSERT\(x\)=
+CDEFSM = -Os -fomit-frame-pointer -Wall -DBSD=1 -DSMALL -D_GNU_SOURCE \
+ -DGLOB_BROKEN \
+ -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= -D_DIAGASSERT\(x\)=
sh.hetio:
chmod u+x debian/bsdyacc
- rm -f hetio.o input.o main.o trap.o
+ rm -f *.o
pmake CFLAGS='$(CDEF)' HETIO= YACC=`pwd`/debian/bsdyacc
mv sh sh.hetio
sh:
chmod u+x debian/bsdyacc
- rm -f hetio.o input.o main.o trap.o
+ rm -f *.o
pmake CFLAGS='$(CDEF)' YACC=`pwd`/debian/bsdyacc
+sh.udeb:
+ chmod u+x debian/bsdyacc
+ rm -f *.o
+ pmake CFLAGS='$(CDEFSM)' YACC=`pwd`/debian/bsdyacc
+ mv sh sh.udeb
+
build: build-stamp
-build-stamp: sh.hetio sh
+build-stamp: sh.hetio sh.udeb sh
dh_testdir
touch build-stamp
@@ -30,7 +39,7 @@
rm -f build-stamp
pmake clean HETIO=
- rm -f sh.cat1 mksignames signames.h sh.hetio
+ rm -f sh.cat1 mksignames signames.h sh.hetio sh.udeb
dh_clean
@@ -69,6 +78,33 @@
# dh_makeshlibs
dh_md5sums
dh_builddeb
+
+ $(MAKE) -f debian/rules binary-udeb
+
+# udeb support
+PACKAGE=ash
+VERSION=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
+ARCH=$(shell dpkg --print-architecture)
+FILENAME=$(PACKAGE)_$(VERSION)_$(ARCH).udeb
+PRIORITY=$(shell grep ^Priority: debian/control | cut -d ' ' -f 2 | head -1)
+
+binary-udeb: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ install sh.udeb debian/tmp/bin/ash
+
+ dh_strip -p$(PACKAGE)
+ dh_compress -p$(PACKAGE)
+ dh_fixperms -p$(PACKAGE)
+ dh_installdeb -p$(PACKAGE)
+ dh_shlibdeps -p$(PACKAGE)
+ dh_gencontrol -p$(PACKAGE) -- -fdebian/files~
+ dpkg-distaddfile $(FILENAME) debian-installer $(PRIORITY)
+ dh_md5sums -p$(PACKAGE)
+ dh_builddeb -p$(PACKAGE) --filename=$(FILENAME)
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
Reply to: