[syrthes/master] Rename version handling environment variables.

Gilles Filippini gilles.filippini at free.fr
Fri Jul 10 22:50:09 UTC 2009


---
 debian/control    |    6 +++---
 debian/control.in |    6 +++---
 debian/dirs.in    |   16 ++++++++--------
 debian/rules      |   21 ++++++++++++++-------
 4 files changed, 28 insertions(+), 21 deletions(-)

diff --git a/debian/control b/debian/control
index 79aa6d3..291fb33 100644
--- a/debian/control
+++ b/debian/control
@@ -9,10 +9,10 @@ Homepage: http://rd.edf.com/syrthes
 Vcs-Browser: http://git.debian.org/?p=debian-science/packages/syrthes.git;a=summary
 Vcs-Git: git://git.debian.org/git/debian-science/packages/libgarmin.git
 
-Package: syrthes at EXP_VERSION@
+Package: syrthes3.4.2
 Architecture: any
-Provides: syrthes-${source:Upstream-Version}
-Conflicts: syrthes-${source:Upstream-Version}
+Provides: syrthes3.4.2
+Conflicts: syrthes3.4.2
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Recommends: gfortran
 Description: Transient thermal simulations in complex solid geometries
diff --git a/debian/control.in b/debian/control.in
index 79aa6d3..c29376e 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -9,10 +9,10 @@ Homepage: http://rd.edf.com/syrthes
 Vcs-Browser: http://git.debian.org/?p=debian-science/packages/syrthes.git;a=summary
 Vcs-Git: git://git.debian.org/git/debian-science/packages/libgarmin.git
 
-Package: syrthes at EXP_VERSION@
+Package: syrthes at EXPLICIT_VERSION@
 Architecture: any
-Provides: syrthes-${source:Upstream-Version}
-Conflicts: syrthes-${source:Upstream-Version}
+Provides: syrthes at VERSION@
+Conflicts: syrthes at VERSION@
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Recommends: gfortran
 Description: Transient thermal simulations in complex solid geometries
diff --git a/debian/dirs.in b/debian/dirs.in
index df2834a..e8c6636 100644
--- a/debian/dirs.in
+++ b/debian/dirs.in
@@ -1,9 +1,9 @@
 usr/bin
-usr/lib/syrthes at VERSION@/bin/Linux
-usr/lib/syrthes at VERSION@/data
-usr/lib/syrthes at VERSION@/example/cylinder/MESH
-usr/lib/syrthes at VERSION@/example/cylinder/RESU
-usr/lib/syrthes at VERSION@/example/cylinder/usr
-usr/lib/syrthes at VERSION@/include
-usr/lib/syrthes at VERSION@/lib/Linux
-usr/lib/syrthes at VERSION@/usr
+ at SYRTHES_HOME@/bin/Linux
+ at SYRTHES_HOME@/data
+ at SYRTHES_HOME@/example/cylinder/MESH
+ at SYRTHES_HOME@/example/cylinder/RESU
+ at SYRTHES_HOME@/example/cylinder/usr
+ at SYRTHES_HOME@/include
+ at SYRTHES_HOME@/lib/Linux
+ at SYRTHES_HOME@/usr
diff --git a/debian/rules b/debian/rules
index d0147a6..3035109 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,8 +9,10 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-DEB_NOREVISION_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ' | cut -f 1 -d '-' | sed 's/\.dfsg.*$$//')
-DEB_SCIENCE_EXPLICIT_VERSION := $(shell set -e; if [ "$(DEB_SCIENCE_EXPLICIT_VERSION)" == "yes" ]; then echo "-$(DEB_NOREVISION_VERSION)"; fi)
+NOREVISION_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ' | cut -f 1 -d '-' | sed 's/\.dfsg.*$$//')
+SCIENCE_EXPLICIT_VERSION := $(shell set -e; if [ "$(SCIENCE_EXPLICIT_VERSION)" == "yes" ]; then echo "$(NOREVISION_VERSION)"; fi)
+SYRTHES_HOME=usr/lib/syrthes/$(NOREVISION_VERSION)
+INSTALL_DIR=$(CURDIR)/debian/syrthes$(SCIENCE_EXPLICIT_VERSION)
 
 include /usr/share/quilt/quilt.make
 
@@ -28,7 +30,7 @@ build-stamp: configure-stamp  $(QUILT_STAMPFN)
 	dh_testdir
 
 	# Add here commands to compile the package.
-	cd $(CURDIR)/bin && NOM_ARCH=Linux SYRTHES_HOME=$(CURDIR) $(MAKE) install
+	cd $(CURDIR)/bin && SYRTHES_HOME=$(CURDIR) $(MAKE) install
 	#docbook-to-man debian/syrthes.sgml > syrthes.1
 
 	touch $@
@@ -43,8 +45,8 @@ clean-patched:
 	cd $(CURDIR)/bin; . ./syrthes.profile; #$(MAKE) clean
 
 	dh_clean 
-	sed "s/@VERSION@/$(DEB_SCIENCE_EXPLICIT_VERSION)/" debian/control.in > debian/control
-	sed "s/@VERSION@/$(DEB_SCIENCE_EXPLICIT_VERSION)/" debian/dirs.in > debian/dirs
+	sed "s/@EXPLICIT_VERSION@/$(SCIENCE_EXPLICIT_VERSION)/;s/@VERSION@/$(NOREVISION_VERSION)/" debian/control.in > debian/control
+	sed "s!@SYRTHES_HOME@!$(SYRTHES_HOME)!" debian/dirs.in > debian/dirs
 
 install: build
 	dh_testdir
@@ -58,8 +60,11 @@ install: build
 	for dir in bin bin/Linux data example/cylinder example/cylinder/MESH \
 	  example/cylinder/RESU example/cylinder/usr include lib/Linux \
 	  usr; do \
-	  find $$dir -maxdepth 1 -type f -exec install "{}" $(CURDIR)/debian/syrthes$(DEB_SCIENCE_EXPLICIT_VERSION)/usr/lib/syrthes$(DEB_SCIENCE_EXPLICIT_VERSION)/$$dir \; ; \
+	  find $$dir -maxdepth 1 -type f -exec install "{}" $(INSTALL_DIR)/$(SYRTHES_HOME)/$$dir \; ; \
 	done
+	sed -i "s!@SYRTHES_HOME@!/$(SYRTHES_HOME)!g" $(INSTALL_DIR)/$(SYRTHES_HOME)/bin/syrthes_create_case
+	sed -i "s!@SYRTHES_HOME@!/$(SYRTHES_HOME)!g" $(INSTALL_DIR)/$(SYRTHES_HOME)/bin/Makefile
+	rm -f $(INSTALL_DIR)/$(SYRTHES_HOME)/bin/syrthes.profile
 
 
 # Build architecture-independent files here.
@@ -85,7 +90,9 @@ binary-arch: install
 #	dh_installcron
 #	dh_installinfo
 	dh_installman
-	dh_link
+	dh_link \
+		/$(SYRTHES_HOME)/bin/syrthes_create_case /usr/bin/syrthes$(SCIENCE_EXPLICIT_VERSION)_create_case \
+		/$(SYRTHES_HOME)/bin/Linux/syrthes2ensight /usr/bin/syrthes$${SCIENCE_EXPLICIT_VERSION:+$${SCIENCE_EXPLICIT_VERSION}_}2ensight
 	dh_strip
 	dh_compress
 	dh_fixperms
-- 
1.5.6.5





More information about the debian-science-commits mailing list