aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-biology/gbrowse')
-rw-r--r--sci-biology/gbrowse/Manifest8
-rw-r--r--sci-biology/gbrowse/files/GBrowseInstall.pm-2.26.patch (renamed from sci-biology/gbrowse/files/GBrowseInstall.pm.patch)12
-rw-r--r--sci-biology/gbrowse/files/GBrowseInstall.pm-2.33.patch32
-rw-r--r--sci-biology/gbrowse/files/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm-2.26.patch21
-rw-r--r--sci-biology/gbrowse/gbrowse-2.26.ebuild30
-rw-r--r--sci-biology/gbrowse/gbrowse-2.33.ebuild158
6 files changed, 248 insertions, 13 deletions
diff --git a/sci-biology/gbrowse/Manifest b/sci-biology/gbrowse/Manifest
index 930f89d8b..96f87cdb3 100644
--- a/sci-biology/gbrowse/Manifest
+++ b/sci-biology/gbrowse/Manifest
@@ -1,9 +1,12 @@
-AUX GBrowseInstall.pm.patch 2725 RMD160 233736db7a83e6c196c83aba928f3e935833afa6 SHA1 7e1916804d42ff5700bb1ccd0ba4b6d9b676da49 SHA256 64edd999fd5aa6ddcfaccea534aa2582462a8e95b184f227d6f120d42545100d
+AUX GBrowseInstall.pm-2.26.patch 2647 RMD160 5acd26d95bf0c26edb0f816e840b43ef99a88ea3 SHA1 39362a38cff41097ead8c49de5eaf94d77c59f02 SHA256 1aee7359bc1b036f5d214975a5ea2395a507f04b0ee839ed3a1543a0ab4fb3c6
+AUX GBrowseInstall.pm-2.33.patch 1278 RMD160 96c7f2c66537c6e01cf2619018f608607c0927dc SHA1 a3cb874018d2c7a5acf34381971cc09d83a13f73 SHA256 5a1018f582c2e0ffca034d04ce73f678dd879d90932e4e89ea664c7c113f4b7c
+AUX GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm-2.26.patch 1001 RMD160 6784a8d01714be237247d56df13de96681f3aea5 SHA1 55c3eac7eb1e11c766b8d430c7dd36336347ef50 SHA256 a25f49dba6609a25c799d0290713038b608f8aef1a4275eff5f1f12e5225a19a
AUX gbrowse-slave.default 210 RMD160 77245190ab0d3a543f3103bb6f21864f73ea1cde SHA1 a19d60edd3fdc1f059ed8fa58f7e91fc47ec92dc SHA256 e4e6d68ade29681f442b2e1c7f8abbc7ff3255b3b8db3c59ed6368ba561d7d66
AUX gbrowse-slave.init.d 2196 RMD160 8b565d1be23c89cbae0f9fd5cd2201f47a564b94 SHA1 738bc8f06486a0e6caa72642f79f9b7dbb356524 SHA256 de511a92757153ee648eb6cd39e3c69c1e30fa2c2ed406f24c08571c72609219
AUX gbrowse.conf.vhosts.d 740 RMD160 e24f5132e37a84dd0bb9a39e2de99cd11d260844 SHA1 2c44fdcf04bef92eb6210d4e6667b994e5643a13 SHA256 8acd5a067ab3dd42cff0ab7cb0d783b2409ccb872590eba32ea55d4929f65f21
DIST GBrowse-2.00.tar.gz 3844690 RMD160 f3856ca620d8adc10172d8dfb644dfbbd25cbf88 SHA1 9d78393ca21d2569a975cfff7588cb7fe62d1082 SHA256 62c96ae1c6c1494ff67fbea1fde0d80d5051705c22167a55db317a0d33b1b8ea
DIST GBrowse-2.26.tar.gz 11937473 RMD160 c2c9d988e3183637b0a97f00e8de1387ad107eab SHA1 3153afc0ef7e6ea8ca6879343028673fdb062501 SHA256 4ac5c0fd87c5ab64b3c52ebb51f51433cb8c6062fd80a56d3de91f24594d3a3f
+DIST GBrowse-2.33.tar.gz 11915644 RMD160 0e2f054b4bcc2748895a856620af7e50f5e15038 SHA1 f31cbe960904b5a2ea4b7eae7a9d78baaf29fce0 SHA256 063114b844776a9500528437fb3dbc60f47a8ac380d910bd6b3148ec7cc0cc4b
DIST Generic-Genome-Browser-1.70.tar.gz 3331393 RMD160 056f72fc17bdbf803fce7e6bdde406566a80c204 SHA1 7a83abaedc4d2b061e1247972036025a713a845f SHA256 e08ef0d1ffff8186bffd30177808ad3dd7991a99abf3ea6350c8d487ba835486
DIST README-gff-files 5309 RMD160 8ba184fa8a6b921f925143cf53de06e3da353023 SHA1 ad2d2b3133c73a05ace4a0107ff1a3a4221bc8f8 SHA256 21f4f026b212698c5aac0e82045670f8397ab50fdfe74b938fcbc71a1d36c82a
DIST Refseq_Genome_TBLASTX.tar.gz 56482234 RMD160 e188d9dfe12bed3fd299be4625f7e658f54bb8c4 SHA1 72ec3de9b9ca0e10c2dd8dcda24f9be74f98cf09 SHA256 7036bdd9aefbf44e384df83f4c1e973c1ab3eac8fe74b37499c4a3f1c55a18af
@@ -17,6 +20,7 @@ DIST yeast.fasta.gz 3801757 RMD160 5545054cf6ffa5381c7992141144107076fdf62e SHA1
DIST yeast.gff.gz 249814 RMD160 64538d18de23d930915938bd00ae4a94a52f3960 SHA1 ec753b1ae409e1377f568531a53be8985a7bfa2e SHA256 20c93e6ba9457896a693d13e8fd8fa00d77acbb55aee9b19a31c2b29c4b7e9b1
EBUILD gbrowse-1.70.ebuild 1670 RMD160 e9bf6980abebabc6ff807ea3c682a3988d0a5f14 SHA1 0413b93216348184e79b3feea36cd68618bed688 SHA256 ecb0b9290e48b82a0d29520d8418593db7baa564bb3731ed7ed808f1b4b5ff3f
EBUILD gbrowse-2.00.ebuild 1932 RMD160 5a0d15a10c2f6f9e4ac1f60ce048efcd2311cdb4 SHA1 186d5a91fbae9b6894091ac376addb84784d6a03 SHA256 21b035ef921900bc893a4de0fe123b6192860265e0594b73723c24b03dd5a23c
-EBUILD gbrowse-2.26.ebuild 5557 RMD160 bb48122780982dd945e025e614e143731f814206 SHA1 f44638ae42791b24f0ae88faec7908ed8234537a SHA256 cf2a7ef7d2e77fca60323d09a68e4ec36df6f4b6a63775794bdb8ad649534cd8
+EBUILD gbrowse-2.26.ebuild 6959 RMD160 a3b966bad08410ea7e619b4cb6497a78836c6094 SHA1 ec109df87df0cfc0d72c35a1c662b2c85f495a10 SHA256 3020b2c5953e7bc02ed1e1e98a8b63bb69feda55101725d019201e748394e5b6
+EBUILD gbrowse-2.33.ebuild 6207 RMD160 20e3780fe421c5b83add7a52d4629a9e169994f0 SHA1 cb5c80a5e6f558f41b71a832e4384501a846271d SHA256 1dfe2823194c4ac30ffd2530d96c04c4a533592fbd1a6931584c0af74422cca3
MISC ChangeLog 1985 RMD160 9695d7522c6165b842087b67938629377f9cc82b SHA1 3edd2e74f9b26289d95ad7609b838edb3ccb9561 SHA256 76c1d0553f09390397af4354dc653677f25d06828e42e57a60b2f35a869222ac
MISC metadata.xml 572 RMD160 bc941571413238acb3d77e61d49b959737ed4f5a SHA1 0c05303509c0e2dd21b37fc93c936809db49e530 SHA256 89b9964a9404a95dbb622a91735348da8e66d34d7dd7e7f144ed8c0159c43e31
diff --git a/sci-biology/gbrowse/files/GBrowseInstall.pm.patch b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.26.patch
index 863930e58..4c17f8d9a 100644
--- a/sci-biology/gbrowse/files/GBrowseInstall.pm.patch
+++ b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.26.patch
@@ -1,5 +1,5 @@
---- GBrowse-2.26/install_util/GBrowseInstall.pm.ori 2010-11-27 12:01:58.000000000 +0100
-+++ GBrowse-2.26/install_util/GBrowseInstall.pm 2010-11-27 12:02:15.000000000 +0100
+--- install_util/GBrowseInstall.pm.ori 2010-11-27 12:01:58.000000000 +0100
++++ install_util/GBrowseInstall.pm 2010-11-27 12:02:15.000000000 +0100
@@ -436,8 +436,8 @@
$self->ownership_warning($databases,$user);
}
@@ -11,8 +11,8 @@
my $base = basename($self->install_path->{htdocs});
---- GBrowse-2.26/install_util/GBrowseInstall.pm.ori 2011-02-14 13:39:46.000000000 +0100
-+++ GBrowse-2.26/install_util/GBrowseInstall.pm 2011-02-14 13:41:50.000000000 +0100
+--- install_util/GBrowseInstall.pm.ori 2011-02-14 13:39:46.000000000 +0100
++++ install_util/GBrowseInstall.pm 2011-02-14 13:41:50.000000000 +0100
@@ -438,25 +438,25 @@
$gid =~ /^(\d+)$/;
$gid = $1;
@@ -51,8 +51,8 @@
# chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d','gbrowse-slave');
# $self->fix_selinux;
---- GBrowse-2.26/install_util/GBrowseInstall.pm.ori 2011-02-14 13:50:41.000000000 +0100
-+++ GBrowse-2.26/install_util/GBrowseInstall.pm 2011-02-14 13:51:46.000000000 +0100
+--- install_util/GBrowseInstall.pm.ori 2011-02-14 13:50:41.000000000 +0100
++++ install_util/GBrowseInstall.pm 2011-02-14 13:51:46.000000000 +0100
@@ -470,11 +470,11 @@
my @inc = map{"-I$_"} split ':',$self->added_to_INC;
system $perl,@inc,$metadb_script;
diff --git a/sci-biology/gbrowse/files/GBrowseInstall.pm-2.33.patch b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.33.patch
new file mode 100644
index 000000000..e91fe1634
--- /dev/null
+++ b/sci-biology/gbrowse/files/GBrowseInstall.pm-2.33.patch
@@ -0,0 +1,32 @@
+--- install_util/GBrowseInstall.pm.ori 2010-11-27 12:01:58.000000000 +0100
++++ install_util/GBrowseInstall.pm 2010-11-27 12:02:15.000000000 +0100
+@@ -436,8 +436,8 @@
+ $self->ownership_warning($databases,$user);
+ }
+
+- chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d','gbrowse-slave');
+- $self->fix_selinux;
++ # chmod 0755,File::Spec->catfile($self->install_path->{'etc'},'init.d','gbrowse-slave');
++ # $self->fix_selinux;
+
+ my $base = basename($self->install_path->{htdocs});
+
+--- install_util/GBrowseInstall.pm.ori 2011-02-14 13:50:41.000000000 +0100
++++ install_util/GBrowseInstall.pm 2011-02-14 13:51:46.000000000 +0100
+@@ -470,11 +470,11 @@
+ my @inc = map{"-I$_"} split ':',$self->added_to_INC;
+ system $perl,@inc,$metadb_script;
+
+- if (Module::Build->y_n(
+- "It is recommended that you restart Apache. Shall I try this for you?",'y'
+- )) {
+- system "sudo /etc/init.d/apache2 restart";
+- }
++# if (Module::Build->y_n(
++# "It is recommended that you restart Apache. Shall I try this for you?",'y'
++# )) {
++# system "sudo /etc/init.d/apache2 restart";
++# }
+
+ print STDERR "\n***INSTALLATION COMPLETE***\n";
+ print STDERR "Load http://localhost/$base for demo and documentation.\n";
diff --git a/sci-biology/gbrowse/files/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm-2.26.patch b/sci-biology/gbrowse/files/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm-2.26.patch
new file mode 100644
index 000000000..0dde70406
--- /dev/null
+++ b/sci-biology/gbrowse/files/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm-2.26.patch
@@ -0,0 +1,21 @@
+--- install_util/GBrowseInstall.pm.ori 2011-05-11 04:10:08.000000000 +0200
++++ install_util/GBrowseInstall.pm 2011-05-11 04:10:26.000000000 +0200
+@@ -463,12 +463,12 @@
+
+ my $base = basename($self->install_path->{htdocs});
+
+- # Configure the databases, if needed.
+- print STDERR "Updating user account database...\n";
+- my $metadb_script = File::Spec->catfile("bin", "gbrowse_metadb_config.pl");
+- my $perl = $self->perl;
+- my @inc = map{"-I$_"} split ':',$self->added_to_INC;
+- system $perl,@inc,$metadb_script;
++# # Configure the databases, if needed.
++# print STDERR "Updating user account database...\n";
++# my $metadb_script = File::Spec->catfile("bin", "gbrowse_metadb_config.pl");
++# my $perl = $self->perl;
++# my @inc = map{"-I$_"} split ':',$self->added_to_INC;
++# system $perl,@inc,$metadb_script;
+
+ # if (Module::Build->y_n(
+ # "It is recommended that you restart Apache. Shall I try this for you?",'y'
diff --git a/sci-biology/gbrowse/gbrowse-2.26.ebuild b/sci-biology/gbrowse/gbrowse-2.26.ebuild
index b525bcca3..89000cfd4 100644
--- a/sci-biology/gbrowse/gbrowse-2.26.ebuild
+++ b/sci-biology/gbrowse/gbrowse-2.26.ebuild
@@ -50,7 +50,6 @@ DEPEND=">=dev-lang/perl-5.8.8
# * Bio::DB::Sam is not installed
# * DBD::Pg is not installed
-
RDEPEND="${DEPEND}
>=www-servers/apache-2.0.47
www-apache/mod_fastcgi
@@ -81,12 +80,17 @@ RDEPEND="${DEPEND}
src_prepare() {
sed -i 's/return unless -t STDIN/return/' install_util/GBrowseInstall.pm || die
sed -i 's/process_/bp_process_/g' INSTALL || die
- epatch "${FILESDIR}"/GBrowseInstall.pm.patch || die "Failed to patch"
+ epatch "${FILESDIR}"/GBrowseInstall.pm-"${PV}".patch || die "Failed to patch"
+ epatch "${FILESDIR}"/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl"${PV}".pm.patch || die "Failed to patch"
}
src_configure() {
# GBROWSE_ROOT is the root path in SRC_URI to be prepended
# /usr/share/webapps/gbrowse/2.03/htdocs/etc/gbrowse/GBrowse.conf
+
+ # if we use CONF="${D}${MY_HTDOCSDIR}"/etc/gbrowse the the install process
+ # will not find currently installed config files and therefore place *.conf
+ # files into "{$S}"/blib/conf/*.conf instead of creating "{$S}"/blib/conf/*.conf.new
webapp_src_preinst
perl Makefile.PL \
HTDOCS="${MY_HTDOCSDIR}" \
@@ -104,6 +108,12 @@ src_configure() {
DO_XS=1 \
NONROOT=1 \
|| die
+
+ #sed -i 's#DBI:SQLite:#DBI:SQLite:'${D}'#' "${S}"/install_util/GBrowseInstall.pm || die
+ #sed -i 's#DBI:SQLite:#DBI:SQLite:'${D}'#' "${S}"/conf/GBrowse.conf || die
+ #sed -i 's#/var/www/gbrowse2/databases/#'${D}'/var/www/gbrowse2/databases/#' "${S}"/_build/build_params
+ #sed -i 's#/var/www/gbrowse2/databases/#'${D}'/var/www/gbrowse2/databases/#' "${S}"/_build/config_data
+ #sed -i 's#/var/www/gbrowse2/databases/#'${D}'/var/www/gbrowse2/databases/#' "${S}"/_build/runtime_params
}
src_install() {
@@ -111,25 +121,35 @@ src_install() {
perl-module_src_install
# TODO: write our own readme
- webapp_postinst_txt en "${S}"/INSTALL
- webapp_src_install || die "Failed running webapp_src_install"
+ webapp_src_preinst
+ webapp_postinst_txt en "${S}"/INSTALL || die
+ webapp_src_install
# should create a /etc/init.d/ startup script based on this
# /var/tmp/portage/sci-biology/gbrowse-2.03/work/GBrowse-2.03/etc/init.d/gbrowse-slave
+ # pre-create the directory so we can force its owner later on
+ mkdir -p "${D}"/var/www/gbrowse2/databases || die
chown -R apache.apache "${D}"/var/www/gbrowse2/databases || die
-
mkdir -p "${D}"/var/www/localhost/htdocs/gbrowse || die
+
ln -s "${D}"/var/tmp/gbrowse2/images "${D}"/var/www/localhost/htdocs/gbrowse/i || die
einfo "Probably you want to install a cron job to remove the generated temporary images:"
einfo "find /var/tmp/gbrowse2/images -type f -atime +20 -print -exec rm {}"
einfo "Make sure you compiled apache with +cgi and copy ${FILESDIR}/gbrowse.conf.vhosts.d to /etc/apache2/vhosts.d/"
+
+ sed -i "s#"${D}"##g" "${S}"/install_util/GBrowseInstall.pm || die
+ sed -i "s#"${D}"##" "${S}"/blib/conf/GBrowse.conf*
+ sed -i 's#DBI:SQLite:'${D}'/var/www/gbrowse2/databases/#DBI:SQLite:/var/www/gbrowse2/databases/#' "${S}"/install_util/GBrowseInstall.pm || die
}
pkg_postinst() {
webapp_pkg_postinst || die "webapp_pkg_postinst failed"
+
+ einfo "Please run gbrowse_metadb_config.pl to upate SQlite flatfiles or the live database"
+ einfo "This was disabled by "${FILESDIR}"/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm.patch"
}
src_test() {
diff --git a/sci-biology/gbrowse/gbrowse-2.33.ebuild b/sci-biology/gbrowse/gbrowse-2.33.ebuild
new file mode 100644
index 000000000..e2bcfc3be
--- /dev/null
+++ b/sci-biology/gbrowse/gbrowse-2.33.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+EAPI="2"
+
+inherit perl-module webapp
+
+MY_P="GBrowse-${PV}"
+
+DESCRIPTION="The generic genome browser provides a display of genomic annotations on interactive web pages"
+HOMEPAGE="http://gmod.org"
+# mirror://sourceforge/gmod/${MY_P}.tar.gz
+# http://search.cpan.org/CPAN/authors/id/L/LD/LDS/GBrowse-2.33.tar.gz
+SRC_URI="http://search.cpan.org/CPAN/authors/id/L/LD/LDS/${MY_P}.tar.gz
+ test? ( http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/saccharomyces_cerevisiae.gff.bz2
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/Refseq_Genome_TBLASTX.tar.gz
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/README-gff-files
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/human.gff.tar.gz
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/yeast.fasta.gz
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/yeast.gff.gz
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/worm.fasta.gz
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/worm.gff.gz
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/fly.fasta.gz
+ http://sourceforge.net/projects/gmod/files/Generic%20Genome%20Browser/Sample%20Data%20Files/fly.gff.gz )"
+
+LICENSE="Artistic"
+# webapp ebuilds do not set SLOT
+KEYWORDS="~x86 ~amd64"
+IUSE="-minimal svg test" # lwp moby scf
+
+S="${WORKDIR}/${MY_P}"
+
+# TODO: dev-perl/MOBY, dev-perl/Bio-SCF, dev-perl/Safe-World (not compatible w/perl-5.10)
+# TODO: make sure www-servers/apache +cgi
+DEPEND="
+ >=perl-core/Module-Build-0.380.0
+ >=dev-lang/perl-5.8.8
+ dev-perl/Capture-Tiny
+ >=sci-biology/bioperl-1.6
+ >=dev-perl/GD-2.07
+ dev-perl/IO-String
+ virtual/perl-Digest-MD5
+ >=dev-perl/CGI-Session-4.03
+ dev-perl/Statistics-Descriptive
+ >=dev-perl/Bio-Graphics-1.97
+ >=dev-perl/JSON-2.510.0
+ dev-perl/libwww-perl
+ svg? ( dev-perl/GD-SVG )"
+
+# TODO: based on the following message in apache/error_log the list of deps should be longer
+# GBROWSE NOTICE: To enable PDF generation, please enter the directory "/home/httpd" and run the commands: "sudo mkdir .inkscape .gnome2" and "sudo chown apache .inkscape .gnome2". To turn off this message add "generate pdf = 0" to the [GENERAL] section of your GBrowse.conf configuration file., referer: http://127.0.0.1/gbrowse/cgi-bin/gbrowse_details/yeast?ref=chrII;start=90739;end=92028;name=YBL069W;class=Sequence;feature_id=881;db_id=annotations%3Adatabase
+
+# * Bio::DB::BigFile is not installed
+# * Bio::DB::Sam is not installed
+# * DBD::Pg is not installed
+
+
+RDEPEND="${DEPEND}
+ >=www-servers/apache-2.0.47
+ www-apache/mod_fastcgi
+ dev-perl/DBI
+ || ( dev-perl/DBD-Pg dev-perl/DBD-mysql )
+ !minimal? (
+ dev-perl/File-NFSLock
+ dev-perl/FCGI
+ perl-core/Math-BigInt
+ perl-core/Math-BigInt-FastCalc
+ dev-perl/Math-BigInt-GMP
+ dev-perl/Digest-SHA1
+ dev-perl/Crypt-SSLeay
+ dev-perl/Net-SMTP-SSL
+ dev-perl/Net-OpenID-Consumer
+ virtual/perl-DB_File
+ dev-perl/DB_File-Lock
+ dev-perl/GD-SVG
+ dev-perl/Text-Shellwords
+ dev-perl/XML-Twig
+ dev-perl/XML-DOM
+ dev-perl/XML-Writer
+ dev-perl/XML-Parser
+ dev-perl/Bio-Das
+ dev-perl/Text-Shellwords
+ )"
+
+src_prepare() {
+ sed -i 's/return unless -t STDIN/return/' install_util/GBrowseInstall.pm || die
+ sed -i 's/process_/bp_process_/g' INSTALL || die
+ epatch "${FILESDIR}"/GBrowseInstall.pm-"${PV}".patch || die "Failed to patch"
+}
+
+src_configure() {
+ # GBROWSE_ROOT is the root path in SRC_URI to be prepended
+ # /usr/share/webapps/gbrowse/2.03/htdocs/etc/gbrowse/GBrowse.conf
+ webapp_src_preinst
+ perl Makefile.PL \
+ HTDOCS="${MY_HTDOCSDIR}" \
+ CGIBIN="${MY_HTDOCSDIR}"/cgi-bin \
+ CONF="${MY_HTDOCSDIR}"/etc/gbrowse \
+ PACKAGE_DIR="${D}" \
+ INSTALLDIRS=vendor \
+ GBROWSE_ROOT="gbrowse" \
+ DESTDIR="${D}" \
+ DATABASES="/var/www/gbrowse2/databases/" \
+ TMP="/var/tmp/gbrowse2" \
+ INSTALLETC="n" \
+ INSTALLCONF="n" \
+ WWWUSER="apache" \
+ DO_XS=1 \
+ NONROOT=1 \
+ || die
+}
+
+src_install() {
+ mydoc="Changes README TODO INSTALL"
+ perl-module_src_install
+
+ # TODO: write our own readme
+ webapp_postinst_txt en "${S}"/INSTALL
+ webapp_src_install || die "Failed running webapp_src_install"
+
+ # should create a /etc/init.d/ startup script based on this
+ # /var/tmp/portage/sci-biology/gbrowse-2.03/work/GBrowse-2.03/etc/init.d/gbrowse-slave
+
+ chown -R apache.apache "${D}"/var/www/gbrowse2/databases || die
+
+ mkdir -p "${D}"/var/www/localhost/htdocs/gbrowse || die
+ ln -s "${D}"/var/tmp/gbrowse2/images "${D}"/var/www/localhost/htdocs/gbrowse/i || die
+
+ einfo "Probably you want to install a cron job to remove the generated temporary images:"
+ einfo "find /var/tmp/gbrowse2/images -type f -atime +20 -print -exec rm {}"
+
+ einfo "Make sure you compiled apache with +cgi and copy ${FILESDIR}/gbrowse.conf.vhosts.d to /etc/apache2/vhosts.d/"
+
+ sed -i "s#"${D}"##g" "${S}"/install_util/GBrowseInstall.pm || die
+ sed -i "s#"${D}"##" "${S}"/blib/conf/GBrowse.conf*
+ sed -i 's#DBI:SQLite:'${D}'/var/www/gbrowse2/databases/#DBI:SQLite:/var/www/gbrowse2/databases/#' "${S}"/install_util/GBrowseInstall.pm || die
+}
+
+pkg_postinst() {
+ webapp_pkg_postinst || die "webapp_pkg_postinst failed"
+
+ einfo "Please run gbrowse_metadb_config.pl to upate SQlite flatfiles or the live database"
+ einfo "This was disabled by "${FILESDIR}"/GBrowseInstall.pm-disable-gbrowse_metadb_config.pl.pm.patch"
+}
+
+src_test() {
+ mysql -uroot -p password -e 'create database yeast'
+ mysql -uroot -p password -e 'grant all privileges on yeast.* to gbrowse@localhost'
+ mysql -uroot -p password -e 'grant file on *.* to gbrowse@localhost'
+ mysql -uroot -p password -e 'grant select on yeast.* to nobody@localhost'
+
+ cd /usr/portage/distfiles || die
+ gzip -d yeast.fasta.gz || die
+ gzip -d yeast.gff.gz || die
+ #gzip -d fly.fasta.gz
+ #gzip -d fly.gff.gz
+ bp_bulk_load_gff.pl -d yeast -fasta yeast.fasta yeast.gff || die
+}