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
|
#!/usr/bin/make -f
# Copyright 2009, Noah Slater <nslater@tumbolia.org>
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice and this
# notice are preserved.
include /usr/share/cdbs/1/rules/buildcore.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk
DEB_ORIG_URI = http://feedvalidator.googlecode.com/svn/trunk/feedvalidator/src
DEB_ORIG_DIRECTORY = $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION)
DEB_ORIG_FILENAME = $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz
DEB_REPOS_VERSION = $(shell echo $(DEB_UPSTREAM_VERSION) | sed -r "s/.*~svn//")
# @@ workaround for #486848
binary-arch binary-indep: build
clean::
rm -rf feedvalidator.1
cleanbuilddir::
sed -i -e "s/$(DEB_UPSTREAM_VERSION)/@version@/" demo.py
post-patches::
sed -i -e "s/@version@/$(DEB_UPSTREAM_VERSION)/" demo.py
common-install-prehook-impl::
cp -R feedvalidator \
debian/python-feedvalidator/usr/share/python-support/python-feedvalidator
PYTHONPATH=debian/python-feedvalidator/usr/bin/python-feedvalidator \
help2man -N -n "a tool for validating syndication feeds" ./demo.py > feedvalidator.1
cp demo.py debian/python-feedvalidator/usr/bin/feedvalidator
binary-install/python-feedvalidator::
dh_pysupport -ppython-feedvalidator
# @@ only works from source directory, see #494141
.PHONY: get-orig-source
get-orig-source:
svn export -r $(DEB_REPOS_VERSION) $(DEB_ORIG_URI) $(DEB_ORIG_DIRECTORY)
tar -czf $(DEB_ORIG_FILENAME) $(DEB_ORIG_DIRECTORY)
rm -fr $(DEB_ORIG_DIRECTORY)
|