[xml/sgml-commit] r207 - packages/libxml2/trunk/debian

Mike Hommey glandium-guest@haydn.debian.org
Sat, 31 Jul 2004 01:47:41 -0600


Author: glandium-guest
Date: 2004-07-31 01:47:38 -0600 (Sat, 31 Jul 2004)
New Revision: 207

Modified:
   packages/libxml2/trunk/debian/changelog
   packages/libxml2/trunk/debian/rules
Log:
debian/rules: Backup files that are removed or modified by upstream build system and restore them so that calling the clean target actually gives the same tree as before a build.
debian/changelog: removed the NOT RELEASED YET message. This will be 2.6.11-3.


Modified: packages/libxml2/trunk/debian/changelog
===================================================================
--- packages/libxml2/trunk/debian/changelog	2004-07-31 06:25:11 UTC (rev 206)
+++ packages/libxml2/trunk/debian/changelog	2004-07-31 07:47:38 UTC (rev 207)
@@ -1,10 +1,12 @@
 libxml2 (2.6.11-3) unstable; urgency=low
 
-  * NOT RELEASED YET
   * debian/control: add a space between gcc-3.2 and [hppa]. Closes: #262101.
   * python/drv_libxml2.py: add encoding declaration. Closes: #259526.
+  * debian/rules: Backup files that are removed or modified by upstream build
+    system and restore them so that calling the clean target actually gives
+    the same tree as before a build.
 
- -- Mike Hommey <mh@glandium.org>  Sat, 31 Jul 2004 15:22:38 +0900
+ -- Mike Hommey <mh@glandium.org>  Sat, 31 Jul 2004 16:44:06 +0900
 
 libxml2 (2.6.11-2) unstable; urgency=medium
 

Modified: packages/libxml2/trunk/debian/rules
===================================================================
--- packages/libxml2/trunk/debian/rules	2004-07-31 06:25:11 UTC (rev 206)
+++ packages/libxml2/trunk/debian/rules	2004-07-31 07:47:38 UTC (rev 207)
@@ -3,6 +3,8 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+WORKAROUND_BACKUP_FILES=python/libxml2-py.c include/libxml/xmlversion.h libxml2.spec python/setup.py doc/xmlcatalog.1
+
 CFLAGS = -Wall -g
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -19,13 +21,19 @@
 build-stamp:
 	dh_testdir
 
+	# Workaround backups because of non-idempotent upstream:
+	for file in $(WORKAROUND_BACKUP_FILES); do \
+	  cp -f -a $${file} $${file}-tmp; \
+	done
+
+	# ./configure
 	$(FORCEGCC) CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --with-python=/usr/bin/python2.3
 	echo "all:" > example/Makefile
 	echo "install:" >> example/Makefile
 	echo "distclean:" >> example/Makefile
 	echo "	rm -rf .deps" >> example/Makefile
 
-	cp -f -a python/libxml2-py.c python/libxml2-py.c-tmp
+	# Build libxml2
 	$(MAKE)
 
 	touch build-stamp
@@ -39,6 +47,13 @@
 	-rm -f example/Makefile
 	rm COPYING && cp Copyright COPYING
 
+	# Restore workaround backups
+	-for file in $(WORKAROUND_BACKUP_FILES); do \
+	  test -r $${file}-tmp && \
+	  cat $${file}-tmp > $${file} && \
+	  rm -f $${file}-tmp; \
+	done
+
 	-test -r /usr/share/misc/config.sub && \
 	cp -f /usr/share/misc/config.sub config.sub
 	-test -r /usr/share/misc/config.guess && \
@@ -58,12 +73,9 @@
 	  install
 
 	mkdir -p debian/tmp/usr/share/doc/libxml2-doc/html
-	install doc/*.html doc/*.gif debian/tmp/usr/share/doc/libxml2-doc/html/
+	install -m 644 doc/*.html doc/*.gif debian/tmp/usr/share/doc/libxml2-doc/html/
 
 	mv debian/tmp/usr/share/aclocal/libxml.m4 debian/tmp/usr/share/aclocal/libxml2.m4
-	-test -r python/libxml2-py.c-tmp && \
-	cat python/libxml2-py.c-tmp > python/libxml2-py.c && \
-	rm -f python/libxml2-py.c-tmp
 
 	touch install-stamp