[med-svn] r12980 - trunk/packages/meme/trunk/debian
Andreas Tille
tille at alioth.debian.org
Mon Feb 11 09:33:07 UTC 2013
Author: tille
Date: 2013-02-11 09:33:06 +0000 (Mon, 11 Feb 2013)
New Revision: 12980
Modified:
trunk/packages/meme/trunk/debian/rules
Log:
Mass changes basically for two purposes: building twice in a row; manpages using help2man
Modified: trunk/packages/meme/trunk/debian/rules
===================================================================
--- trunk/packages/meme/trunk/debian/rules 2013-02-10 20:47:19 UTC (rev 12979)
+++ trunk/packages/meme/trunk/debian/rules 2013-02-11 09:33:06 UTC (rev 12980)
@@ -4,16 +4,42 @@
# Thorsten Alteholz <debian at alteholz.de>
# GPL
-DBPATH=/var/lib/meme
-LOGPATH=/var/log/meme
+pkg := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
+version=$(shell dpkg-parsechangelog -ldebian/changelog | grep Version: | cut -f2 -d' ' | cut -f1 -d- )
+mandir=$(CURDIR)/debian/$(pkg)/usr/share/man/man1/
+DBPATH=/var/lib/$(pkg)
+LOGPATH=/var/log/$(pkg)
+# Only needed for fixing brocken upstream build mechanism
+PYTHON=/usr/bin/python
+
%:
dh $@ --with autoreconf,python2
+override_dh_autoreconf:
+ # save original configuration files to enable building twice in a row
+ mkdir -p orig
+ cp -a config orig/
+ cp -a aclocal.m4 INSTALL configure orig/
+ mkdir -p orig/website/html
+ cp -a website/html/metameme-help-format.html orig/website/html
+ cp -a website/html/metameme-intro.html orig/website/html
+ cp -a website/html/cisml.pattern.html.xsl orig/website/html
+ mkdir -p orig/src
+ cp -a src/projrel.h orig/src
+ cp -a src/dir.h orig/src
+ #mkdir -p orig/etc
+ #cp -a etc/logging.conf orig/etc
+ for origfile in `find . -type f -name Makefile.in` ; do \
+ mkdir -p orig/`dirname $$origfile` ; \
+ cp -a $${origfile} orig/`dirname $$origfile` ; \
+ done ;
+ dh_autoreconf
+
override_dh_auto_configure:
./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \
--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
- --sysconfdir=/etc/meme \
+ --sysconfdir=/etc/$(pkg) \
--with-logs=$(LOGPATH) \
--with-db=$(DBPATH) \
--with-python=/usr/bin/python
@@ -24,29 +50,50 @@
override_dh_install:
#Sort out some funny locations used by upstream
mv debian/tmp/usr/doc/examples debian/tmp || true
- mkdir -p debian/tmp/usr/share/doc/meme ; mv debian/tmp/usr/doc/* debian/tmp/usr/share/doc/meme
- mv debian/tmp/etc/meme/meme.doc debian/tmp/usr/share/doc/meme
+ mkdir -p debian/tmp/usr/share/doc/$(pkg) ; mv debian/tmp/usr/doc/* debian/tmp/usr/share/doc/$(pkg)
+ mv debian/tmp/etc/$(pkg)/meme.doc debian/tmp/usr/share/doc/$(pkg)
find ./* -print|grep STRGGTCAN.meme|xargs chmod 644
- find ./* -print
mkdir -p debian/tmp/usr/share/perl5/Meme
cp website/scripts/*.pm debian/tmp/usr/share/perl5/Meme
cp scripts/*.pm debian/tmp/usr/share/perl5/Meme
- mkdir -p debian/tmp-manpages
+ # fix insufficient replacement procedure of @WHICHPYTHON@
+ set -x ; \
+ for pyfile in sequence.py hypergeometric.py ; do \
+ sed -i -e 's%@WHICHPYTHON@%$(PYTHON)%' debian/tmp/usr/bin/$${pyfile} ; \
+ done
+ dh_install -v --sourcedir=debian/tmp
+
+override_dh_installman:
+ mkdir -p $(mandir)
for var in `ls debian/tmp/usr/bin/*` ; do \
- if head -n 1 $${var} | grep -q '^#!/usr/bin/perl' ; then pod2man $${var} > debian/tmp-manpages/`basename $${var}`.1 ; fi ; \
+ if head -n 1 $${var} | grep -q '^#!/usr/bin/perl' ; then pod2man $${var} > $(mandir)/`basename $${var}`.1 ; fi ; \
done
+ help2man --no-info --help-option="''" --no-discard-stderr \
+ --name='Average Motif Affinity' --version-string="$(version)" \
+ $(CURDIR)/debian/$(pkg)/usr/bin/ama > $(mandir)/ama.1
+ help2man --no-info --help-option="''" --no-discard-stderr \
+ --name='Analysis of Motif Enrichment' --version-string="$(version)" \
+ $(CURDIR)/debian/$(pkg)/usr/bin/ame > $(mandir)/ame.1
+ help2man --no-info --help-option="''" --no-discard-stderr \
+ --name='Build a linear hidden Markov model (HMM) from motif' --version-string="$(version)" \
+ $(CURDIR)/debian/$(pkg)/usr/bin/beadstring > $(mandir)/beadstring.1
# Remove those manpages with zero bytes where pod2man failed in doing a proper job
- find debian/tmp-manpages -size 0 -delete
- dh_install -v --sourcedir=debian/tmp
- find ./* -print
+ find $(mandir) -size 0 -delete
+ dh_installman
-override_dh_auto_clean:
- dh_auto_clean
+override_dh_clean:
+ dh_clean
rm -rf debian/tmp-manpages
- #rm -rf tests/*/*.sed
- #rm -rf tests/results
- #cd etc; rm -f fasta_db.csv fasta_db.index gomo_db.csv logo.js.xsl meme.css.xsl motif_db.csv motif_db.index tomtom_config.xml
- #rm -f scripts/*.pyc
+ if [ -d orig ] ; then \
+ mv orig/config/* config ; \
+ for origfile in `find orig -type f` ; do \
+ mv $${origfile} `echo $$origfile | sed 's?orig/??'` ; \
+ done ; \
+ fi
+ rm -rf orig
+ rm -f etc/motif_db.csv etc/gomo_db.csv etc/fasta_db.csv etc/logging.conf
+ # Remove Makefiles of libxml2 and libxslt
+ find src -name Makefile -delete
#XXX Disable testing temporarily to save time
override_dh_auto_test:
More information about the debian-med-commit
mailing list