Makefile 923 B

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