[med-svn] [eigensoft] 07/12: Leave only wrapper scripts in /usr/bin, executables go to /usr/lib/eigensoft

Andreas Tille tille at debian.org
Tue Jul 19 09:37:14 UTC 2016


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

tille pushed a commit to branch master
in repository eigensoft.

commit e3242a4f19344c7b08b02c2511373987daa47fc2
Author: Andreas Tille <tille at debian.org>
Date:   Tue Jul 19 10:48:56 2016 +0200

    Leave only wrapper scripts in /usr/bin, executables go to /usr/lib/eigensoft
---
 debian/README.Debian     | 28 ++++++++++++++++++++++++++++
 debian/changelog         |  4 ++++
 debian/eigensoft.install | 11 +++++++----
 debian/eigensoft.links   |  1 +
 debian/rules             | 24 ++++++++++++++++++++++++
 5 files changed, 64 insertions(+), 4 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..1cc005b
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,28 @@
+eigensoft for Debian
+--------------------
+
+Some wrapper scripts inside eigensoft are featuring a .pl extension.
+Since this conflicts with Debian policy this extension is stripped
+but for compatibility reasons the original name remains in
+
+        /usr/lib/debian-med/bin/
+
+If you want to use the original names right from the command line just
+set the PATH variable like
+
+  export PATH=/usr/lib/debian-med/bin:$PATH
+
+If a user creates a file
+
+    ${HOME}/.blends
+
+with the content
+
+# Add Blend names here which should prepend its bin dir to PATH
+debian-med
+
+the med-config package automatically adds this PATH to the users
+environment (when using bash).
+
+
+ -- Andreas Tille <tille at debian.org>  Thu, 14 Jul 2016 20:04:52 +0200
diff --git a/debian/changelog b/debian/changelog
index 9e44e57..4483761 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,10 @@ eigensoft (6.1.2+dfsg-1) UNRELEASED; urgency=medium
   [ Andreas Tille ]
   * New upstream version
   * Adapt watch file to match new version string
+  * relicense Debian packaging as BSD-3-clause
+  * cme fix dpkg-control
+  * hardening=+bindnow
+  * Leave only wrapper scripts in /usr/bin, executables go to /usr/lib/eigensoft
 
   [ Tatiana Malygina ]
   * Fix headers
diff --git a/debian/eigensoft.install b/debian/eigensoft.install
index b78166e..48cd3de 100644
--- a/debian/eigensoft.install
+++ b/debian/eigensoft.install
@@ -1,4 +1,7 @@
-bin/*       usr/bin
-CONVERTF    usr/share/eigensoft
-EIGENSTRAT  usr/share/eigensoft
-POPGEN      usr/share/eigensoft
+bin/smarteigenstrat	usr/lib/eigensoft
+bin/smartpca		usr/lib/eigensoft
+bin/gc.pl		usr/lib/debian-med/bin
+bin/*       		usr/bin
+CONVERTF    		usr/share/eigensoft
+EIGENSTRAT  		usr/share/eigensoft
+POPGEN      		usr/share/eigensoft
diff --git a/debian/eigensoft.links b/debian/eigensoft.links
new file mode 100644
index 0000000..48eb3b6
--- /dev/null
+++ b/debian/eigensoft.links
@@ -0,0 +1 @@
+usr/lib/debian-med/bin/gc.pl	usr/bin/gc-eigensoft
diff --git a/debian/rules b/debian/rules
index 04bcf29..f3d8d14 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,15 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
+
+DEBPKGNAME     := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
+
+WRAPPERS=evec2pca-ped \
+         evec2pca \
+         smarteigenstrat \
+         smartpca
+
 %:
 	dh $@ 
 
@@ -19,6 +28,21 @@ override_dh_install:
 	find debian/eigensoft/usr/share/ -type f -empty -delete
 	# file consists only from single line with wrong interpreter
 	find debian/eigensoft/usr/share/ -type f -name HGDP.X.perl -delete
+	# Fix wrappers and drop *.pl extension in /usr/bin while keeping
+	# the original name in /usr/lib/debian-med/bin
+	mkdir -p debian/$(DEBPKGNAME)/usr/lib/debian-med/bin
+	for pl in $(WRAPPERS) ; do \
+	    rm debian/$(DEBPKGNAME)/usr/bin/$${pl} ; \
+	    sed -i \
+	        -e "s?\(command[[:space:]]*=[[:space:]]*\"\)\($${pl}\)?\1/usr/lib/$(DEBPKGNAME)/\2?" \
+                -e "s?\(cmd[[:space:]]*=[[:space:]]*\"\)\($${pl}\)?\1/usr/lib/$(DEBPKGNAME)/\2?" \
+                -e "s?\(cmd[[:space:]]*=[[:space:]]*\"\)\(evec2pca.*\)\.perl?\1?" \
+                -e "s?\($${pl}\)\.perl?\1?" \
+	        debian/$(DEBPKGNAME)/usr/bin/$${pl}.pl ; \
+	    cp -a debian/$(DEBPKGNAME)/usr/bin/$${pl}.pl debian/$(DEBPKGNAME)/usr/bin/$${pl} ; \
+	    mv debian/$(DEBPKGNAME)/usr/bin/$${pl}.pl debian/$(DEBPKGNAME)/usr/lib/debian-med/bin ; \
+	done
+	rm debian/$(DEBPKGNAME)/usr/bin/gc.pl
 
 override_dh_fixperms:
 	dh_fixperms

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/eigensoft.git



More information about the debian-med-commit mailing list