#!/usr/bin/make -f # debian/rules file for the Debian GNU/Linux nwsclient package # Copyright 2004 - 2011 by Dirk Eddelbuettel package := python-nwsclient debbase := $(CURDIR)/debian debtmp := $(debbase)/$(package) pyvers = $(shell pyversions -r debian/control) compilerflags = -O2 -Wall include /usr/share/python/python.mk # Uncomment this to turn on verbose mode. # export DH_VERBOSE=1 get-orig-source: upstream upstream: links http://prdownloads.sourceforge.net/nws-py configure: configure-stamp configure-stamp: dh_testdir touch configure-stamp build: configure-stamp build-stamp build-stamp: dh_testdir for python in $(pyvers); \ do CFLAGS="$(compilerflags)" $$python setup.py build ; \ done touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp [ ! -f Makefile ] || $(MAKE) clean for python in $(pyvers); \ do $$python setup.py clean; \ done -rm -f `find . -name "*~"` -rm -rf debian/tmp debian/files* core debian/substvars -rm -f config.cache config.status -rm -rf build/* dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs for python in $(pyvers); \ do $$python setup.py install \ --root=debian/$(package) \ --prefix=/usr $(py_setup_install_args) \ --install-layout=deb; \ done rm -vf debian/$(package)/usr/bin/*.py rm -rf debian/$(package)/usr/share/doc/nws-python/ # Build architecture-independent files here. binary-indep: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs README README.Sleigh doc/* dh_installexamples examples/* # dh_installmenu # dh_installdebconf # dh_installlogrotate # dh_installemacsen # dh_installcatalogs # dh_installpam # dh_installmime # dh_installinit # dh_installcron # dh_installinfo # dh_undocumented dh_installman dh_link dh_compress dh_fixperms dh_perl # dh_pycentral # dh_pysupport dh_python2 dh_installdeb dh_gencontrol dh_md5sums dh_builddeb # Build architecture-dependent files here. binary-arch: build install # We have nothing to do by default. binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install