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

patch for mac-fdisk-udeb and pmac-fdisk-udeb



tag 188420 + patch
thanks, 

I made a patch for mac-fdisk to build udebs.
I hope the changes are how you like them, otherwise please tell me. I
took the build process of fdisk-udeb as a starting point. I have put
mac-fdisk to /usr/sbin because then it's in the same directory as in
fdisk-udeb.

- gaudenz

--- debian/control.orig	2003-05-24 12:34:14.000000000 +0200
+++ debian/control	2003-05-24 12:34:27.000000000 +0200
@@ -36,3 +36,33 @@
  Pmac-fdisk allows you to create and edit the partition table of a disk. 
  It supports the PC partition format as used on PowerPC. It is an 
  interactive tool similar to PC fdisk. 
+
+Package: mac-fdisk-udeb
+Architecture: powerpc m68k
+Priority: standard
+Section: debian-installer
+Depends: ${shlibs:Depends}
+Description:  Apple disk partition manipulation tool
+ The fdisk utilities from the MkLinux project, adopted for Linux/m68k.
+ Mac-fdisk allows you to create and edit the partition table of a disk. 
+ It supports only the Apple partition format used on Macintosh and PowerMac, 
+ use pmac-fdisk for PC partition format disks as used on PowerPC machines. 
+ Mac-fdisk is an interactive tool with a menu similar to PC fdisk, supported 
+ options are somewhat different from PC fdisk due to the differences in 
+ partition format.
+ .
+ This is a minimal mac-fdisk package used by the debian-installer.
+
+Package: pmac-fdisk-udeb
+Architecture: powerpc
+Priority: standard
+Section: debian-installer
+Depends: ${shlibs:Depends}
+Description: fdisk partition manipulation tool for PowerPC
+ The fdisk utilities from the MkLinux project, adopted for Linux/ppc.
+ Pmac-fdisk allows you to create and edit the partition table of a disk. 
+ It supports the PC partition format as used on PowerPC. It is an 
+ interactive tool similar to PC fdisk. 
+ .
+ This is a minimal pmac-fdisk package used by the debian-installer.
+
--- debian/rules.orig	2003-05-24 12:34:19.000000000 +0200
+++ debian/rules	2003-05-24 12:34:23.000000000 +0200
@@ -10,10 +10,14 @@
 packmc  = mac-fdisk-cross
 packpmn = pmac-fdisk
 packpmc = pmac-fdisk-cross
+packudeb = mac-fdisk-udeb
+packpudeb = pmac-fdisk-udeb
 tmpmn   = debian/tmp
 tmpmc   = debian/$(packmc)
 tmppmn  = debian/$(packpmn)
 tmppmc  = debian/$(packpmc)
+tmpudeb = debian/$(packudeb)
+tmppudeb = debian/$(packpudeb)
 docmn   = $(tmpmn)/usr/share/doc/$(packmn)
 docmc   = $(tmpmc)/usr/share/doc/$(packmc)
 docpmn  = $(tmppmn)/usr/share/doc/$(packpmn)
@@ -29,7 +33,7 @@
 	-rm -f build
 	-make clean
 	-rm -f `find . -name "*~"`
-	-rm -rf $(tmpmn) $(tmpmc) $(tmppmn) $(tmppmc) debian/files* core debian/substvars
+	-rm -rf $(tmpmn) $(tmpmc) $(tmppmn) $(tmppmc) $(tmpudeb) $(tmppudeb) debian/files* core debian/substvars
 
 binary-indep: build
 	$(checkdir)
@@ -84,6 +88,21 @@
 	fi
 	# and move the pdisk man page back again ...
 	mv pdisk.8.in pdisk.8
+
+	# install mac-fdisk-udeb files
+	set -e; if [ "$(BUILDARCH)" = "m68k" -o "$(BUILDARCH)" = "powerpc" ]; then \
+		install -d $(tmpudeb)/usr/sbin; \
+		install -d $(tmpudeb)/DEBIAN; \
+		install -m 755 pdisk $(tmpudeb)/usr/sbin/mac-fdisk; \
+	fi
+
+	# install pmac-fdisk-udeb files
+	set -e; if [ "$(BUILDARCH)" = "powerpc" ]; then \
+		install -d $(tmppudeb)/usr/sbin; \
+		install -d $(tmppudeb)/DEBIAN; \
+		install -m 755 fdisk $(tmppudeb)/usr/sbin/pmac-fdisk; \
+	fi
+
 	# build native pdisk only for m68k, cross package only for others
 	set -e; if [ "$(BUILDARCH)" = "m68k" -o "$(BUILDARCH)" = "powerpc" ]; then \
 		dh_strip -p$(packmn) -P$(tmpmn); \
@@ -131,6 +150,26 @@
 		dh_builddeb -p$(packpmc); \
 	fi
 
+	# build mac-fdisk-udeb on powerpc and m68k
+	set -e; if [ "$(BUILDARCH)" = "m68k" -o "$(BUILDARCH)" = "powerpc" ]; then \
+		dh_strip -p$(packudeb); \
+		dh_installdeb -p$(packudeb); \
+		dh_shlibdeps -p$(packudeb); \
+		dh_gencontrol -p$(packudeb) -- -isp -fdebian/files~; \
+		dpkg-distaddfile $(packudeb)_$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)_$(BUILDARCH).udeb debian-installer standard; \
+		dh_builddeb -p$(packudeb) --filename=$(packudeb)_$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)_$(BUILDARCH).udeb; \
+	fi
+
+	# build pmac-fdisk-udeb on powerpc
+	set -e; if [ "$(BUILDARCH)" = "powerpc" ]; then \
+		dh_strip -p$(packpudeb); \
+		dh_installdeb -p$(packpudeb); \
+		dh_shlibdeps -p$(packpudeb); \
+		dh_gencontrol -p$(packpudeb) -- -isp -fdebian/files~; \
+		dpkg-distaddfile $(packpudeb)_$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)_$(BUILDARCH).udeb debian-installer standard; \
+		dh_builddeb -p$(packpudeb) --filename=$(packpudeb)_$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)_$(BUILDARCH).udeb; \
+	fi
+
 define checkdir
 	test -f debian/rules
 endef

Reply to: