first very rough cleanup
[sfa.git] / Makefile.debian
1 PYTHON=python
2 DESTDIR=/
3 PROJECT=sfa
4 VERSION=0.2.0
5
6 all: builddeb 
7
8 source:
9         $(PYTHON) setup.py sdist $(COMPILE)
10
11 install:
12         $(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE)
13
14 #buildrpm:
15 #       $(PYTHON) setup.py bdist_rpm --post-install=rpm/postinstall --pre-uninstall=rpm/preuninstall
16
17 builddeb:
18         rm -f sfaadmin sfascan sfi  
19         # build the source package in the parent directory
20         # then rename it to project_version.orig.tar.gz
21         $(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../ --prune
22         rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
23         # build the package
24         dpkg-buildpackage -i -I -rfakeroot
25
26 clean:
27         $(PYTHON) setup.py clean
28         $(MAKE) -f $(CURDIR)/debian/rules clean
29         rm -rf build/ MANIFEST
30         find . -name '*.pyc' -delete
31
32 help:
33         @echo "make source - Create source package"
34         @echo "make install - Install on local system"
35 #       @echo "make buildrpm - Generate an rpm package"
36         @echo "make builddeb - Generate a deb package"
37         @echo "make clean - Get rid of scratch and byte files"
38