Package: qemu
Version: 0.8.0-2
Severity: normal
Tags: patch

Fix package cleanup bugs detected by running "debuild; debclean; debuild -S".

Changelog:

  * Fix package build/clean/build bugs.
    - Use "make distclean" to remove Makefile symlinks.
    - Save original qemu docs before compilation and restore them on cleanup.

--
Anderson Lizardo
Embedded Linux Lab - 10LE
Nokia Institute of Technology - INdT
Manaus - Brazil
diff -u qemu-0.8.0/debian/rules qemu-0.8.0/debian/rules
--- qemu-0.8.0/debian/rules
+++ qemu-0.8.0/debian/rules
@@ -23,6 +23,12 @@
 	ppc_rom.bin \
 	proll.elf
 
+qemu_docs = \
+	qemu-doc.html \
+	qemu-tech.html \
+	qemu.1 \
+	qemu-img.1
+
 include debian/patch.mk
 
 config-host.mak: configure
@@ -36,14 +42,23 @@
 build: patch config-host.mak
 	dh_testdir
 	
+	# Force documentation rebuild
+	-for i in $(qemu_docs); do \
+	  test ! -f $$i.keep && mv $$i $$i.keep; \
+	done
+	
 	$(MAKE)
 
 clean: unpatch
 	dh_testdir
 	dh_testroot
 	
-	-$(MAKE) clean
-	rm -f qemu-doc.html qemu.1 qemu-img.1 qemu-tech.html
+	-$(MAKE) distclean
+	
+	# Move original qemu docs back
+	-for i in $(qemu_docs); do \
+	  test -f $$i.keep && mv $$i.keep $$i; \
+	done
 	
 	dh_clean
 

Reply via email to