summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorAdrian Likins <alikins@redhat.com>2007-09-20 16:09:20 -0400
committerAdrian Likins <alikins@redhat.com>2007-09-20 16:09:20 -0400
commit7a70b5bb80c69dafc345dfd4df577bfb1e983ee9 (patch)
tree2b3ebe15ab9c14a438b4cea2b61b31d0512450c8 /Makefile
parent322c6fd1fe1aa02b740d646a3c02f8ec46515fa3 (diff)
downloadfunc-7a70b5bb80c69dafc345dfd4df577bfb1e983ee9.zip
func-7a70b5bb80c69dafc345dfd4df577bfb1e983ee9.tar.gz
func-7a70b5bb80c69dafc345dfd4df577bfb1e983ee9.tar.xz
first pass at packaging stuff
version is 0.11-1 (this one goes to .11) "make rpms" should build a rpm from the setup.py and func.spec
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile57
1 files changed, 57 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100755
index 0000000..b831591
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,57 @@
+VERSION = $(shell echo `awk '{ print $$1 }' version`)
+RELEASE = $(shell echo `awk '{ print $$2 }' version`)
+NEWRELEASE = $(shell echo $$(($(RELEASE) + 1)))
+
+MESSAGESPOT=po/messages.pot
+
+all: rpms
+
+clean:
+ -rm -f MANIFEST
+ -rm -rf dist/ build/
+ -rm -rf *~
+ -rm -rf rpm-build/
+
+#manpage:
+# pod2man --center="cobbler" --release="" cobbler.pod | gzip -c > cobbler.1.gz
+# pod2html cobbler.pod > cobbler.html
+
+#test:
+# python tests/tests.py
+# -rm -rf /tmp/_cobbler-*
+
+messages: server/*.py
+ xgettext -k_ -kN_ -o $(MESSAGESPOT) server/*.py
+ sed -i'~' -e 's/SOME DESCRIPTIVE TITLE/func/g' -e 's/YEAR THE PACKAGE'"'"'S COPYRIGHT HOLDER/2007 Red Hat, inc. /g' -e 's/FIRST AUTHOR <EMAIL@ADDRESS>, YEAR/Adrian Likins <alikins@redhat.com>, 2007/g' -e 's/PACKAGE VERSION/func $(VERSION)-$(RELEASE)/g' -e 's/PACKAGE/func/g' $(MESSAGESPOT)
+
+
+bumprelease:
+ -echo "$(VERSION) $(NEWRELEASE)" > version
+
+setversion:
+ -echo "$(VERSION) $(RELEASE)" > version
+
+build: clean
+ python setup.py build -f
+
+install: build
+ python setup.py install -f
+
+sdist: clean messages
+ python setup.py sdist
+
+new-rpms: bumprelease rpms
+
+
+rpms: sdist
+ mkdir -p rpm-build
+ cp dist/*.gz rpm-build/
+ cp version rpm-build/
+ rpmbuild --define "_topdir %(pwd)/rpm-build" \
+ --define "_builddir %{_topdir}" \
+ --define "_rpmdir %{_topdir}" \
+ --define "_srcrpmdir %{_topdir}" \
+ --define '_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' \
+ --define "_specdir %{_topdir}" \
+ --define "_sourcedir %{_topdir}" \
+ -ba func.spec