[Pkg-emboss-commits] r43 - in emboss-explorer/trunk/debian: . patches

hanska-guest at alioth.debian.org hanska-guest at alioth.debian.org
Thu May 24 09:52:31 UTC 2007


Author: hanska-guest
Date: 2007-05-24 09:52:31 +0000 (Thu, 24 May 2007)
New Revision: 43

Added:
   emboss-explorer/trunk/debian/emboss-explorer.cron.d
   emboss-explorer/trunk/debian/emboss-explorer.manpages
   emboss-explorer/trunk/debian/emboss-explorer.postinst
   emboss-explorer/trunk/debian/libemboss-acd-perl.manpages
   emboss-explorer/trunk/debian/patches/01-fix_examples.dpatch
   emboss-explorer/trunk/debian/patches/02-fix_Conf.pm.dpatch
   emboss-explorer/trunk/debian/patches/03-add_conffile.dpatch
   emboss-explorer/trunk/debian/patches/04-fix_install.dpatch
Removed:
   emboss-explorer/trunk/debian/manpages
   emboss-explorer/trunk/debian/patches/01-fix_install.dpatch
   emboss-explorer/trunk/debian/patches/02-fix_examples.dpatch
Modified:
   emboss-explorer/trunk/debian/emboss-explorer.links
   emboss-explorer/trunk/debian/patches/00list
   emboss-explorer/trunk/debian/rules
Log:
config file in /etc/ plus some other fixes


Added: emboss-explorer/trunk/debian/emboss-explorer.cron.d
===================================================================
--- emboss-explorer/trunk/debian/emboss-explorer.cron.d	                        (rev 0)
+++ emboss-explorer/trunk/debian/emboss-explorer.cron.d	2007-05-24 09:52:31 UTC (rev 43)
@@ -0,0 +1 @@
+0 0 * * *	root	find /var/www/emboss/output -mindepth 1 -maxdepth 1 -atime 1 -exec rm -rf {} \;

Modified: emboss-explorer/trunk/debian/emboss-explorer.links
===================================================================
--- emboss-explorer/trunk/debian/emboss-explorer.links	2007-05-20 13:47:48 UTC (rev 42)
+++ emboss-explorer/trunk/debian/emboss-explorer.links	2007-05-24 09:52:31 UTC (rev 43)
@@ -1 +1 @@
-usr/share/EMBOSS/doc/html/emboss/apps/ usr/share/doc/emboss-explorer/html
+usr/share/EMBOSS/doc/html/emboss/apps/	usr/share/doc/emboss-explorer/html

Added: emboss-explorer/trunk/debian/emboss-explorer.manpages
===================================================================
--- emboss-explorer/trunk/debian/emboss-explorer.manpages	                        (rev 0)
+++ emboss-explorer/trunk/debian/emboss-explorer.manpages	2007-05-24 09:52:31 UTC (rev 43)
@@ -0,0 +1,5 @@
+blib/man3/EMBOSS::GUI::Conf.3pm
+blib/man3/EMBOSS::GUI.3pm
+blib/man3/EMBOSS::GUI::XHTML.3pm
+acdcheck.1
+mkstatic.1

Added: emboss-explorer/trunk/debian/emboss-explorer.postinst
===================================================================
--- emboss-explorer/trunk/debian/emboss-explorer.postinst	                        (rev 0)
+++ emboss-explorer/trunk/debian/emboss-explorer.postinst	2007-05-24 09:52:31 UTC (rev 43)
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+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)
+    	chown -R www-data /var/www/emboss
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
+

Added: emboss-explorer/trunk/debian/libemboss-acd-perl.manpages
===================================================================
--- emboss-explorer/trunk/debian/libemboss-acd-perl.manpages	                        (rev 0)
+++ emboss-explorer/trunk/debian/libemboss-acd-perl.manpages	2007-05-24 09:52:31 UTC (rev 43)
@@ -0,0 +1 @@
+blib/man3/EMBOSS::ACD.3pm

Deleted: emboss-explorer/trunk/debian/manpages
===================================================================
--- emboss-explorer/trunk/debian/manpages	2007-05-20 13:47:48 UTC (rev 42)
+++ emboss-explorer/trunk/debian/manpages	2007-05-24 09:52:31 UTC (rev 43)
@@ -1,6 +0,0 @@
-blib/man3/EMBOSS::GUI::Conf.3pm
-blib/man3/EMBOSS::ACD.3pm
-blib/man3/EMBOSS::GUI.3pm
-blib/man3/EMBOSS::GUI::XHTML.3pm
-acdcheck.1
-mkstatic.1

Modified: emboss-explorer/trunk/debian/patches/00list
===================================================================
--- emboss-explorer/trunk/debian/patches/00list	2007-05-20 13:47:48 UTC (rev 42)
+++ emboss-explorer/trunk/debian/patches/00list	2007-05-24 09:52:31 UTC (rev 43)
@@ -1,2 +1,4 @@
-01-fix_install.dpatch
-02-fix_examples.dpatch
+01-fix_examples.dpatch
+02-fix_Conf.pm.dpatch
+03-add_conffile.dpatch
+04-fix_install.dpatch

Added: emboss-explorer/trunk/debian/patches/01-fix_examples.dpatch
===================================================================
--- emboss-explorer/trunk/debian/patches/01-fix_examples.dpatch	                        (rev 0)
+++ emboss-explorer/trunk/debian/patches/01-fix_examples.dpatch	2007-05-24 09:52:31 UTC (rev 43)
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02-fix_examples.dpatch by David Paleino <d.paleino at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad emboss-explorer~/t/ACD.t emboss-explorer/t/ACD.t
+--- emboss-explorer~/t/ACD.t	2006-11-13 00:38:39.000000000 +0100
++++ emboss-explorer/t/ACD.t	2007-05-20 15:33:09.000000000 +0200
+@@ -15,7 +15,7 @@
+ BEGIN {
+ 	# locate the EMBOSS ACD files in order to validate against them...
+ 	#
+-	@ACDFILES = glob "/usr/local/share/EMBOSS/acd/*.acd";
++	@ACDFILES = glob "/usr/share/EMBOSS/acd/*.acd";
+ 
+ 	$XHTML = EMBOSS::GUI::XHTML->new(
+ 		script_url => 'dummy'


Property changes on: emboss-explorer/trunk/debian/patches/01-fix_examples.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Deleted: emboss-explorer/trunk/debian/patches/01-fix_install.dpatch
===================================================================
--- emboss-explorer/trunk/debian/patches/01-fix_install.dpatch	2007-05-20 13:47:48 UTC (rev 42)
+++ emboss-explorer/trunk/debian/patches/01-fix_install.dpatch	2007-05-24 09:52:31 UTC (rev 43)
@@ -1,149 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 01-fix_install.dpatch by David Paleino <d.paleino at gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Set install script with default values plus some other
-## DP: hack.
-
- at DPATCH@
-diff -urNad emboss-explorer~/install emboss-explorer/install
---- emboss-explorer~/install	2006-11-13 01:55:53.000000000 +0100
-+++ emboss-explorer/install	2007-05-20 15:21:16.000000000 +0200
-@@ -1,38 +1,15 @@
- #!/bin/sh
-+BUILD_DIR=./debian/emboss-explorer
- 
--usage() {
--	cat <<EOF
--this script must be executed from the top-level directory of the
--EMBOSS Explorer distribution.
--EOF
--	exit 1
--}
--
--prompt() {
--	echo -e "$1\n\t(default is $2)"
--	read INPUT
--	eval $3=${INPUT:-$2}
--}
--
--echo installing EMBOSS Explorer perl modules...
--echo
--perl Makefile.PL && make && make install || exit
--
--echo installing EMBOSS Explorer GUI components...
--echo
--echo I need to collect some information in order to install EMBOSS Explorer:
--
--EMBOSS_PREFIX=`embossversion -full 2>/dev/null | awk '/^InstallDirectory/ { print $2 }'`
--prompt "Where was EMBOSS installed?" ${EMBOSS_PREFIX:-/usr/local} EMBOSS_PREFIX
--
--# TODO something fancy to guess the web root?
--prompt "Where should the EMBOSS Explorer HTML files be installed?" /var/www/html/emboss HTML_PATH
-+EMBOSS_PREFIX=/usr
-+HTML_PATH=/var/www/emboss
- OUTPUT_PATH=$HTML_PATH/output
--
--prompt "What is the URL prefix corresponding to the HTML directory above?" /emboss HTML_URL
-+HTML_URL=/emboss
- OUTPUT_URL=$HTML_URL/output
--
--prompt "Where should the EMBOSS Explorer CGI script be installed?" /var/www/cgi-bin/emboss CGI_PATH
-+CGI_PATH=/usr/lib/cgi-bin/emboss
-+IMAGE_URL=/images/emboss-explorer
-+MANUAL_URL=/doc/emboss-explorer/html
-+CGI_URL=/cgi-bin/emboss
- 
- if [ -d $CGI_PATH ]
- then
-@@ -42,27 +19,23 @@
- 	CGI_DIR=${CGI_PATH%/*}
- fi
- 
--prompt "What is the complete URL corresponding to the CGI script '$CGI_PATH'?" /cgi-bin/emboss CGI_URL
--
- # munge EMBOSS::GUI::Conf according to the information above...
--CONF_MODULE=`perl -MEMBOSS::GUI::Conf -e 'print $INC{"EMBOSS/GUI/Conf.pm"}'`
-+#
-+# we haven't installed emboss-explorer yet, so the following perl
-+# line won't work (thus setting CONF_MODULE in a static-way):
-+#
-+# CONF_MODULE=`perl -MEMBOSS::GUI::Conf -e 'print $INC{"EMBOSS/GUI/Conf.pm"}'`
-+CONF_MODULE=$BUILD_DIR/usr/share/perl5/EMBOSS/GUI/Conf.pm
- perl -pi -e "
- 	\$HTML_PATH = '$HTML_PATH'; s/(?<=HTML_PATH = \")[^\"]*/\$HTML_PATH/;
- 	\$HTML_URL='$HTML_URL'; s/(?<=HTML_URL = \")[^\"]*/\$HTML_URL/;
- 	\$OUTPUT_PATH = '$OUTPUT_PATH'; s/(?<=OUTPUT_PATH = \")[^\"]*/\$OUTPUT_PATH/;
- 	\$OUTPUT_URL='$OUTPUT_URL'; s/(?<=OUTPUT_URL = \")[^\"]*/\$OUTPUT_URL/;
- 	\$EMBOSS_PREFIX='$EMBOSS_PREFIX'; s/(?<=EMBOSS_PREFIX = \")[^\"]*/\$EMBOSS_PREFIX/;
-+	\$IMAGE_URL='$IMAGE_URL'; s/(?<=IMAGE_URL = \")[^\"]*/\$IMAGE_URL/;
-+	\$MANUAL_URL='$MANUAL_URL'; s/(?<=MANUAL_URL = \")[^\"]*/\$MANUAL_URL/;
- " $CONF_MODULE
- 
--# install HTML and CGI files...
--[ -d html ] || usage
--echo installing HTML files to $HTML_PATH...
--if [ -d $HTML_PATH ]
--then
--	cp -rp html/* $HTML_PATH	
--else
--	cp -rp html $HTML_PATH
--fi
- echo creating HTML index file at $HTML_PATH/index.html...
- echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\"
-  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">
-@@ -75,54 +48,3 @@
-     <frame src=\"$CGI_URL/intro\" name=\"main\" />
-   </frameset>
- </html>" >$HTML_PATH/index.html
--echo creating output directory at $OUTPUT_PATH...
--[ -d $OUTPUT_PATH ] || mkdir $OUTPUT_PATH
--#echo creating .htaccess file in $OUTPUT_PATH/.htaccess...
--#echo "Header add Cache-Control: no-cache" >>$OUTPUT_PATH/.htaccess
--echo installing CGI script to $CGI_PATH...
--cp cgi/emboss $CGI_PATH
--
--# copy support files used in the program manuals...
--echo copying manual support files to $HTML_PATH/manual...
--[ -d $HTML_PATH/manual ] || mkdir $HTML_PATH/manual
--# EMBOSS 3
--find $EMBOSS_PREFIX/share/EMBOSS/doc/programs/html -type f ! -name '*.html' -exec cp {} $HTML_PATH/manual \;
--# EMBOSS 4
--find $EMBOSS_PREFIX/share/EMBOSS/doc/html/emboss/apps -type f ! -name '*.html' -exec cp {} $HTML_PATH/manual \;
--
--# fix permissions...
--echo fixing permissions...
--find $HTML_PATH -type d -exec chmod a+rx {} \; -o -type f -exec chmod a+r {} \;
--chmod a+rwx $OUTPUT_PATH
--chmod a+rx $CGI_PATH
--
--# TODO mention cron script in bin directory, when it exists...
--CRON="0 4 * * * find $OUTPUT_PATH -type d -mindepth 1 -maxdepth 1 -atime 1 -exec rm -rf {} \;"
--
--# mention location of configuration file and things that can be changed (list
--# of excluded applications, mostly...)
--
--cat <<EOF
--
--EMBOSS Explorer is installed.  Visit $CGI_URL to test it out.
--Site configuration (including a list of applications to be excluded from
--public access) is stored in the EMBOSS::GUI::Conf module (located at $CONF_MODULE).
--
--The main style sheet, which can be edited to customize the appearance of
--EMBOSS Explorer is $HTML_PATH/style/emboss.css.  If you prefer the look and
--feel of the old EMBOSS GUI, you can use $HTML_PATH/style/classic.css
--instead (the style sheet is specified in the EMBOSS::GUI::Conf module).
--
--EMBOSS Explorer generates temporary output files every time an application is
--used.  Depending on the tasks being performed, these output files can consume
--space fairly quickly.  The old output can be cleaned up on a regular basis by
--adding a task to the root user's crontab.  The following example runs every
--morning at 0400 and removes all output files that have not been accessed in
--the last 24 hours:
--
--0 4 * * * find $OUTPUT_PATH -type d -mindepth 1 -maxdepth 1 -atime 1 -exec rm -rf {} \;
--
--Please report any errors or strange occurrences using the bug tracker at
--http://sourceforge.net/tracker/?func=add&group_id=124389&atid=699414
--
--EOF

Added: emboss-explorer/trunk/debian/patches/02-fix_Conf.pm.dpatch
===================================================================
--- emboss-explorer/trunk/debian/patches/02-fix_Conf.pm.dpatch	                        (rev 0)
+++ emboss-explorer/trunk/debian/patches/02-fix_Conf.pm.dpatch	2007-05-24 09:52:31 UTC (rev 43)
@@ -0,0 +1,87 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01-fix_Conf.pm.dpatch by David Paleino <d.paleino at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Moving configuration to /etc/emboss-explorer.conf
+
+ at DPATCH@
+diff -urNad emboss-explorer~/lib/EMBOSS/GUI/Conf.pm emboss-explorer/lib/EMBOSS/GUI/Conf.pm
+--- emboss-explorer~/lib/EMBOSS/GUI/Conf.pm	2006-11-13 01:30:08.000000000 +0100
++++ emboss-explorer/lib/EMBOSS/GUI/Conf.pm	2007-05-21 19:45:56.000000000 +0200
+@@ -50,72 +50,10 @@
+ 
+ our $VERSION = 1.10;
+ 
+-# path to the EMBOSS::GUI HTML files
+-our $HTML_PATH = "/var/www/emboss/html";
+-
+-# URL corresponding to $HTML_PATH above
+-our $HTML_URL = "/emboss";
+-
+-# URL specifying the style sheet to use
+-our $STYLE_URL = "$HTML_URL/style/emboss.css";
+-
+-# URL prefix to place before image links
+-our $IMAGE_URL = "$HTML_URL/images";
+-
+-# URL prefix to place before manual links (only used in static pages)
+-our $MANUAL_URL = "$HTML_URL/manual";
+-
+-# path to the EMBOSS::GUI temporary output directory
+-our $OUTPUT_PATH = "$HTML_PATH/output";
+-
+-# URL corresponding to $OUTPUT_PATH above
+-our $OUTPUT_URL = "$HTML_URL/output";
+-
+-# prefix under which EMBOSS was installed
+-our $EMBOSS_PREFIX = "/usr/local";
+-
+-# path to EMBOSS binaries
+-our $EMBOSS_BIN = "$EMBOSS_PREFIX/bin";
+-
+-# path to EMBOSS installation
+-our $EMBOSS_HOME = "$EMBOSS_PREFIX/share/EMBOSS";
+-
+-# path to EMBOSS ACD files
+-our $EMBOSS_ACDROOT = "$EMBOSS_HOME/acd";
+-
+-# path to EMBOSS data
+-our $EMBOSS_DATA = "$EMBOSS_HOME/data";
+-
+-# path to EMBOSS application manuals
+-our $EMBOSS_MANUAL = "$EMBOSS_HOME/doc/html";
+-
+-# list of groups and applications to exclude from the main menu
+-our @EXCLUDED = (
+-	"ACD",
+-	"acdc",
+-	"acdpretty",
+-	"acdtable",
+-	"acdtrace",
+-	"acdvalid",
+-	"UTILS DATABASE CREATION",
+-	"aaindexextract",
+-	"cutgextract",
+-	"printsextract",
+-	"prosextract",
+-	"rebaseextract",
+-	"tfextract",
+-	"UTILS DATABASE INDEXING",
+-	"dbiblast",
+-	"dbifasta",
+-	"dbiflat",
+-	"dbigcg",
+-);
+-
+-# number of seconds to delay between placeholder page refreshes
+-our $REFRESH_DELAY = 1;
+-
+-# whether or not to display using frames
+-our $FRAMES = 1;
++open (config, "</etc/emboss-explorer.conf") or die "Cannot load /etc/emboss-explorer.conf!";
++ at conf = <config>;
++eval join("\n", @conf);
++die $@ if $@;
+ 
+ =item new()
+ 


Property changes on: emboss-explorer/trunk/debian/patches/02-fix_Conf.pm.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Deleted: emboss-explorer/trunk/debian/patches/02-fix_examples.dpatch
===================================================================
--- emboss-explorer/trunk/debian/patches/02-fix_examples.dpatch	2007-05-20 13:47:48 UTC (rev 42)
+++ emboss-explorer/trunk/debian/patches/02-fix_examples.dpatch	2007-05-24 09:52:31 UTC (rev 43)
@@ -1,19 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 02-fix_examples.dpatch by David Paleino <d.paleino at gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-diff -urNad emboss-explorer~/t/ACD.t emboss-explorer/t/ACD.t
---- emboss-explorer~/t/ACD.t	2006-11-13 00:38:39.000000000 +0100
-+++ emboss-explorer/t/ACD.t	2007-05-20 15:33:09.000000000 +0200
-@@ -15,7 +15,7 @@
- BEGIN {
- 	# locate the EMBOSS ACD files in order to validate against them...
- 	#
--	@ACDFILES = glob "/usr/local/share/EMBOSS/acd/*.acd";
-+	@ACDFILES = glob "/usr/share/EMBOSS/acd/*.acd";
- 
- 	$XHTML = EMBOSS::GUI::XHTML->new(
- 		script_url => 'dummy'

Added: emboss-explorer/trunk/debian/patches/03-add_conffile.dpatch
===================================================================
--- emboss-explorer/trunk/debian/patches/03-add_conffile.dpatch	                        (rev 0)
+++ emboss-explorer/trunk/debian/patches/03-add_conffile.dpatch	2007-05-24 09:52:31 UTC (rev 43)
@@ -0,0 +1,77 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04-add_conffile.dpatch by David Paleino <d.paleino at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Config file extracted from Conf.pm
+
+ at DPATCH@
+diff -urNad emboss-explorer~/emboss-explorer.conf emboss-explorer/emboss-explorer.conf
+--- emboss-explorer~/emboss-explorer.conf	1970-01-01 01:00:00.000000000 +0100
++++ emboss-explorer/emboss-explorer.conf	2007-05-24 11:43:48.000000000 +0200
+@@ -0,0 +1,66 @@
++# path to the EMBOSS::GUI HTML files
++our $HTML_PATH = "/var/www/emboss/html";
++
++# URL corresponding to $HTML_PATH above
++our $HTML_URL = "/emboss";
++
++# URL specifying the style sheet to use
++our $STYLE_URL = "$HTML_URL/style/emboss.css";
++
++# URL prefix to place before image links
++our $IMAGE_URL = "$HTML_URL/images";
++
++# URL prefix to place before manual links (only used in static pages)
++our $MANUAL_URL = "$HTML_URL/manual";
++
++# path to the EMBOSS::GUI temporary output directory
++our $OUTPUT_PATH = "$HTML_PATH/output";
++
++# URL corresponding to $OUTPUT_PATH above
++our $OUTPUT_URL = "$HTML_URL/output";
++
++# prefix under which EMBOSS was installed
++our $EMBOSS_PREFIX = "/usr/local";
++
++# path to EMBOSS binaries
++our $EMBOSS_BIN = "$EMBOSS_PREFIX/bin";
++
++# path to EMBOSS installation
++our $EMBOSS_HOME = "$EMBOSS_PREFIX/share/EMBOSS";
++
++# path to EMBOSS ACD files
++our $EMBOSS_ACDROOT = "$EMBOSS_HOME/acd";
++
++# path to EMBOSS data
++our $EMBOSS_DATA = "$EMBOSS_HOME/data";
++
++# path to EMBOSS application manuals
++our $EMBOSS_MANUAL = "$EMBOSS_HOME/doc/html";
++
++# list of groups and applications to exclude from the main menu
++our @EXCLUDED = (
++	"ACD",
++	"acdc",
++	"acdpretty",
++	"acdtable",
++	"acdtrace",
++	"acdvalid",
++	"UTILS DATABASE CREATION",
++	"aaindexextract",
++	"cutgextract",
++	"printsextract",
++	"prosextract",
++	"rebaseextract",
++	"tfextract",
++	"UTILS DATABASE INDEXING",
++	"dbiblast",
++	"dbifasta",
++	"dbiflat",
++	"dbigcg",
++);
++
++# number of seconds to delay between placeholder page refreshes
++our $REFRESH_DELAY = 1;
++
++# whether or not to display using frames
++our $FRAMES = 1;


Property changes on: emboss-explorer/trunk/debian/patches/03-add_conffile.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Added: emboss-explorer/trunk/debian/patches/04-fix_install.dpatch
===================================================================
--- emboss-explorer/trunk/debian/patches/04-fix_install.dpatch	                        (rev 0)
+++ emboss-explorer/trunk/debian/patches/04-fix_install.dpatch	2007-05-24 09:52:31 UTC (rev 43)
@@ -0,0 +1,146 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01-fix_install.dpatch by David Paleino <d.paleino at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Set install script with default values plus some other
+## DP: hack.
+
+ at DPATCH@
+diff -urNad emboss-explorer~/install emboss-explorer/install
+--- emboss-explorer~/install	2007-05-24 11:43:39.000000000 +0200
++++ emboss-explorer/install	2007-05-24 11:44:11.000000000 +0200
+@@ -1,68 +1,25 @@
+ #!/bin/sh
++BUILD_DIR=./debian/emboss-explorer
+ 
+-usage() {
+-	cat <<EOF
+-this script must be executed from the top-level directory of the
+-EMBOSS Explorer distribution.
+-EOF
+-	exit 1
+-}
+-
+-prompt() {
+-	echo -e "$1\n\t(default is $2)"
+-	read INPUT
+-	eval $3=${INPUT:-$2}
+-}
+-
+-echo installing EMBOSS Explorer perl modules...
+-echo
+-perl Makefile.PL && make && make install || exit
+-
+-echo installing EMBOSS Explorer GUI components...
+-echo
+-echo I need to collect some information in order to install EMBOSS Explorer:
+-
+-EMBOSS_PREFIX=`embossversion -full 2>/dev/null | awk '/^InstallDirectory/ { print $2 }'`
+-prompt "Where was EMBOSS installed?" ${EMBOSS_PREFIX:-/usr/local} EMBOSS_PREFIX
+-
+-# TODO something fancy to guess the web root?
+-prompt "Where should the EMBOSS Explorer HTML files be installed?" /var/www/html/emboss HTML_PATH
++EMBOSS_PREFIX=/usr
++HTML_PATH=/var/www/emboss
+ OUTPUT_PATH=$HTML_PATH/output
+-
+-prompt "What is the URL prefix corresponding to the HTML directory above?" /emboss HTML_URL
++HTML_URL=/emboss
+ OUTPUT_URL=$HTML_URL/output
++IMAGE_URL=/images/emboss-explorer
++MANUAL_URL=/doc/emboss-explorer/html
+ 
+-prompt "Where should the EMBOSS Explorer CGI script be installed?" /var/www/cgi-bin/emboss CGI_PATH
+-
+-if [ -d $CGI_PATH ]
+-then
+-	CGI_DIR=$CGI_PATH
+-	CGI_PATH=$CGI_DIR/emboss
+-else
+-	CGI_DIR=${CGI_PATH%/*}
+-fi
+-
+-prompt "What is the complete URL corresponding to the CGI script '$CGI_PATH'?" /cgi-bin/emboss CGI_URL
+-
+-# munge EMBOSS::GUI::Conf according to the information above...
+-CONF_MODULE=`perl -MEMBOSS::GUI::Conf -e 'print $INC{"EMBOSS/GUI/Conf.pm"}'`
++CONF_MODULE=$BUILD_DIR/etc/emboss-explorer.conf
+ perl -pi -e "
+ 	\$HTML_PATH = '$HTML_PATH'; s/(?<=HTML_PATH = \")[^\"]*/\$HTML_PATH/;
+ 	\$HTML_URL='$HTML_URL'; s/(?<=HTML_URL = \")[^\"]*/\$HTML_URL/;
+ 	\$OUTPUT_PATH = '$OUTPUT_PATH'; s/(?<=OUTPUT_PATH = \")[^\"]*/\$OUTPUT_PATH/;
+ 	\$OUTPUT_URL='$OUTPUT_URL'; s/(?<=OUTPUT_URL = \")[^\"]*/\$OUTPUT_URL/;
+ 	\$EMBOSS_PREFIX='$EMBOSS_PREFIX'; s/(?<=EMBOSS_PREFIX = \")[^\"]*/\$EMBOSS_PREFIX/;
++	\$IMAGE_URL='$IMAGE_URL'; s/(?<=IMAGE_URL = \")[^\"]*/\$IMAGE_URL/;
++	\$MANUAL_URL='$MANUAL_URL'; s/(?<=MANUAL_URL = \")[^\"]*/\$MANUAL_URL/;
+ " $CONF_MODULE
+ 
+-# install HTML and CGI files...
+-[ -d html ] || usage
+-echo installing HTML files to $HTML_PATH...
+-if [ -d $HTML_PATH ]
+-then
+-	cp -rp html/* $HTML_PATH	
+-else
+-	cp -rp html $HTML_PATH
+-fi
+ echo creating HTML index file at $HTML_PATH/index.html...
+ echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\"
+  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">
+@@ -74,55 +31,4 @@
+     <frame src=\"$CGI_URL/menu\" name=\"menu\" />
+     <frame src=\"$CGI_URL/intro\" name=\"main\" />
+   </frameset>
+-</html>" >$HTML_PATH/index.html
+-echo creating output directory at $OUTPUT_PATH...
+-[ -d $OUTPUT_PATH ] || mkdir $OUTPUT_PATH
+-#echo creating .htaccess file in $OUTPUT_PATH/.htaccess...
+-#echo "Header add Cache-Control: no-cache" >>$OUTPUT_PATH/.htaccess
+-echo installing CGI script to $CGI_PATH...
+-cp cgi/emboss $CGI_PATH
+-
+-# copy support files used in the program manuals...
+-echo copying manual support files to $HTML_PATH/manual...
+-[ -d $HTML_PATH/manual ] || mkdir $HTML_PATH/manual
+-# EMBOSS 3
+-find $EMBOSS_PREFIX/share/EMBOSS/doc/programs/html -type f ! -name '*.html' -exec cp {} $HTML_PATH/manual \;
+-# EMBOSS 4
+-find $EMBOSS_PREFIX/share/EMBOSS/doc/html/emboss/apps -type f ! -name '*.html' -exec cp {} $HTML_PATH/manual \;
+-
+-# fix permissions...
+-echo fixing permissions...
+-find $HTML_PATH -type d -exec chmod a+rx {} \; -o -type f -exec chmod a+r {} \;
+-chmod a+rwx $OUTPUT_PATH
+-chmod a+rx $CGI_PATH
+-
+-# TODO mention cron script in bin directory, when it exists...
+-CRON="0 4 * * * find $OUTPUT_PATH -type d -mindepth 1 -maxdepth 1 -atime 1 -exec rm -rf {} \;"
+-
+-# mention location of configuration file and things that can be changed (list
+-# of excluded applications, mostly...)
+-
+-cat <<EOF
+-
+-EMBOSS Explorer is installed.  Visit $CGI_URL to test it out.
+-Site configuration (including a list of applications to be excluded from
+-public access) is stored in the EMBOSS::GUI::Conf module (located at $CONF_MODULE).
+-
+-The main style sheet, which can be edited to customize the appearance of
+-EMBOSS Explorer is $HTML_PATH/style/emboss.css.  If you prefer the look and
+-feel of the old EMBOSS GUI, you can use $HTML_PATH/style/classic.css
+-instead (the style sheet is specified in the EMBOSS::GUI::Conf module).
+-
+-EMBOSS Explorer generates temporary output files every time an application is
+-used.  Depending on the tasks being performed, these output files can consume
+-space fairly quickly.  The old output can be cleaned up on a regular basis by
+-adding a task to the root user's crontab.  The following example runs every
+-morning at 0400 and removes all output files that have not been accessed in
+-the last 24 hours:
+-
+-0 4 * * * find $OUTPUT_PATH -type d -mindepth 1 -maxdepth 1 -atime 1 -exec rm -rf {} \;
+-
+-Please report any errors or strange occurrences using the bug tracker at
+-http://sourceforge.net/tracker/?func=add&group_id=124389&atid=699414
+-
+-EOF
++</html>" >$BUILD_DIR$HTML_PATH/index.html


Property changes on: emboss-explorer/trunk/debian/patches/04-fix_install.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Modified: emboss-explorer/trunk/debian/rules
===================================================================
--- emboss-explorer/trunk/debian/rules	2007-05-20 13:47:48 UTC (rev 42)
+++ emboss-explorer/trunk/debian/rules	2007-05-24 09:52:31 UTC (rev 43)
@@ -42,30 +42,18 @@
 
 	$(MAKE) install PREFIX=$(CURDIR)/debian/tmp/usr
 	
-	# let's create the same dirs into debian/tmp/
-	mkdir -p $(CURDIR)/debian/tmp/usr/bin \
-			$(CURDIR)/debian/tmp/usr/lib/cgi-bin \
-			$(CURDIR)/debian/tmp/usr/share/images/emboss-explorer \
-			$(CURDIR)/debian/tmp/var/www/emboss/output \
-			$(CURDIR)/debian/tmp/var/www/emboss/style \
-			$(CURDIR)/debian/tmp/usr/share/perl5/EMBOSS/
-
-	-install -m 644 html/* $(CURDIR)/debian/tmp/var/www/emboss/
-	install -m 644 html/images/* $(CURDIR)/debian/tmp/usr/share/images/emboss-explorer/
-	install -m 644 html/style/* $(CURDIR)/debian/tmp/var/www/emboss/style/
-	install -m 755 cgi/emboss $(CURDIR)/debian/tmp/usr/lib/cgi-bin/emboss
-	install -m 755 bin/* $(CURDIR)/debian/tmp/usr/bin
-
-	# fixing permissions
-	chmod a+rwx $(CURDIR)/debian/tmp/var/www/emboss/output/
-
+	dh_install --sourcedir=debian/tmp
+	
+	./install
+	
 binary-arch:
 binary-indep: build install
 	dh_testdir
 	dh_testroot
-	dh_install --sourcedir=debian/tmp
+#	dh_install --sourcedir=debian/tmp
 	dh_installchangelogs 
 	dh_installexamples
+	dh_installcron
 	dh_installdocs
 	dh_installman
 	dh_link




More information about the Pkg-emboss-commits mailing list