Makefile 864 B

123456789101112131415161718192021222324252627282930313233
  1. PYTHON=`which python`
  2. DESTDIR=/
  3. BUILDIR=$(CURDIR)/debian/ufonet
  4. PROJECT=ufonet
  5. VERSION=1.8
  6. all:
  7. @echo "make source - Create source package"
  8. @echo "make install - Install on local system"
  9. @echo "make buildrpm - Generate a rpm package"
  10. @echo "make builddeb - Generate a deb package"
  11. @echo "make clean - Get rid of scratch and byte files"
  12. source:
  13. $(PYTHON) setup.py sdist $(COMPILE)
  14. install:
  15. $(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE)
  16. buildrpm:
  17. $(PYTHON) setup.py bdist_rpm --post-install=rpm/postinstall --pre-uninstall=rpm/preuninstall
  18. builddeb:
  19. $(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../
  20. rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
  21. dpkg-buildpackage -i -I -rfakeroot
  22. clean:
  23. $(PYTHON) setup.py clean
  24. $(MAKE) -f $(CURDIR)/debian/rules clean
  25. rm -rf build/ MANIFEST
  26. find . -name '*.pyc' -delete