[med-svn] r8795 - trunk/packages/ensembl/ensembl/trunk/debian

Andreas Tille tille at alioth.debian.org
Tue Dec 6 20:54:51 UTC 2011


Author: tille
Date: 2011-12-06 20:54:50 +0000 (Tue, 06 Dec 2011)
New Revision: 8795

Added:
   trunk/packages/ensembl/ensembl/trunk/debian/ensembl-doc.install
   trunk/packages/ensembl/ensembl/trunk/debian/libensembl-compara-perl.install
   trunk/packages/ensembl/ensembl/trunk/debian/libensembl-core-perl.install
   trunk/packages/ensembl/ensembl/trunk/debian/libensembl-draw-perl.install
   trunk/packages/ensembl/ensembl/trunk/debian/libensembl-external-perl.install
   trunk/packages/ensembl/ensembl/trunk/debian/libensembl-functgenomics-perl.install
   trunk/packages/ensembl/ensembl/trunk/debian/libensembl-variation-perl.install
Removed:
   trunk/packages/ensembl/ensembl/trunk/debian/libensembl-compara-perl.dirs
   trunk/packages/ensembl/ensembl/trunk/debian/libensembl-core-perl.dirs
   trunk/packages/ensembl/ensembl/trunk/debian/libensembl-external-perl.dirs
   trunk/packages/ensembl/ensembl/trunk/debian/libensembl-functgenomics-perl.dirs
   trunk/packages/ensembl/ensembl/trunk/debian/libensembl-variation-perl.dirs
Modified:
   trunk/packages/ensembl/ensembl/trunk/debian/ensembl-bin.install
   trunk/packages/ensembl/ensembl/trunk/debian/ensembl.install
   trunk/packages/ensembl/ensembl/trunk/debian/rules
Log:
Make heavy use of `dh_install --autodest` 


Modified: trunk/packages/ensembl/ensembl/trunk/debian/ensembl-bin.install
===================================================================
--- trunk/packages/ensembl/ensembl/trunk/debian/ensembl-bin.install	2011-12-06 20:19:44 UTC (rev 8794)
+++ trunk/packages/ensembl/ensembl/trunk/debian/ensembl-bin.install	2011-12-06 20:54:50 UTC (rev 8795)
@@ -1 +1 @@
-ensembl-variation/C_code/calc_genotypes	usr/bin
+usr/bin

Added: trunk/packages/ensembl/ensembl/trunk/debian/ensembl-doc.install
===================================================================
--- trunk/packages/ensembl/ensembl/trunk/debian/ensembl-doc.install	                        (rev 0)
+++ trunk/packages/ensembl/ensembl/trunk/debian/ensembl-doc.install	2011-12-06 20:54:50 UTC (rev 8795)
@@ -0,0 +1,4 @@
+usr/share/doc/ensembl/ensembl
+usr/share/doc/ensembl/ensembl-compara
+usr/share/doc/ensembl/ensembl-functgenomics
+usr/share/doc/ensembl/ensembl-variation

Modified: trunk/packages/ensembl/ensembl/trunk/debian/ensembl.install
===================================================================
--- trunk/packages/ensembl/ensembl/trunk/debian/ensembl.install	2011-12-06 20:19:44 UTC (rev 8794)
+++ trunk/packages/ensembl/ensembl/trunk/debian/ensembl.install	2011-12-06 20:54:50 UTC (rev 8795)
@@ -1,3 +1,8 @@
-# copying files that are considered too different from the original
-# and/or the original too variable across releases to be patched
-debian/ensembl.overwrites/*.pm	etc/default/ensembl.d/
+etc/default/ensembl.d
+usr/share/ensembl/conf
+usr/share/ensembl/ctrl_scripts
+usr/share/ensembl/htdocs
+usr/share/ensembl/modules
+usr/share/ensembl/perl
+usr/share/ensembl/public-plugins
+usr/share/ensembl/utils

Deleted: trunk/packages/ensembl/ensembl/trunk/debian/libensembl-compara-perl.dirs
===================================================================
--- trunk/packages/ensembl/ensembl/trunk/debian/libensembl-compara-perl.dirs	2011-12-06 20:19:44 UTC (rev 8794)
+++ trunk/packages/ensembl/ensembl/trunk/debian/libensembl-compara-perl.dirs	2011-12-06 20:54:50 UTC (rev 8795)
@@ -1 +0,0 @@
-usr/share/ensembl

Added: trunk/packages/ensembl/ensembl/trunk/debian/libensembl-compara-perl.install
===================================================================
--- trunk/packages/ensembl/ensembl/trunk/debian/libensembl-compara-perl.install	                        (rev 0)
+++ trunk/packages/ensembl/ensembl/trunk/debian/libensembl-compara-perl.install	2011-12-06 20:54:50 UTC (rev 8795)
@@ -0,0 +1 @@
+usr/share/ensembl/ensembl-compara

Deleted: trunk/packages/ensembl/ensembl/trunk/debian/libensembl-core-perl.dirs
===================================================================
--- trunk/packages/ensembl/ensembl/trunk/debian/libensembl-core-perl.dirs	2011-12-06 20:19:44 UTC (rev 8794)
+++ trunk/packages/ensembl/ensembl/trunk/debian/libensembl-core-perl.dirs	2011-12-06 20:54:50 UTC (rev 8795)
@@ -1 +0,0 @@
-usr/share

Added: trunk/packages/ensembl/ensembl/trunk/debian/libensembl-core-perl.install
===================================================================
--- trunk/packages/ensembl/ensembl/trunk/debian/libensembl-core-perl.install	                        (rev 0)
+++ trunk/packages/ensembl/ensembl/trunk/debian/libensembl-core-perl.install	2011-12-06 20:54:50 UTC (rev 8795)
@@ -0,0 +1 @@
+usr/share/ensembl/ensembl

Added: trunk/packages/ensembl/ensembl/trunk/debian/libensembl-draw-perl.install
===================================================================
--- trunk/packages/ensembl/ensembl/trunk/debian/libensembl-draw-perl.install	                        (rev 0)
+++ trunk/packages/ensembl/ensembl/trunk/debian/libensembl-draw-perl.install	2011-12-06 20:54:50 UTC (rev 8795)
@@ -0,0 +1 @@
+usr/share/ensembl/ensembl-draw

Deleted: trunk/packages/ensembl/ensembl/trunk/debian/libensembl-external-perl.dirs
===================================================================
--- trunk/packages/ensembl/ensembl/trunk/debian/libensembl-external-perl.dirs	2011-12-06 20:19:44 UTC (rev 8794)
+++ trunk/packages/ensembl/ensembl/trunk/debian/libensembl-external-perl.dirs	2011-12-06 20:54:50 UTC (rev 8795)
@@ -1 +0,0 @@
-usr/share/ensembl

Added: trunk/packages/ensembl/ensembl/trunk/debian/libensembl-external-perl.install
===================================================================
--- trunk/packages/ensembl/ensembl/trunk/debian/libensembl-external-perl.install	                        (rev 0)
+++ trunk/packages/ensembl/ensembl/trunk/debian/libensembl-external-perl.install	2011-12-06 20:54:50 UTC (rev 8795)
@@ -0,0 +1 @@
+usr/share/ensembl/ensembl-external

Deleted: trunk/packages/ensembl/ensembl/trunk/debian/libensembl-functgenomics-perl.dirs
===================================================================
--- trunk/packages/ensembl/ensembl/trunk/debian/libensembl-functgenomics-perl.dirs	2011-12-06 20:19:44 UTC (rev 8794)
+++ trunk/packages/ensembl/ensembl/trunk/debian/libensembl-functgenomics-perl.dirs	2011-12-06 20:54:50 UTC (rev 8795)
@@ -1 +0,0 @@
-usr/share/ensembl

Added: trunk/packages/ensembl/ensembl/trunk/debian/libensembl-functgenomics-perl.install
===================================================================
--- trunk/packages/ensembl/ensembl/trunk/debian/libensembl-functgenomics-perl.install	                        (rev 0)
+++ trunk/packages/ensembl/ensembl/trunk/debian/libensembl-functgenomics-perl.install	2011-12-06 20:54:50 UTC (rev 8795)
@@ -0,0 +1 @@
+usr/share/ensembl/ensembl-functgenomics

Deleted: trunk/packages/ensembl/ensembl/trunk/debian/libensembl-variation-perl.dirs
===================================================================
--- trunk/packages/ensembl/ensembl/trunk/debian/libensembl-variation-perl.dirs	2011-12-06 20:19:44 UTC (rev 8794)
+++ trunk/packages/ensembl/ensembl/trunk/debian/libensembl-variation-perl.dirs	2011-12-06 20:54:50 UTC (rev 8795)
@@ -1 +0,0 @@
-usr/share/ensembl

Added: trunk/packages/ensembl/ensembl/trunk/debian/libensembl-variation-perl.install
===================================================================
--- trunk/packages/ensembl/ensembl/trunk/debian/libensembl-variation-perl.install	                        (rev 0)
+++ trunk/packages/ensembl/ensembl/trunk/debian/libensembl-variation-perl.install	2011-12-06 20:54:50 UTC (rev 8795)
@@ -0,0 +1 @@
+usr/share/ensembl/ensembl-variation

Modified: trunk/packages/ensembl/ensembl/trunk/debian/rules
===================================================================
--- trunk/packages/ensembl/ensembl/trunk/debian/rules	2011-12-06 20:19:44 UTC (rev 8794)
+++ trunk/packages/ensembl/ensembl/trunk/debian/rules	2011-12-06 20:54:50 UTC (rev 8795)
@@ -7,7 +7,10 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-DESTDIR=$(CURDIR)/debian/ensembl
+pkg := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
+DESTDIR=$(CURDIR)/debian/$(pkg)
+TMPINSTDIR=$(CURDIR)/debian/tmp/usr/share/$(pkg)
+TMPDOCDIR=$(CURDIR)/debian/tmp/usr/share/doc/$(pkg)/
 
 %:
 	dh $@
@@ -16,52 +19,12 @@
 	# build-arch
 	$(MAKE) -C ensembl-variation/C_code calc_genotypes
 
-	# build-indep
-	# nothing to build for the Perl packages or the database
-	find . -name "*.pm" -o -name "*.png" -o -name "*.gif" -o -name README \
-                 -o -name "*.sql" -o -name "*.pdf" -o -name "*.html" \
-		-o -name "*.sxw" -o -name "*.conf*" -o -name "*.guess" -o -name "*.sub" \
-		-o -name "*.h" -o -name "*.cpp" -o -name "*.txt" \
-				| grep -v "/.pc/" | xargs -r --max-args 10 chmod 644
 
-	# First round of updates
-	find . -name "*.pl" -o -name "*.sh" -o -name "*.t" -o -name "*.pm" -o \
-		-name "do_flatfile_dump_registry" -o -name "parse_snp_to_ensembl_mouse" \
-				| grep -v "/.pc/" | xargs -r --max-args 1 debian/adjust_shebang_line.sh
 
-	echo "Adjusting path to Perl wherever it may be found" ; \
-	egrep -rl "^#!\s*/.*/perl" . | grep -v "/.pc/" | xargs -r --max-args 1 sed -i '1s%^#!\s*/\(usr\|localsw\)/.*/perl%#!/usr/bin/perl%' ; \
-	egrep -rl "^#!\s*/.*/perl" . | grep -v "/.pc/" | xargs -r --max-args 1 sed -i '1s%^#!\s*/\(usr\|localsw\|software\)/.*/perl%#!/usr/bin/perl%' ; \
-	echo "Adjusting path to Bash wherever it may be found" ; \
-	egrep -rl "^#!\s*/.*/bash" . | grep -v "/.pc/" | xargs -r --max-args 1 sed -i '1s%^#!\s*/\(usr\|localsw\)/.*/bash%#!/bin/bash%' ; \
-	egrep -rl "^#!.*ENV.*PERL" . | grep -v "/.pc/" | xargs -r --max-args 1 sed -i '1s%^#!.*%#!/usr/bin/perl%' ; \
-
-
 override_dh_auto_install:
-	# install-arch
-	d="$(DESTDIR)/usr/share/ensembl" ; \
-	if [ ! -d "$$d" ]; then \
-		echo "Creating directory '$$d'." ; \
-		mkdir -p "$$d" ; \
-	fi ; \
-	echo "Copying to '$$d'"; \
-	cp -r conf ctrl_scripts \
-		htdocs modules perl public-plugins utils \
-		ensembl ensembl-compara ensembl-draw \
-		ensembl-external \
-		ensembl-functgenomics ensembl-variation \
-	    $$d ;
+	# do nothing
 
-	m="$(DESTDIR)-doc/usr/share/doc/ensembl-doc"; if [ ! -d "$$m" ]; then mkdir -p "$$m"; fi ; \
-	for doc in $(DESTDIR)/usr/share/ensembl/*/docs ; do \
-		docdir=`dirname $$doc` ; \
-		docdirbase=`basename $$docdir` ; \
-		from="$(DESTDIR)/usr/share/ensembl/$$docdirbase/docs" ; \
-		to="$$m/$$docdirbase" ; \
-		# echo "Moving from '$$from' to '$$to'.\n" ; \
-		mv "$$from" "$$to" ; \
-	done
-
+remaining_stuff:
 	for p in core compara draw external functgenomics variation; do \
 		destdir="$(CURDIR)/debian/libensembl-$${p}-perl/usr/share/ensembl" ; \
 		if [ ! -d "$$destdir" ]; then mkdir -p "$$destdir"; fi ; \
@@ -81,15 +44,61 @@
 	done
 
 	# some cleanup
-	find debian -name Makefile.PL -o -name "*.tar.gz" | xargs -r rm -f
-	rm -rf debian/libensembl-variation-perl/usr/share/ensembl/ensembl-variation/C_code
+#	find debian -name Makefile.PL -o -name "*.tar.gz" | xargs -r rm -f
 
+
 	# install-indep: build-indep install-indep-copying
 #	find debian/ensembl -name config.guess -o -name config.sub -o -name configure -o \
 #		-name depcomp -o -name install-sh -o -name missing -o -name Makefile.PL | xargs -r rm
 
 override_dh_install:
-	dh_install
+	# Several interpreterlines needs fixing and file permission needs changing
+	# To do so a fake installation to debian/tmp is done and the files there
+	# will be fixed there
+	mkdir -p $(TMPINSTDIR)
+	cp -a `find . -mindepth 1 -maxdepth 1 -type d | grep -v -e cbuild -e .pc -e debian` $(TMPINSTDIR)
+	find $(TMPINSTDIR) -name "*.pm" -o -name "*.png" -o -name "*.gif" -o -name README \
+                -o -name "*.sql" -o -name "*.pdf" -o -name "*.html" \
+		-o -name "*.sxw" -o -name "*.conf*" \
+		-o -name "*.txt" \
+				| xargs -r --max-args 10 chmod 644
+
+	# FIXME: Since version 64 Ensembl contains a copy of doxygen as binary.
+	#        It needs checking in far this is needed at runtime.  Debian packaged version
+	#        should be fine because it is mentioned in the accompanied README
+	rm -rf $(TMPINSTDIR)/utils/static_content/doxygen
+
+	# move binary code out of share
+	mkdir -p $(CURDIR)/debian/tmp/usr/bin
+	mv $(TMPINSTDIR)/ensembl-variation/C_code/calc_genotypes $(CURDIR)/debian/tmp/usr/bin
+	rm -rf $(TMPINSTDIR)/ensembl-variation/C_code
+
+	# First round of updates
+	find $(TMPINSTDIR) -name "*.pl" -o -name "*.sh" -o -name "*.t" -o -name "*.pm" -o \
+		-name "do_flatfile_dump_registry" -o -name "parse_snp_to_ensembl_mouse" \
+				| xargs -r --max-args 1 debian/adjust_shebang_line.sh
+
+	echo "Adjusting path to Perl wherever it may be found" ; \
+	egrep -rl "^#!\s*/.*/perl" $(TMPINSTDIR) | xargs -r --max-args 1 sed -i '1s%^#!\s*/\(usr\|localsw\)/.*/perl%#!/usr/bin/perl%' ; \
+	egrep -rl "^#!\s*/.*/perl" $(TMPINSTDIR) | xargs -r --max-args 1 sed -i '1s%^#!\s*/\(usr\|localsw\|software\)/.*/perl%#!/usr/bin/perl%' ; \
+	echo "Adjusting path to Bash wherever it may be found" ; \
+	egrep -rl "^#!\s*/.*/bash" $(TMPINSTDIR) | xargs -r --max-args 1 sed -i '1s%^#!\s*/\(usr\|localsw\)/.*/bash%#!/bin/bash%' ; \
+	egrep -rl "^#!.*ENV.*PERL" $(TMPINSTDIR) | xargs -r --max-args 1 sed -i '1s%^#!.*%#!/usr/bin/perl%' ; \
+
+	find $(TMPINSTDIR) -name Makefile.PL -delete
+
+	mkdir -p $(CURDIR)/debian/tmp/etc/default/ensembl.d/
+	cp -a debian/ensembl.overwrites/*.pm $(CURDIR)/debian/tmp/etc/default/ensembl.d/
+
+	# move around doc files
+	mkdir -p $(TMPDOCDIR)
+	mv $(TMPINSTDIR)/$(pkg)/docs $(TMPDOCDIR)/$(pkg)
+	mv $(TMPINSTDIR)/$(pkg)-compara/docs $(TMPDOCDIR)/$(pkg)-compara
+	mv $(TMPINSTDIR)/$(pkg)-functgenomics/docs $(TMPDOCDIR)/$(pkg)-functgenomics
+	mv $(TMPINSTDIR)/$(pkg)-variation/documentation $(TMPDOCDIR)/$(pkg)-variation
+
+	dh_install --autodest
+
 	# do not ship extra license files
 	rm -f debian/libensembl-core-perl/usr/share/ensembl/ensembl/misc-scripts/alternative_splicing/AltSplicingToolkit/COPYING
 	rm -f debian/libensembl-core-perl/usr/share/ensembl/ensembl/LICENSE




More information about the debian-med-commit mailing list