1a4831819040061e8c7bf2ad8e5cf0540abf2450
[sfa.git] / Makefile.debian
1 PROJECT=sfa
2 PYTHON=python
3 DESTDIR=/
4 SETUPOPTS=
5
6 all: builddeb 
7
8 source:
9         $(PYTHON) setup.py sdist $(SETUPOPTS)
10
11 install:
12         $(PYTHON) setup.py install --root $(DESTDIR) $(SETUPOPTS)
13
14 #buildrpm:
15 #       $(PYTHON) setup.py bdist_rpm --post-install=rpm/postinstall --pre-uninstall=rpm/preuninstall
16
17 # build the source package in the parent directory
18 # then rename it to project_version.orig.tar.gz as expected for debian packaging
19 # finally build the package
20 builddeb:
21         rm -f sfaadmin sfascan sfi  
22         $(PYTHON) setup.py sdist $(SETUPOPTS)  --formats=gztar --dist-dir=../ --prune
23         rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
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