-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (47 loc) · 1.93 KB
/
Makefile
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
55
56
57
# $Id: Makefile,v 1.6 2008/10/29 01:01:35 ghantoos Exp $
#
LBLUE_ON = \033[0;36m
GREEN_ON = \033[0;32m
OFF = \033[m
DOXYGEN=`which doxygen`
PYTHON=`which python`
DESTDIR=/
PROJECT=sipptam
all:
@echo "$(GREEN_ON)make localshop.indigital$(OFF) - sdist to the localshop.indigital"
@echo "$(GREEN_ON)make test$(OFF) - Run the test environment"
@echo "$(GREEN_ON)make doc$(OFF) - Create associated documentation (doxygen/LaTeX)"
@echo "$(GREEN_ON)make source$(OFF) - Create source package"
@echo "$(GREEN_ON)make install$(OFF) - Install on local system"
@echo "$(GREEN_ON)make buildrpm$(OFF) - Generate a $(LBLUE_ON)rpm$(OFF) package"
@echo "$(GREEN_ON)make builddeb$(OFF) - Generate a $(LBLUE_ON)deb$(OFF) package"
@echo "$(GREEN_ON)make clean$(OFF) - Get rid of scratch and byte files"
localshop.indigital:
python setup.py register -r indigital sdist upload -r indigital
test:
python /usr/local/lib/python2.6/dist-packages/tam/tests/main.py
doc:
cd doc; $(DOXYGEN) doxygen.conf
source:
$(PYTHON) setup.py sdist $(COMPILE)
install:
$(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE)
buildrpm:
$(PYTHON) setup.py bdist_rpm --post-install=rpm/postinstall --pre-uninstall=rpm/preuninstall
builddeb:
# build the source package in the parent directory
# then rename it to project_version.orig.tar.gz
# $(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../ --prune
$(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../
rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
# build the package
dpkg-buildpackage -i -I -rfakeroot
clean:
sudo rm -frv src/sipptam.egg-info/ build/ /Library/Python/2.7/site-packages/sipptam*
sudo rm -frv /System/Library/Frameworks/Python.framework/Versions/2.7/local/share/sipptam/*
find . -type f -name "*.pyc" -exec rm -f '{}' \;
find . -type f -name "*~" -exec rm -f '{}' \;
$(PYTHON) setup.py clean
$(MAKE) -f $(CURDIR)/debian/rules clean
rm -rf build/ MANIFEST
find . -name '*.pyc' -delete