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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
VERSION=0.5.0
DEBVERSION=0.5.0-1
ZIPFILE = rest2web-$(VERSION).zip
#r2w.1: DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
#r2w.1: rest2web.dbk
# xsltproc --nonet $(DB2MAN) $<
configure: configure-stamp
configure-stamp:
if [ -f __dist__ ]; then \
python make_dist.py nopause; \
ln -s rest2web-dist dist; \
else \
ln -s . dist; \
fi
dh_testdir
touch $@
build: build-stamp
build-stamp: configure-stamp build-docs
dh_testdir
touch $@
build-docs: build-docs-stamp
build-docs-stamp:
cd dist && LANGUAGE=C PYTHONPATH=$(CURDIR)/rest2web:$(CURDIR)/pythonutils \
python ./r2w.py --nopause
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
rm -f build-docs-stamp
dh_clean
rm -rf dist rest2web-dist
rm -rf log.txt
find -name \*.pyc -exec rm {} \;
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
install -m644 debian/rest2web.lintian-overrides \
debian/rest2web/usr/share/lintian/overrides/rest2web
tar -cf- --exclude=.svn --exclude=\*.pyc -C dist rest2web \
| tar -xf- -C debian/rest2web/usr/lib/python2.7/dist-packages/
install -m755 dist/r2w.py debian/rest2web/usr/bin/r2w
tar -cf- --exclude=.svn -C dist/docs . | tar -xf- -C debian/rest2web-doc/usr/share/doc/rest2web/html
tar -cf- --exclude=.svn -C dist/docs_html . | tar -xf- -C debian/rest2web-doc/usr/share/doc/rest2web/html
rm -f debian/rest2web-doc/usr/share/doc/rest2web/html/test_site/section6/__prune__
rm -f debian/rest2web-doc/usr/share/doc/rest2web/html/reference/changelog.txt
binary-indep: build install
dh_testdir
dh_testroot
dh_installchangelogs dist/docs/reference/changelog.txt
dh_installdocs
dh_installman r2w.man
dh_install
dh_link
dh_python2
dh_compress -p rest2web
dh_compress -p rest2web-doc -X.txt -X.shtml -X.html
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary-arch: build install
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
|