1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
#!/usr/bin/make -f
GBROWSE_BUILD_OPTIONS = --conf=/etc/gbrowse --htdocs=/usr/share/gbrowse/htdocs --tmp=/var/cache/gbrowse --databases=/var/lib/gbrowse/databases --cgibin=/usr/lib/cgi-bin/gbrowse --www-user=www-data --registration_done=1 --persistent=/var/lib/gbrowse
ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')
SKIP_TESTS = $(shell cat debian/tests/pkg-perl/smoke-skip)
TEST_FILES = $(filter-out $(SKIP_TESTS), $(wildcard t/*.t))
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@ --with apache2
override_dh_auto_configure:
dh_auto_configure -- $(GBROWSE_BUILD_OPTIONS)
override_dh_installdirs:
# svn(-buildpackage) seems to ignore the x bit
chmod +x debian/gbrowse-calign.dirs
dh_installdirs
override_dh_auto_test:
dh_auto_test -- TEST_FILES="$(TEST_FILES)"
override_dh_auto_install:
./Build --install_base=debian/gbrowse debianinstall
#./Build apache_conf > debian/gbrowse/etc/gbrowse/gbrowse_apache2.conf
perl Build.PL $(GBROWSE_BUILD_OPTIONS) --installetc=y
./Build --install_base=debian/gbrowse install_slave
mv debian/gbrowse/lib/perl5/* debian/gbrowse/usr/share/perl5
# Remove arch dependant data
mkdir -p debian/gbrowse-calign$(ARCHLIB)/auto/Bio/Graphics/Browser2/CAlign/
mkdir -p debian/gbrowse-calign$(ARCHLIB)/Bio/Graphics/Browser2/
mv debian/gbrowse/usr/share/perl5/auto/Bio/Graphics/Browser2/CAlign/* debian/gbrowse-calign$(ARCHLIB)/auto/Bio/Graphics/Browser2/CAlign/
mv debian/gbrowse/usr/share/perl5/Bio/Graphics/Browser2/CAlign.pm debian/gbrowse-calign$(ARCHLIB)/Bio/Graphics/Browser2/CAlign.pm
rm -rf debian/gbrowse/lib
rm -f debian/gbrowse/usr/share/doc/gbrowse/INSTALL
rm -f debian/gbrowse/usr/share/perl5/auto/GBrowse/.packlist
rm -f debian/gbrowse/usr/share/gbrowse/htdocs/js/prototype.js
rm -f debian/gbrowse/usr/share/gbrowse/htdocs/js/scriptaculous.js
chmod 644 debian/gbrowse/etc/gbrowse/MobyServices/text_xml_renderer.pm
chmod 644 debian/gbrowse/etc/gbrowse/synteny/oryza.synconf.disabled.conf
#Remove database (kept as separate package)
rm -rf debian/gbrowse/var/lib/gbrowse/databases/*
#Rename pl scripts in bin
file-rename 's/\.pl//' debian/gbrowse/bin/*.pl
mv debian/gbrowse/bin debian/gbrowse/usr/bin
# Activate configuration files.
find $(CURDIR)/debian/gbrowse/etc -name '*.new' | xargs file-rename 's/.new//'
rm -rf $(CURDIR)/debian/gbrowse/usr/share/perl5/auto
# Update conf files
sed -i 's/gbrowse2/gbrowse/g' $(CURDIR)/debian/gbrowse/etc/gbrowse/yeast*.conf
sed -i 's/gbrowse2/gbrowse/g' $(CURDIR)/debian/gbrowse/etc/gbrowse/slave*.conf
# move OpenID constumer secret to /etc/gbrowse to make it system admin configurable
mv $(CURDIR)/debian/gbrowse/usr/share/perl5/GBrowse/ConfigData.pm $(CURDIR)/debian/gbrowse/etc/gbrowse/ConfigData.pm
override_dh_installman:
#Rename due to perl extension seen as polish
file-rename 's/\.pl\.1p/\.1p/' debian/gbrowse/man/man1/*.pl.1p
mkdir -p debian/gbrowse-calign/man/man3/
mv debian/gbrowse/man/man3/Bio::Graphics::Browser2::CAlign.3pm debian/gbrowse-calign/man/man3/Bio::Graphics::Browser2::CAlign.3pm
dh_installman
rm -rf debian/gbrowse/man
rm -rf debian/gbrowse-calign/man
|