debian swirl logo

Back to the packages list python-feedvalidator

#!/usr/bin/make -f

# Copyright 2009, Noah Slater 

# 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)

Builds:

python-feedvalidator
library and tool for validating syndication feeds