[syrthes/master] Revert "Move data files into /usr/share/syrthes/<version>"
Gilles Filippini
gilles.filippini at free.fr
Fri Sep 18 21:33:23 UTC 2009
This reverts commit 3d335c03671e8bae6e51d16bfbc953799d685cbb
because I wasn't happy with the resulting inconsistency.
---
debian/dirs.in | 7 +-
debian/patches/syrthes_data | 152 -------------------------------------------
debian/patches/syrthes_env | 139 +++++++++++++++++++++++----------------
debian/rules | 18 +----
4 files changed, 88 insertions(+), 228 deletions(-)
delete mode 100644 debian/patches/syrthes_data
diff --git a/debian/dirs.in b/debian/dirs.in
index 0a2c729..e8c6636 100644
--- a/debian/dirs.in
+++ b/debian/dirs.in
@@ -1,10 +1,9 @@
usr/bin
@SYRTHES_HOME@/bin/Linux
- at SYRTHES_HOME@/lib/Linux
@SYRTHES_HOME@/data
- at SYRTHES_HOME@/include
- at SYRTHES_HOME@/usr
@SYRTHES_HOME@/example/cylinder/MESH
@SYRTHES_HOME@/example/cylinder/RESU
@SYRTHES_HOME@/example/cylinder/usr
- at SYRTHES_DATA@
+ at SYRTHES_HOME@/include
+ at SYRTHES_HOME@/lib/Linux
+ at SYRTHES_HOME@/usr
diff --git a/debian/patches/syrthes_data b/debian/patches/syrthes_data
deleted file mode 100644
index 7b086ed..0000000
--- a/debian/patches/syrthes_data
+++ /dev/null
@@ -1,152 +0,0 @@
-Tune the Makefile once installation is done.
-This patch should be used from inside the SYRTHES_DATA directory.
-Index: Makefile
-===================================================================
---- syrthes.orig/bin/Makefile 2009-09-18 21:43:05.000000000 +0200
-+++ syrthes/bin/Makefile 2009-09-18 21:56:47.000000000 +0200
-@@ -36,36 +36,26 @@
-
- NOM_ARCH = Linux
-
--include $(SYRTHES_HOME)/bin/Makefile.in
-+VERSION = @VERSION@
-+
-+SYRTHES_HOME = /usr/lib/syrthes/$(VERSION)
-+SYRTHES_DATA = /usr/share/syrthes/$(VERSION)
-+
-+include $(SYRTHES_DATA)/Makefile.in
-
- # Environment Macros
- # ==================
-
- SHELL = /bin/sh
-
-
- # Project configuration macros
- # ============================
-
--# Test if variable SYRTHES_HOME is set
--
--ifndef SYRTHES_HOME
--$(error SYRTHES_HOME is not defined, run 'syrthes.profile' to set a correct value)
--endif
--
--ifeq ($(SYRTHES_HOME),)
--$(error SYRTHES_HOME is a empty string, run 'syrthes.profile' to set a correct value)
--endif
--
- # Base project directories
-
--DIR_SYRTHES = $(SYRTHES_HOME)
--BIN_SYRTHES = $(DIR_SYRTHES)/bin
--INC_SYRTHES = $(DIR_SYRTHES)/include
--SRC_SYRTHES = $(DIR_SYRTHES)/src
--UTIL_SYRTHES = $(SRC_SYRTHES)/util
--ARCH_SYRTHES = $(DIR_SYRTHES)/lib/$(NOM_ARCH)
--EXEC_SYRTHES = $(DIR_SYRTHES)/bin/$(NOM_ARCH)
-+INC_SYRTHES = $(SYRTHES_DATA)/include
-+ARCH_SYRTHES = $(SYRTHES_HOME)/lib/$(NOM_ARCH)
-
-
- # Names of the base library and Syrthes executable file
-@@ -75,16 +63,7 @@
- NOM_LIB_SAT = "libsat"$(NOM_PREFIX)$(VERSION)_$(NOM_ARCH)
- NOM_LIB_SYRTHES = "lib"$(NOM_PREFIX)$(VERSION)_$(NOM_ARCH)
- NOM_EXE = "syrthes"
--NOM_UTIL1 = "syrthes2ensight"
--
--
-
--# Presentation macros
--#--------------------
--
--BO = `tput bold`
--SO = `tput smso`
--NO = `tput rmso; tput sgr0`
-
-
- # Target definitions
-@@ -117,83 +96,5 @@
- @echo "*** Executable '$(NOM_EXE)' created "
-
-
--lib:
-- $(FC) -c $(FCFLAGS) -I$(INC_SYRTHES) $(SRC_SYRTHES)/s/*.F
-- $(CC) -c $(CFLAGS) -I$(INC_SYRTHES) $(SRC_SYRTHES)/s/*.c
-- @ar rv $(NOM_LIB_SYRTHES).a *.o
-- @rm -f *.o
--
-- $(FC) -c $(FCFLAGS) -I$(INC_SYRTHES) $(SRC_SYRTHES)/ss/*.F
-- $(CC) -c $(CFLAGS) -I$(INC_SYRTHES) $(SRC_SYRTHES)/ss/*.c
-- @ar rv $(NOM_LIB_MAIN).a *.o
-- @rm -f *.o
--
-- $(FC) -c $(FCFLAGS) -I$(INC_SYRTHES) $(SRC_SYRTHES)/sc/*.F
-- $(CC) -c $(CFLAGS) -I$(INC_SYRTHES) $(SRC_SYRTHES)/sc/*.c
-- @ar rv $(NOM_LIB_SAT).a *.o
-- @rm -f *.o
--
-- @if [ ! -d "$(ARCH_SYRTHES)" ] ;\
-- then mkdir -p "$(ARCH_SYRTHES)" ;\
-- fi ;\
--
-- @mv *.a $(ARCH_SYRTHES)
--
--# @echo "*** Libraries created in directory $(ARCH_SYRTHES)"
--
--
--install: lib util
--
-- @echo "*** installation successfull"
--
--
--util:
-- $(CC) $(CFLAGS) -o $(NOM_UTIL1) $(UTIL_SYRTHES)/$(NOM_UTIL1).c
--
-- @if [ ! -d "$(EXEC_SYRTHES)" ] ; then \
-- mkdir "$(EXEC_SYRTHES)" ;\
-- fi ;\
--
-- @mv $(NOM_UTIL1) $(EXEC_SYRTHES)
--
--# @echo "***Executable '$(NOM_UTIL1)' created in directory $(EXEC_SYRTHES)"
--
--
- clean:
- @rm -f *.o
--
--
--distclean: clean
--
-- @rm -f $(ARCH_SYRTHES)/$(NOM_LIB_SYRTHES).a
-- @rm -f $(ARCH_SYRTHES)/$(NOM_LIB_MAIN).a
-- @rm -f $(ARCH_SYRTHES)/$(NOM_LIB_SAT).a
-- @rm -f $(NOM_EXE)
-- @rm -f $(EXEC_SYRTHES)/$(NOM_UTIL1)
--
--
--help info:
-- @echo
-- @echo "*** Syrthes $(VERSION) compilation/link"
-- @echo "*** System: $(NOM_ARCH)"
-- @echo
-- @echo
-- @echo "Usage : $(BO)make$(NO) $(SO)<target>$(NO) (in a user directory)"
-- @echo " for Syrthes link"
-- @echo
-- @echo " with :"
-- @echo " $(SO)<target>$(NO) : $(BO)exe$(NO) : 'syrthes' executable (default)"
-- @echo " $(BO)install$(NO) : libraries creation and utilitaries"
-- @echo " $(BO)lib$(NO) : libraries creation"
-- @echo " $(BO)util$(NO) : utilitaries"
-- @echo " $(BO)clean$(NO) : deletes object files"
-- @echo " $(BO)distclean$(NO) : deletes object files, libraries, and utilitaries"
-- @echo " $(BO)help$(NO) : this message"
-- @echo " $(BO)info$(NO) : same"
-- @echo
-- @echo " and the additional user options:"
-- @echo " $(SO)<CFLAGS>$(NO) : C compiler options"
-- @echo " $(SO)<FCFLAGS>$(NO) : Fortran compiler options"
-- @echo " $(SO)<LDFLAGS>$(NO): linker options"
-- @echo
--
diff --git a/debian/patches/syrthes_env b/debian/patches/syrthes_env
index 961b9ca..722f171 100644
--- a/debian/patches/syrthes_env
+++ b/debian/patches/syrthes_env
@@ -1,8 +1,79 @@
Set the SYRTHES environment variables for a debian box.
+Index: syrthes/bin/syrthes.profile
+===================================================================
+--- syrthes.orig/bin/syrthes.profile 2009-07-07 02:07:12.000000000 +0200
++++ syrthes/bin/syrthes.profile 2009-07-07 18:25:01.000000000 +0200
+@@ -32,43 +32,42 @@
+
+ # Architecture name and location of the directory for installation
+ # ================================================================
+- NOM_ARCH=`uname -s`
+- PATHSYR=/home/syrthes
++ NOM_ARCH=Linux
+
+ #------------------------------------------------------------------------
+ # Only in case of installation on multiple architectures
+
+ # Architecture
+- NOM_ARCH=`uname -s`
+- if [ "$NOM_ARCH" = "Linux" ] ; then
+- if [ "`hostname | cut -c1-7`" = "platine" ] ; then
+- NOM_ARCH=Linux_IA64
+- elif [ "`domainname 2>/dev/null`" = "cluster-chatou" ] ; then
+- NOM_ARCH=Linux_Ch
+- elif [ -d /bgl/BlueLight/ppcfloor ] ; then
+- NOM_ARCH=Blue_Gene_L
+- elif [ -d /bgsys/drivers/ppcfloor ] ; then
+- NOM_ARCH=Blue_Gene_P
+- else
+- MACHINE=`uname -m`
+- case "$MACHINE" in
+- *86) NOM_ARCH=Linux ;;
+- x86_64) NOM_ARCH=Linux_x86_64 ;;
+- ia64) NOM_ARCH=Linux_IA64 ;;
+- *) NOM_ARCH=Linux_$MACHINE ;;
+- esac
+- fi
+- fi
++# NOM_ARCH=`uname -s`
++# if [ "$NOM_ARCH" = "Linux" ] ; then
++# if [ "`hostname | cut -c1-7`" = "platine" ] ; then
++# NOM_ARCH=Linux_IA64
++# elif [ "`domainname 2>/dev/null`" = "cluster-chatou" ] ; then
++# NOM_ARCH=Linux_Ch
++# elif [ -d /bgl/BlueLight/ppcfloor ] ; then
++# NOM_ARCH=Blue_Gene_L
++# elif [ -d /bgsys/drivers/ppcfloor ] ; then
++# NOM_ARCH=Blue_Gene_P
++# else
++# MACHINE=`uname -m`
++# case "$MACHINE" in
++# *86) NOM_ARCH=Linux ;;
++# x86_64) NOM_ARCH=Linux_x86_64 ;;
++# ia64) NOM_ARCH=Linux_IA64 ;;
++# *) NOM_ARCH=Linux_$MACHINE ;;
++# esac
++# fi
++# fi
+
+ #-----------------------------------------------------------
+ #
+- SYRTHES_HOME=${PATHSYR}/syrthes3.4.2
++ SYRTHES_HOME=/usr/lib/syrthes
+ #
+ # Path
+ PATH=${SYRTHES_HOME}/bin:${SYRTHES_HOME}/bin/${NOM_ARCH}:$PATH
+ export PATH
+
+ # Export des variables
+- export NOM_ARCH NOM_USER SYRTHES_HOME
++ export NOM_ARCH SYRTHES_HOME
+
+
Index: syrthes/bin/Makefile.in
===================================================================
---- syrthes.orig/bin/Makefile.in 2009-09-18 22:35:38.000000000 +0200
-+++ syrthes/bin/Makefile.in 2009-09-18 22:36:13.000000000 +0200
+--- syrthes.orig/bin/Makefile.in 2009-07-07 02:07:12.000000000 +0200
++++ syrthes/bin/Makefile.in 2009-07-07 18:25:01.000000000 +0200
@@ -43,10 +43,10 @@
CC = /usr/bin/gcc
CFLAGS = -O2 -D_FILE_OFFSET_BITS=64 -DHAVE_C_IO
@@ -18,41 +89,20 @@ Index: syrthes/bin/Makefile.in
endif
Index: syrthes/bin/Makefile
===================================================================
---- syrthes.orig/bin/Makefile 2009-09-18 22:35:38.000000000 +0200
-+++ syrthes/bin/Makefile 2009-09-18 22:36:47.000000000 +0200
-@@ -33,6 +33,9 @@
+--- syrthes.orig/bin/Makefile 2009-07-07 02:07:12.000000000 +0200
++++ syrthes/bin/Makefile 2009-07-07 18:25:01.000000000 +0200
+@@ -33,6 +33,10 @@
# Makefile for Syrthes
######################
+
-+NOM_ARCH = Linux
++NOM_ARCH=Linux
++SYRTHES_HOME=$(shell echo $${SYRTHES_HOME:-"@SYRTHES_HOME@"})
+
include $(SYRTHES_HOME)/bin/Makefile.in
# Environment Macros
-@@ -40,8 +43,6 @@
-
- SHELL = /bin/sh
-
--VERSION = "3.4.2"
--
-
- # Project configuration macros
- # ============================
-@@ -70,9 +71,9 @@
- # Names of the base library and Syrthes executable file
-
- NOM_PREFIX = "syrthes"
--NOM_LIB_MAIN = "libmain"$(NOM_PREFIX)$(VERSION)_$(NOM_ARCH)
--NOM_LIB_SAT = "libsat"$(NOM_PREFIX)$(VERSION)_$(NOM_ARCH)
--NOM_LIB_SYRTHES = "lib"$(NOM_PREFIX)$(VERSION)_$(NOM_ARCH)
-+NOM_LIB_MAIN = "libmain"$(NOM_PREFIX)_$(NOM_ARCH)
-+NOM_LIB_SAT = "libsat"$(NOM_PREFIX)_$(NOM_ARCH)
-+NOM_LIB_SYRTHES = "lib"$(NOM_PREFIX)_$(NOM_ARCH)
- NOM_EXE = "syrthes"
- NOM_UTIL1 = "syrthes2ensight"
-
-@@ -133,7 +134,7 @@
+@@ -133,7 +137,7 @@
@rm -f *.o
@if [ ! -d "$(ARCH_SYRTHES)" ] ;\
@@ -63,40 +113,15 @@ Index: syrthes/bin/Makefile
@mv *.a $(ARCH_SYRTHES)
Index: syrthes/bin/syrthes_create_case
===================================================================
---- syrthes.orig/bin/syrthes_create_case 2009-09-18 22:35:38.000000000 +0200
-+++ syrthes/bin/syrthes_create_case 2009-09-18 22:36:13.000000000 +0200
+--- syrthes.orig/bin/syrthes_create_case 2009-07-07 02:07:12.000000000 +0200
++++ syrthes/bin/syrthes_create_case 2009-07-07 18:26:09.000000000 +0200
@@ -3,6 +3,9 @@
# Creation d'un cas SYRTHES
#==========================================================================
+set -e
+
-+SYRTHES_DATA=@SYRTHES_DATA@
++SYRTHES_HOME=@SYRTHES_HOME@
echo
echo "***************************************** "
-@@ -22,8 +25,8 @@
- exit
- fi
-
--if [ -z "$SYRTHES_HOME" ]; then
-- echo " --> SYRTHES_HOME not found"
-+if [ -z "$SYRTHES_DATA" ]; then
-+ echo " --> SYRTHES_DATA not found"
- echo "***************************************** "
- exit
- fi
-@@ -37,10 +40,10 @@
- mkdir $1
- cd $1
-
--cp -r ${SYRTHES_HOME}/usr .
--cp ${SYRTHES_HOME}/bin/Makefile .
-+cp -r ${SYRTHES_DATA}/usr .
-+cp ${SYRTHES_DATA}/Makefile .
-
--cp ${SYRTHES_HOME}/data/* .
-+cp ${SYRTHES_DATA}/data/* .
-
- cd ..
-
diff --git a/debian/rules b/debian/rules
index 7b3484b..f79c50e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,7 +12,6 @@
NOREVISION_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ' | cut -f 1 -d '-' | sed 's/\.dfsg.*$$//')
EXPLICIT_VERSION := $(shell set -e; if [ "x$(SCIENCE_EXPLICIT_VERSION)" = "xyes" ]; then echo "-$(NOREVISION_VERSION)"; fi)
SYRTHES_HOME=usr/lib/syrthes/$(NOREVISION_VERSION)
-SYRTHES_DATA=usr/share/syrthes/$(NOREVISION_VERSION)
INSTALL_DIR=$(CURDIR)/debian/syrthes$(EXPLICIT_VERSION)
include /usr/share/quilt/quilt.make
@@ -49,7 +48,7 @@ clean-patched:
dh_clean
sed "s/@EXPLICIT_VERSION@/$(EXPLICIT_VERSION)/;s/@VERSION@/-$(NOREVISION_VERSION)/" debian/control.in > debian/control
- sed "s!@SYRTHES_HOME@!$(SYRTHES_HOME)!;s!@SYRTHES_DATA@!$(SYRTHES_DATA)!" debian/dirs.in > debian/dirs
+ sed "s!@SYRTHES_HOME@!$(SYRTHES_HOME)!" debian/dirs.in > debian/dirs
install: build
dh_testdir
@@ -65,23 +64,12 @@ install: build
usr; do \
find $$dir -maxdepth 1 -type f -exec install "{}" $(INSTALL_DIR)/$(SYRTHES_HOME)/$$dir \; ; \
done
- sed -i "s!@SYRTHES_DATA@!/$(SYRTHES_DATA)!g" $(INSTALL_DIR)/$(SYRTHES_HOME)/bin/syrthes_create_case
+ 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
- # Move data files into /usr/share/syrthes/<version>/
- mv $(INSTALL_DIR)/$(SYRTHES_HOME)/usr $(INSTALL_DIR)/$(SYRTHES_DATA)/
- mv $(INSTALL_DIR)/$(SYRTHES_HOME)/include $(INSTALL_DIR)/$(SYRTHES_DATA)/
- mv $(INSTALL_DIR)/$(SYRTHES_HOME)/data $(INSTALL_DIR)/$(SYRTHES_DATA)/
- mv $(INSTALL_DIR)/$(SYRTHES_HOME)/bin/Makefile* $(INSTALL_DIR)/$(SYRTHES_DATA)/
- # Tune the makefile
- cd $(INSTALL_DIR)/$(SYRTHES_DATA) && patch < $(CURDIR)/debian/patches/syrthes_data
- sed -i "s!@VERSION@!$(NOREVISION_VERSION)!" $(INSTALL_DIR)/$(SYRTHES_DATA)/Makefile
- # Move example dir into /usr/share/doc/syrthes/
+ # Move example dir to /usr/share/doc/syrthes/
mkdir -p $(INSTALL_DIR)/usr/share/doc/syrthes$(EXPLICIT_VERSION)
mv $(INSTALL_DIR)/$(SYRTHES_HOME)/example $(INSTALL_DIR)/usr/share/doc/syrthes$(EXPLICIT_VERSION)/
- # Replace the example's Makefile with the new one
- cp $(INSTALL_DIR)/$(SYRTHES_DATA)/Makefile $(INSTALL_DIR)/usr/share/doc/syrthes$(EXPLICIT_VERSION)/example/cylinder/
- # Create the example tarball
cd $(INSTALL_DIR)/usr/share/doc/syrthes$(EXPLICIT_VERSION)/example && tar czf cylinder.tar.gz cylinder && rm -fr cylinder
--
1.5.6.5
More information about the debian-science-commits
mailing list