[med-svn] r13428 - in trunk/packages/metastudent-data/trunk/debian: . source

Laszlo Kajan lkajan at alioth.debian.org
Fri Apr 26 12:57:53 UTC 2013


Author: lkajan
Date: 2013-04-26 12:57:53 +0000 (Fri, 26 Apr 2013)
New Revision: 13428

Added:
   trunk/packages/metastudent-data/trunk/debian/Makefile.Debian
   trunk/packages/metastudent-data/trunk/debian/README.Debian
   trunk/packages/metastudent-data/trunk/debian/README.source
   trunk/packages/metastudent-data/trunk/debian/postinst
   trunk/packages/metastudent-data/trunk/debian/prerm
   trunk/packages/metastudent-data/trunk/debian/source/
   trunk/packages/metastudent-data/trunk/debian/source/format
Modified:
   trunk/packages/metastudent-data/trunk/debian/compat
   trunk/packages/metastudent-data/trunk/debian/control
   trunk/packages/metastudent-data/trunk/debian/rules
Log:
building blast database in postinst is written and tested

Added: trunk/packages/metastudent-data/trunk/debian/Makefile.Debian
===================================================================
--- trunk/packages/metastudent-data/trunk/debian/Makefile.Debian	                        (rev 0)
+++ trunk/packages/metastudent-data/trunk/debian/Makefile.Debian	2013-04-26 12:57:53 UTC (rev 13428)
@@ -0,0 +1,14 @@
+#!/usr/bin/make -f
+# run from /usr/lib/metastudent-data
+FASTA := $(shell cd /usr/share/metastudent-data && for f in dataset_*/*/*.fasta; do echo $$f; done)
+BLASTDB := $(FASTA:.fasta=.fasta.psq)
+
+.PHONY: all
+all: $(BLASTDB)
+
+$(BLASTDB): %.fasta.psq : /usr/share/metastudent-data/%.fasta
+	formatdb -i "$<" -n "$(@:.psq=)" && rm -f formatdb.log
+
+.PHONY: clean
+clean:
+	rm -f $(BLASTDB:.psq=.*)


Property changes on: trunk/packages/metastudent-data/trunk/debian/Makefile.Debian
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/packages/metastudent-data/trunk/debian/README.Debian
===================================================================
--- trunk/packages/metastudent-data/trunk/debian/README.Debian	                        (rev 0)
+++ trunk/packages/metastudent-data/trunk/debian/README.Debian	2013-04-26 12:57:53 UTC (rev 13428)
@@ -0,0 +1,3 @@
+metastudent-data for Debian
+===========================
+Large (>100MB) BLAST databases required by metastudent and provided in source form by this package are built during installation.

Added: trunk/packages/metastudent-data/trunk/debian/README.source
===================================================================
--- trunk/packages/metastudent-data/trunk/debian/README.source	                        (rev 0)
+++ trunk/packages/metastudent-data/trunk/debian/README.source	2013-04-26 12:57:53 UTC (rev 13428)
@@ -0,0 +1,6 @@
+metastudent-data for Debian
+===========================
+This package follows the logic of the data.debian.org proposal at [1]. The source data package is large (>100MB xz compressed), therefore we make no architecture dependent binary packages.
+Instread, we generate the architecture dependent files in a postinst script.
+
+[1] http://ftp-master.debian.org/wiki/projects/data/


Property changes on: trunk/packages/metastudent-data/trunk/debian/compat
___________________________________________________________________
Deleted: svn:executable
   - *

Modified: trunk/packages/metastudent-data/trunk/debian/control
===================================================================
--- trunk/packages/metastudent-data/trunk/debian/control	2013-04-26 07:54:01 UTC (rev 13427)
+++ trunk/packages/metastudent-data/trunk/debian/control	2013-04-26 12:57:53 UTC (rev 13428)
@@ -12,7 +12,7 @@
 Package: metastudent-data
 Architecture: all
 Homepage: http://www.rostlab.org
-Depends: ${misc:Depends}
+Depends: ${misc:Depends}, blast2
 Description: predictor of Gene Ontology terms from protein sequence - data files
  Often, only the sequence of a protein is known, but 
  not its functions. Metastudent will try to predict 

Added: trunk/packages/metastudent-data/trunk/debian/postinst
===================================================================
--- trunk/packages/metastudent-data/trunk/debian/postinst	                        (rev 0)
+++ trunk/packages/metastudent-data/trunk/debian/postinst	2013-04-26 12:57:53 UTC (rev 13428)
@@ -0,0 +1,38 @@
+#!/bin/sh
+# postinst script for metastudent-data
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    configure)
+    	# build blast databases our of arch indep fasta files
+	make -f /usr/share/metastudent-data/Makefile.Debian -C /usr/lib/metastudent-data all
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0


Property changes on: trunk/packages/metastudent-data/trunk/debian/postinst
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/packages/metastudent-data/trunk/debian/prerm
===================================================================
--- trunk/packages/metastudent-data/trunk/debian/prerm	                        (rev 0)
+++ trunk/packages/metastudent-data/trunk/debian/prerm	2013-04-26 12:57:53 UTC (rev 13428)
@@ -0,0 +1,37 @@
+#!/bin/sh
+# prerm script for metastudent-data
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|deconfigure)
+    	# remove built blast databases
+	make -f /usr/share/metastudent-data/Makefile.Debian -C /usr/lib/metastudent-data clean
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0


Property changes on: trunk/packages/metastudent-data/trunk/debian/prerm
___________________________________________________________________
Added: svn:executable
   + *

Modified: trunk/packages/metastudent-data/trunk/debian/rules
===================================================================
--- trunk/packages/metastudent-data/trunk/debian/rules	2013-04-26 07:54:01 UTC (rev 13427)
+++ trunk/packages/metastudent-data/trunk/debian/rules	2013-04-26 12:57:53 UTC (rev 13428)
@@ -5,8 +5,18 @@
 %:
 	dh $@
 
+# trick make so that it does not build arch-dep data
 override_dh_auto_build:
-	echo TODO >&2
+	for f in dataset_*/*/*.fasta; do touch "$$f.phr" "$$f.pin" "$$f.psq"; done
+	dh_auto_build
 
+# include arch-indep sources for the arch-dep data (see d/README.source)
 override_dh_auto_install:
-	echo TODO >&2
+	dh_auto_install
+	find debian/metastudent-data/usr/lib \( -name '*.phr' -o -name '*.pin' -o -name '*.psq' \) -delete
+	for f in dataset_*/*/*.fasta; do cp -fa "$$f" "debian/metastudent-data/usr/share/metastudent-data/$$f"; done
+	cp -fa debian/Makefile.Debian debian/metastudent-data/usr/share/metastudent-data/
+
+DEB_COMPRESS_TYPE := xz
+override_dh_builddeb:
+	dh_builddeb -- -Z$(DEB_COMPRESS_TYPE)

Added: trunk/packages/metastudent-data/trunk/debian/source/format
===================================================================
--- trunk/packages/metastudent-data/trunk/debian/source/format	                        (rev 0)
+++ trunk/packages/metastudent-data/trunk/debian/source/format	2013-04-26 12:57:53 UTC (rev 13428)
@@ -0,0 +1 @@
+3.0 (quilt)


Property changes on: trunk/packages/metastudent-data/trunk/debian/source/format
___________________________________________________________________
Added: svn:executable
   + *




More information about the debian-med-commit mailing list