CVS java-package/debian

Jeroen van Wolffelaar jeroen@haydn.debian.org
Mon Jan 3 10:51:03 2005


Update of /cvsroot/pkg-java/java-package/debian
In directory haydn:/tmp/cvs-serv24980/debian

Modified Files:
	changelog rules 
Log Message:
* Substitute package version number at build time in the make-jpkg
  executable (Closes: #282221)


--- /cvsroot/pkg-java/java-package/debian/changelog	2005/01/03 17:31:51	1.6
+++ /cvsroot/pkg-java/java-package/debian/changelog	2005/01/03 17:50:35	1.7
@@ -1,3 +1,10 @@
+java-package (0.18) unstable; urgency=low
+
+  * Substitute package version number at build time in the make-jpkg
+    executable (Closes: #282221)
+
+ -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl>  Mon,  3 Jan 2005 18:47:47 +0100
+
 java-package (0.17) unstable; urgency=low
 
   * added a patch for detecting the architecture (Closes: #274844,
--- /cvsroot/pkg-java/java-package/debian/rules	2004/10/11 23:10:24	1.1.1.1
+++ /cvsroot/pkg-java/java-package/debian/rules	2005/01/03 17:50:35	1.2
@@ -12,7 +12,8 @@
 # This has to be exported to make some magic below work.
 export DH_OPTIONS
 
-
+# Extract source package version number from changelog
+VERSION := $(shell head -1 $(CURDIR)/debian/changelog | sed 's/.*(//;s/).*//')
 
 CFLAGS = -Wall -g
 
@@ -50,12 +51,14 @@
 
 	# Add here commands to compile the indep part of the package.
 	$(MAKE)
+	sed s/@VERSION@/$(VERSION)/ make-jpkg > make-jpkg.out
 	touch build-indep-stamp
 
 clean:
 	dh_testdir
 	dh_testroot
 	rm -f build-indep-stamp configure-stamp
+	rm -f make-jpkg.out
 	rm -f debian/sun-j2re1.3debian.postinst debian/sun-j2re1.3debian.prerm 
 	rm -f debian/sun-j2sdk1.3debian.postinst debian/sun-j2sdk1.3debian.prerm 
 	rm -f debian/sun-j2re1.4debian.postinst debian/sun-j2re1.4debian.prerm