[Debian-astro-commits] [cspice] 06/11: Switch from cspice-utility to cspice utility

Rock Storm rockstorm-guest at moszumanska.debian.org
Sun Apr 23 17:34:47 UTC 2017


This is an automated email from the git hooks/post-receive script.

rockstorm-guest pushed a commit to branch debian
in repository cspice.

commit 6accca8979a5bebeca87830b3dd798841fb80e13
Author: Rock Storm <rockstorm at gmx.com>
Date:   Sun Apr 23 11:05:33 2017 +0200

    Switch from cspice-utility to cspice utility
---
 debian/README.Debian   | 40 ++++++++++++++++++++++------------------
 debian/bin/cspice      | 21 +++++++++++++++++++++
 debian/cspice.install  | 32 ++++++++++++++++++--------------
 debian/rules           | 29 ++++-------------------------
 debian/tests/brief-utc |  8 ++++----
 5 files changed, 69 insertions(+), 61 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
index e7e31f5..617d6c3 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -12,7 +12,7 @@ following manner:
    along with the header files and libcspice.so.
 
  * cspice: contains mainly the utilities for which upstream has released the
-   source code, a.k.a. the SPICE Toolkit. Also, some example or "cookbook"
+   source code, a.k.a. the CSPICE Toolkit. Also, some example or "cookbook"
    programs to demonstrate the capabilities of the spice library along with
    example data can be found in the directory /usr/share/doc/cspice/examples.
 
@@ -23,25 +23,29 @@ following manner:
    found at http://naif.jpl.nasa.gov/naif/tutorials.html.
 
 
-Toolkit Modules' Renaming
-=========================
+Invoking Toolkit Modules
+========================
 
-The toolkit modules are renamed as depicted below because some of them are too generic and in order not to flood the '/usr/bin' folder:
+Each of the toolkit modules are called prepending "cspice" to the utility name
+as shown below:
  
- * brief    ->  cspice-brief
- * chronos  ->  cspice-chronos
- * ckbrief  ->  cspice-ckbrief
- * commnt   ->  cspice-commnt
- * frmdifff ->  cspice-frmdiff
- * inspekt	->	cspice-inspekt
- * mkspk	->	cspice-mkspk
- * msopck	->	cspice-msopck
- * spacit	->	cspice-spacit
- * spkdiff	->	cspice-spkdiff
- * spkmerge	->	cspice-spkmerge
- * tobin	->	cspice-tobin
- * toxfr	->	cspice-toxfr
- * version	->	cspice-version
+ * brief    ->  cspice brief
+ * chronos  ->  cspice chronos
+ * ckbrief  ->  cspice ckbrief
+ * commnt   ->  cspice commnt
+ * dskbrief ->  cspice dskbrief
+ * dskexp   ->  cspice dskexp
+ * frmdifff ->  cspice frmdiff
+ * inspekt  ->  cspice inspekt
+ * mkdsk    ->  cspice mkdsk
+ * mkspk    ->  cspice mkspk
+ * msopck   ->  cspice msopck
+ * spacit   ->  cspice spacit
+ * spkdiff  ->  cspice spkdiff
+ * spkmerge ->  cspice spkmerge
+ * tobin    ->  cspice tobin
+ * toxfr    ->  cspice toxfr
+ * version  ->  cspice version
 
 
 Header Files' Location
diff --git a/debian/bin/cspice b/debian/bin/cspice
new file mode 100644
index 0000000..443ef97
--- /dev/null
+++ b/debian/bin/cspice
@@ -0,0 +1,21 @@
+#! /bin/bash
+# 
+# Invoke one of the different CSPICE utilities.
+#     cspice <utility> <arguments>
+#
+# Author: Rock Storm <rockstorm at gmx.com>
+
+set -e
+
+libexecdir="/usr/lib/cspice"
+
+EXECUTABLES=(brief chronos ckbrief commnt dskbrief dskexp frmdiff inspekt \
+             mkdsk mkspk msopck spacit spkdiff spkmerge tobin toxfr version)
+
+for i in "${!EXECUTABLES[@]}"; do
+    if [ "$1" == "${EXECUTABLES[$i]}" ] ; then
+        shift
+        $libexecdir/${EXECUTABLES[$i]} $@
+        exit $?
+    fi
+done
diff --git a/debian/cspice.install b/debian/cspice.install
index f16c524..d5fe36a 100644
--- a/debian/cspice.install
+++ b/debian/cspice.install
@@ -1,14 +1,18 @@
-exe/cspice-brief usr/bin
-exe/cspice-chronos usr/bin
-exe/cspice-ckbrief usr/bin
-exe/cspice-commnt usr/bin
-exe/cspice-frmdiff usr/bin
-exe/cspice-inspekt usr/bin
-exe/cspice-mkspk usr/bin
-exe/cspice-msopck usr/bin
-exe/cspice-spacit usr/bin
-exe/cspice-spkdiff usr/bin
-exe/cspice-spkmerge usr/bin
-exe/cspice-tobin usr/bin
-exe/cspice-toxfr usr/bin
-exe/cspice-version usr/bin
+debian/bin/cspice /usr/bin
+exe/brief usr/lib/cspice
+exe/chronos usr/lib/cspice
+exe/ckbrief usr/lib/cspice
+exe/commnt usr/lib/cspice
+exe/dskbrief usr/lib/cspice
+exe/dskexp usr/lib/cspice
+exe/frmdiff usr/lib/cspice
+exe/inspekt usr/lib/cspice
+exe/mkdsk usr/lib/cspice
+exe/mkspk usr/lib/cspice
+exe/msopck usr/lib/cspice
+exe/spacit usr/lib/cspice
+exe/spkdiff usr/lib/cspice
+exe/spkmerge usr/lib/cspice
+exe/tobin usr/lib/cspice
+exe/toxfr usr/lib/cspice
+exe/version usr/lib/cspice
diff --git a/debian/rules b/debian/rules
index 3733afe..796c928 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,44 +2,23 @@
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
 
-# group the toolkit binaries for renaming
-exes=brief \
-     chronos \
-     ckbrief \
-     commnt \
-     frmdiff \
-     inspekt \
-     mkspk \
-     msopck \
-     spacit \
-     spkdiff \
-     spkmerge \
-     tobin \
-     toxfr \
-     version
-
 %:
 	dh $@
 
 
 override_dh_auto_configure:
-# Configure the architecture dependant files
+	# Configure the architecture dependant files
 	/bin/sh debian/configure
 	
-# Translate the FORTRAN files to C
+	# Translate the FORTRAN files to C
 	/bin/sh debian/translate
 
 override_dh_auto_build:
 	make -f debian/Makefile build
 
 override_dh_install:
-# Rename cspice binaries from % to cspice-%
-	@for exe in $(exes) ; do \
-		mv exe/$$exe exe/cspice-$$exe ; \
-	done
-	
-# Rename static library with a more library-like name
-	@mv lib/cspice.a lib/libcspice.a
+	# Rename static library with a more library-like name
+	mv lib/cspice.a lib/libcspice.a
 	
 	dh_install --exclude=whats.new
 
diff --git a/debian/tests/brief-utc b/debian/tests/brief-utc
index d45eb24..4cec4fb 100644
--- a/debian/tests/brief-utc
+++ b/debian/tests/brief-utc
@@ -6,7 +6,7 @@
 
 set -e
 
-__exeprefix="cspice-"
+__exeprefix="cspice"
 __datadir="data"
 __bspfile="cook_01.bsp"
 __output="brief-utc.out"
@@ -14,7 +14,7 @@ __output="brief-utc.out"
 # Populate the expeted output file
 /bin/cat <<EOF > $__output
  
-BRIEF -- Version 4.0.0, September 8, 2010 -- Toolkit Version N0065
+BRIEF -- Version 4.0.0, September 8, 2010 -- Toolkit Version N0066
  
  
 Summary for: $__bspfile
@@ -31,10 +31,10 @@ Bodies: GALILEO ORBITER (-77)   JUPITER BARYCENTER (5)  SUN (10)
 EOF
 
 # tobin test: Convert a text kernel into binary
-"$__exeprefix""tobin" "$__datadir/cook_01.tsp" "$__bspfile" > /dev/null
+"$__exeprefix" "tobin" "$__datadir/cook_01.tsp" "$__bspfile" > /dev/null
 
 # brief test: Summarize the contents of the binary kernel
-"$__exeprefix""brief" -utc "$__bspfile" "$__datadir/cook_01.tls" | \
+"$__exeprefix" "brief" -utc "$__bspfile" "$__datadir/cook_01.tls" | \
 diff "$__output" -
 
 echo "toolkit utilities: OK"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/cspice.git



More information about the Debian-astro-commits mailing list