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
|
#!/usr/bin/make -f
PACKAGE:=python-xmlrpc
INSTDIR:=debian/inst.$(PACKAGE)
DOCDIR:=$(INSTDIR)/usr/share/doc/$(PACKAGE)
PYTHONBIN:=python2.1
build:
test -e debian/control
$(PYTHONBIN) setup.py build
clean:
test -e debian/control
test root = "`whoami`" || (echo need root priviledges; exit 1)
-$(PYTHONBIN) setup.py clean --all
rm -f debian/files debian/substvars
rm -rf $(INSTDIR)
install:
test -e debian/control
test root = "`whoami`" || (echo need root priviledges; exit 1)
rm -f debian/substvars
rm -rf $(INSTDIR)
$(PYTHONBIN) setup.py install --prefix=$(INSTDIR)/usr
chmod -R go-w $(INSTDIR)
binary-indep: build install
binary-arch: build install
test -e debian/control
test root = "`whoami`" || (echo need root priviledges; exit 1)
install -d -m0755 $(DOCDIR)/examples
cd doc && for a in `find . -type f`; do \
install -D -m0644 "$$a" "$(CURDIR)/$(DOCDIR)/examples/$$a"; \
done
install -m0644 README $(DOCDIR)/README
install -m0644 debian/copyright $(DOCDIR)/copyright
install -m0644 CHANGELOG $(DOCDIR)/changelog
install -m0644 debian/changelog $(DOCDIR)/changelog.Debian
gzip -9f $(DOCDIR)/README \
$(DOCDIR)/changelog $(DOCDIR)/changelog.Debian
find $(INSTDIR)/usr/lib -name '*.so' -print0 \
| xargs -0 --no-run-if-empty \
strip --remove-section=.comment \
--remove-section=.note --strip-unneeded
install -d -m0755 $(INSTDIR)/DEBIAN
install -m0755 debian/postinst debian/prerm \
$(INSTDIR)/DEBIAN
dpkg-shlibdeps `find $(INSTDIR)/usr/lib -name '*.so'`
dpkg-gencontrol -isp -P$(INSTDIR)
dpkg --build $(INSTDIR) ..
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
|