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
|
#! /usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
package=python-wpy
i=./debian/tmp
build:
dh_testdir
touch build
clean:
dh_testdir
-rm -f build
-rm -f `find . -name "*~" -o -name '*.py[co]'`
-rm -rf $(i) debian/files* core debian/substvars
instdirs = \
DEBIAN \
usr/lib/python1.5/site-packages \
usr/doc/$(package)/examples \
usr/doc/$(package)/doc \
usr/share/doc-base
binary-indep: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs $(instdirs)
dh_installdocs
dh_installchangelogs
install -m 644 readme.txt $(i)/usr/doc/$(package)/README
install -m 644 *.py *.dfl $(i)/usr/lib/python1.5/site-packages/
install -m 644 demos/* $(i)/usr/doc/$(package)/examples/
-rm -f $(i)/usr/doc/$(package)/examples/demo_ns*
-find $(i) -name '*.py[co]' | xargs rm -f
cp -p docs/* $(i)/usr/doc/$(package)/doc/
install -m 644 debian/doc-base $(i)/usr/share/doc-base/$(package)
dh_fixperms
dh_compress
-find $(i)/usr/doc/$(package)/examples -name '*.py.gz' | xargs gunzip
-find $(i)/usr/doc/$(package)/doc -name '*.txt.gz' | xargs gunzip
-rm $(i)/usr/doc/$(package)/doc/{netscape.txt,plugin.htm}
chmod a+x $(i)/usr/doc/$(package)/examples/demo*.py
for f in `find $(i)/usr/doc/$(package)/examples -type f`; do \
sed -e 's,^#! /usr/local/bin/python,#! /usr/bin/env python,' \
$$f > $$f.fixed; \
if cmp -s $$f $$f.fixed; then \
rm $$f.fixed; \
chmod a+r,u+w $$f; \
else \
[ -x $$f ] && chmod a+rx,u+w $$f.fixed; \
mv -f $$f.fixed $$f; \
echo fixed examples/`basename $$f`; \
fi; \
done
dh_installdeb
dh_gencontrol
dh_makeshlibs
dh_md5sums
dh_builddeb
binary-arch: build
dh_testdir
# There are no architecture-dependent files to be uploaded
# generated by this package. If there were any they would be
# made here.
# Below here is fairly generic really
binary: binary-indep binary-arch
.PHONY: binary binary-arch binary-indep clean
|