-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
85 lines (74 loc) · 2.64 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
PRODUCT := "cacophony"
RPMSPECDIR := contrib/rpm
RPMSPEC := $(RPMSPECDIR)/$(PRODUCT).spec
tests: unittests pep8 pyflakes
:
unittests:
@echo "#############################################"
@echo "# Running Unit Tests"
@echo "#############################################"
nosetests -v
clean:
@find . -type f -regex ".*\.py[co]$$" -delete
@find . -type f \( -name "*~" -or -name "#*" \) -delete
@rm -fR build dist rpm-build MANIFEST
pep8:
@echo "#############################################"
@echo "# Running PEP8 Compliance Tests"
@echo "#############################################"
pep8 --ignore=E501 -r server.py
pyflakes:
@echo "#############################################"
@echo "# Running Pyflakes Sanity Tests"
@echo "# Note: most import errors may be ignored"
@echo "#############################################"
-pyflakes server.py
sdist: clean
python setup.py sdist
rpmcommon: sdist
@mkdir -p rpm-build
@cp dist/*.gz rpm-build/
srpm5: rpmcommon
rpmbuild --define "_topdir %(pwd)/rpm-build" \
--define 'dist .el5' \
--define "_builddir %{_topdir}" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
--define "_specdir $(RPMSPECDIR)" \
--define "_sourcedir %{_topdir}" \
--define "_source_filedigest_algorithm 1" \
--define "_binary_filedigest_algorithm 1" \
--define "_binary_payload w9.gzdio" \
--define "_source_payload w9.gzdio" \
--define "_default_patch_fuzz 2" \
-bs $(RPMSPEC)
@echo "#############################################"
@echo "$(PRODUCT) SRPM is built:"
@find rpm-build -maxdepth 2 -name '$(PRODUCT)*src.rpm' | awk '{print " " $$1}'
@echo "#############################################"
srpm: rpmcommon
rpmbuild --define "_topdir %(pwd)/rpm-build" \
--define "_builddir %{_topdir}" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
--define "_specdir $(RPMSPECDIR)" \
--define "_sourcedir %{_topdir}" \
-bs $(RPMSPEC)
@echo "#############################################"
@echo "$(PRODUCT) SRPM is built:"
@find rpm-build -maxdepth 2 -name $(PRODUCT)'*src.rpm' | awk '{print " " $$1}'
@echo "#############################################"
rpm: rpmcommon
rpmbuild --define "_topdir %(pwd)/rpm-build" \
--define "_builddir %{_topdir}" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
--define "_specdir $(RPMSPECDIR)" \
--define "_sourcedir %{_topdir}" \
-ba $(RPMSPEC)
@echo "#############################################"
@echo "$(PRODUCT) RPMs are built:"
@find rpm-build/noarch -maxdepth 2 -name $(PRODUCT)'*.rpm' | awk '{print " " $$1}'
@echo "#############################################"
tag:
git tag -s -m $(TAG) cacophony-$(TAG)