-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Makefile for making rpm's and other stuff.
- Loading branch information
Showing
4 changed files
with
90 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ test/Test-CA/certs/ | |
test/Test-CA/requests/ | ||
test/Test-CA/index.txt | ||
tox/ | ||
rpm-build/ | ||
|
||
# C extensions | ||
*.so | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters