[med-svn] [seqan] 04/14: Symlink to binaries only if these are part of the binary distribution

Andreas Tille tille at debian.org
Wed Jan 20 10:39:39 UTC 2016


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

tille pushed a commit to branch master
in repository seqan.

commit f36ba41118b33e69b68c63bb2e508b37162a385b
Author: Andreas Tille <tille at debian.org>
Date:   Tue Jan 19 09:14:25 2016 +0100

    Symlink to binaries only if these are part of the binary distribution
---
 debian/changelog        |  1 +
 debian/rules            | 31 ++++++++++++++++++++++++-------
 debian/seqan-apps.links | 21 ---------------------
 3 files changed, 25 insertions(+), 28 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2a639c2..449f39e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,7 @@ seqan (2.0.1+dfsg-1) UNRELEASED; urgency=medium
     else and should be moved to a separate package
   * New package seqan-doc
   * Moved to Git
+  * Symlink to binaries only if these are part of the binary distribution
 
  -- Andreas Tille <tille at debian.org>  Mon, 18 Jan 2016 15:00:43 +0100
 
diff --git a/debian/rules b/debian/rules
index 4520c6c..0c9e5fb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,6 +22,9 @@ ifneq (,$(filter $(DEB_BUILD_ARCH),mips mipsel))
     export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS | sed 's/-O[1-9]//') -O0 -mxgot
 endif
 
+pkgapps=seqan-apps
+pkgdev=seqan-dev
+
 %:
 	dh $@ --parallel
 
@@ -34,14 +37,14 @@ override_dh_install:
 	# /usr/bin/join is part of coreutils package: Avoid name conflict by renaming it to seqan-join
 	# This solution is withdrawn in favour of just providing a set of binaries according to upstream
 	# in /usr/bin (via symlink) while others go to /usr/lib/seqan/bin (see README.Debian)
-	# mv $(CURDIR)/debian/seqan-apps/usr/bin/join $(CURDIR)/debian/seqan-apps/usr/bin/seqan-join
+	# mv $(CURDIR)/debian/$(pkgapps)/usr/bin/join $(CURDIR)/debian/$(pkgapps)/usr/bin/seqan-join
 	#
 	# Formerly binaries were installed into usr/lib/seqan/bin/
 	# and only some of them were made available in /usr/bin via dh_link
 	# Since there is no obvious reason for this neither is there any
 	# documentation that explains the motivation this is commented here.
 	#for APP in `find $(CURDIR)/obj*/apps -mindepth 1 -maxdepth 1 -executable -type f` ; do \
-	#  cp -a $$APP $(CURDIR)/debian/seqan-apps/usr/lib/seqan/bin/ ; done
+	#  cp -a $$APP $(CURDIR)/debian/$(pkgapps)/usr/lib/seqan/bin/ ; done
 	# ------------------------------------------------------------------
 	# Formerly readmes were named README.app.  It seems more consistent
 	# to keep upstream documentation layout which in addition contains
@@ -49,14 +52,14 @@ override_dh_install:
 	#for APP in `find apps -name README` ; do \
 	#  app=`echo $$APP | sed 's?.*apps/\(.\+\)/README?\1?'` ; \
 	#  echo $$app ; \
-	#  cp -a $$APP $(CURDIR)/debian/seqan-apps/usr/share/doc/seqan-apps/README.$$app ; \
+	#  cp -a $$APP $(CURDIR)/debian/$(pkgapps)/usr/share/doc/$(pkgapps)/README.$$app ; \
 	#done
 	# ------------------------------------------------------------------
 	# Delete additional LICENSE files
-	find $(CURDIR)/debian/seqan-apps -type f -name LICENSE -delete
-	if [ -d $(CURDIR)/debian/seqan-dev ] ; then \
-	    find $(CURDIR)/debian/seqan-dev -type f -name LICENSE -delete ; \
-	    find $(CURDIR)/debian/seqan-dev -type f -name "*.pyc" -delete ; \
+	find $(CURDIR)/debian/$(pkgapps) -type f -name LICENSE -delete
+	if [ -d $(CURDIR)/debian/$(pkgdev) ] ; then \
+	    find $(CURDIR)/debian/$(pkgdev) -type f -name LICENSE -delete ; \
+	    find $(CURDIR)/debian/$(pkgdev) -type f -name "*.pyc" -delete ; \
 	fi
 
 override_dh_auto_clean:
@@ -71,10 +74,24 @@ override_dh_auto_clean:
 
 override_dh_link:
 	dh_link
+	for bin in `ls $(CURDIR)/$(pkgapps)/usr/lib/seqan/bin` ; do \
+	    if [ -x $(CURDIR)/$(pkgapps)/usr/lib/seqan/bin/$${bin} ] ; then \
+	        ln -s ../lib/seqan/bin/$${bin} $(CURDIR)/$(pkgapps)/usr/bin/$${bin} ; \
+	    fi ; \
+	    if echo $${bin} | grep -q '\.sh$' ; then \
+	        ln -s ../lib/seqan/bin/$${bin} $(CURDIR)/$(pkgapps)/usr/bin/`basename $${bin} .sh` ; \
+	    fi ; \
+	done
 	# we generate only those manpages where binaries are linked to /usr/bin
 	# since dh_link is executed after dh_installmanpages this is done here
 	$(CURDIR)/debian/generate_manpages
 
+override_dh_fixperms:
+	dh_fixperms
+	for bin in `ls $(CURDIR)/$(pkgapps)/usr/lib/seqan/bin/*.sh` ; do \
+	    chmod +x $(CURDIR)/$(pkgapps)/usr/lib/seqan/bin/$${bin} ; \
+	done
+
 override_dh_auto_test:
 # Run test suite only on powerfull architectures (amd64) at build time
 ifneq (,$(filter $(DEB_HOST_ARCH),amd64 kfreebsd-amd64))
diff --git a/debian/seqan-apps.links b/debian/seqan-apps.links
deleted file mode 100644
index bb7fb5b..0000000
--- a/debian/seqan-apps.links
+++ /dev/null
@@ -1,21 +0,0 @@
-usr/lib/seqan/bin/alf				usr/bin/alf
-usr/lib/seqan/bin/gustaf			usr/bin/gustaf
-usr/lib/seqan/bin/insegt			usr/bin/insegt
-usr/lib/seqan/bin/masai_indexer			usr/bin/masai_indexer
-usr/lib/seqan/bin/masai_mapper			usr/bin/masai_mapper
-usr/lib/seqan/bin/masai_output_pe		usr/bin/masai_output_pe
-usr/lib/seqan/bin/masai_output_se		usr/bin/masai_output_se
-usr/lib/seqan/bin/mason				usr/bin/seqan_mason
-usr/lib/seqan/bin/micro_razers			usr/bin/micro_razers
-usr/lib/seqan/bin/pair_align			usr/bin/pair_align
-usr/lib/seqan/bin/rabema_build_gold_standard	usr/bin/rabema_build_gold_standard
-usr/lib/seqan/bin/rabema_evaluate		usr/bin/rabema_evaluate
-usr/lib/seqan/bin/rabema_prepare_sam		usr/bin/rabema_prepare_sam
-usr/lib/seqan/bin/razers			usr/bin/razers
-usr/lib/seqan/bin/razers3			usr/bin/razers3
-usr/lib/seqan/bin/sak				usr/bin/sak
-usr/lib/seqan/bin/seqan_tcoffee			usr/bin/seqan_tcoffee
-usr/lib/seqan/bin/snp_store			usr/bin/snp_store
-usr/lib/seqan/bin/splazers			usr/bin/splazers
-usr/lib/seqan/bin/stellar			usr/bin/stellar
-usr/lib/seqan/bin/tree_recon			usr/bin/tree_recon

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



More information about the debian-med-commit mailing list