New version of debian.diff as discussed on IRC.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
diff -ur cpio-2.9/debian/control cpio-2.9.mingw32/debian/control
--- cpio-2.9/debian/control	2007-12-27 17:20:57.000000000 +0100
+++ cpio-2.9.mingw32/debian/control	2007-12-27 17:22:50.000000000 +0100
@@ -3,6 +3,7 @@
 Priority: important
 Maintainer: Clint Adams <[EMAIL PROTECTED]>
 Build-Depends: texinfo, gettext
+Build-Depends-Indep: mingw32
 Standards-Version: 3.7.3
 Vcs-Git: git://git.debian.org/git/private/schizo/cpio
 Vcs-Browser: http://git.debian.org/?p=private/schizo/cpio/.git
@@ -16,3 +17,15 @@
  GNU cpio is a tool for creating and extracting archives, or copying
  files from one place to another.  It handles a number of cpio formats
  as well as reading and writing tar files.
+
+Package: cpio-win32
+Architecture: all
+Priority: extra
+Suggests: wine
+Description: GNU cpio -- a program to manage archives of files (win32 build)
+ GNU cpio is a tool for creating and extracting archives, or copying
+ files from one place to another.  It handles a number of cpio formats
+ as well as reading and writing tar files.
+ .
+ This is a win32 version of cpio.  It's meant to be used by the win32-loader
+ component of Debian-Installer.
diff -ur cpio-2.9/debian/rules cpio-2.9.mingw32/debian/rules
--- cpio-2.9/debian/rules	2007-12-27 17:20:57.000000000 +0100
+++ cpio-2.9.mingw32/debian/rules	2007-12-27 17:37:52.000000000 +0100
@@ -28,7 +28,7 @@
 INSTALL_PROGRAM += -s
 endif
 
-Makefile:
+build/Makefile:
 	$(checkdir)
 	mkdir -p obj
 	cd obj && CFLAGS='$(CFLAGS)' CPIO_MT_PROG=mt ../configure --prefix=/usr $(CROSS) \
@@ -39,7 +39,12 @@
 
 	touch tests/testsuite
 
-build:	Makefile
+build-win32/Makefile:
+	$(checkdir)
+	mkdir -p obj-win32
+	cd obj-win32 && CFLAGS='$(CFLAGS)' ../configure --host i586-mingw32msvc
+
+build:	build/Makefile
 	$(checkdir)
 	$(MAKE) -C obj
 	touch tests/testsuite.at tests/testsuite
@@ -48,17 +53,44 @@
 endif
 	touch build
 
+build-win32:	build-win32/Makefile
+	$(checkdir)
+	$(MAKE) -C obj-win32
+	touch build-win32
+
 clean:
 	$(checkdir)
 	$(RM) build
 	-$(MAKE) -i distclean
 	$(RM) config.cache
-	$(RM) -r obj
-	$(RM) -r *~ debian/tmp debian/*~ debian/files*
+	$(RM) -r obj obj-win32
+	$(RM) -r *~ debian/tmp debian/tmp-win32 debian/*~ debian/files*
 	$(RM) -f debian/substvars
 
-binary-indep:	checkroot build
+binary-indep:	checkroot build build-win32
 	$(checkdir)
+	$(RM) -r debian/tmp-win32
+	$(INSTALL_DIR) debian/tmp-win32 debian/tmp-win32/DEBIAN
+	$(INSTALL_DIR) debian/tmp-win32/usr/share/doc/$(package)-win32
+# Install directories
+	$(INSTALL_DIR) 	\
+		debian/tmp-win32/usr/share/win32
+# Install files
+	install -m 755 obj-win32/src/cpio.exe debian/tmp-win32/usr/share/win32/
+# Install changelog & copyright
+	install -m 644 debian/changelog \
+	  debian/tmp-win32/usr/share/doc/$(package)-win32/changelog.Debian
+	gzip -9v debian/tmp-win32/usr/share/doc/$(package)-win32/*
+	install -m 644 debian/copyright debian/tmp-win32/usr/share/doc/$(package)-win32/.
+
+# Generate md5sums
+	cd debian/tmp-win32 && find * -type f ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums
+
+# Generate deb file
+	dpkg-gencontrol -pcpio-win32 -Pdebian/tmp-win32
+	chown -R root.root debian/tmp-win32
+	chmod -R g-ws debian/tmp-win32
+	dpkg-deb --build debian/tmp-win32 ..
 
 binary-arch:	checkroot build
 	$(checkdir)
@@ -101,7 +133,7 @@
 	cd debian/tmp && find * -type f ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum > DEBIAN/md5sums
 
 # Generate deb file
-	dpkg-gencontrol -isp
+	dpkg-gencontrol -pcpio -Pdebian/tmp
 	chown -R root.root debian/tmp
 	chmod -R g-ws debian/tmp
 	dpkg-deb --build debian/tmp ..

Reply via email to