summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Šplíchal <psplicha@redhat.com>2012-02-22 12:11:22 +0100
committerPetr Šplíchal <psplicha@redhat.com>2012-02-22 12:11:22 +0100
commit393dae4d877d82fe04b71188979e3dfb7d3331af (patch)
treee60f4ad0731082d5fb9f5662a3c1f3320c228e4d
parent057ca472ebb1bfd75ce5f7fad1be762c72e3e26f (diff)
downloadpython-nitrate-393dae4d877d82fe04b71188979e3dfb7d3331af.zip
python-nitrate-393dae4d877d82fe04b71188979e3dfb7d3331af.tar.gz
python-nitrate-393dae4d877d82fe04b71188979e3dfb7d3331af.tar.xz
Initial commit of the Makefile
-rw-r--r--Makefile42
1 files changed, 42 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b399e6b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,42 @@
+
+TMP = $(CURDIR)/tmp
+VERSION = $(shell grep ^Version python-nitrate.spec | sed 's/.* //')
+PUSH_URL = fedorapeople.org:public_html/python-nitrate
+
+PACKAGE = python-nitrate-$(VERSION)
+DOCS = $(TMP)/$(PACKAGE)/documentation
+FILES = COPYING README \
+ Makefile python-nitrate.spec \
+ documentation examples source
+
+all: push clean
+
+build:
+ mkdir -p $(TMP)/{SOURCES,$(PACKAGE)}
+ cp -a $(FILES) $(TMP)/$(PACKAGE)
+ rst2man README | gzip > $(DOCS)/python-nitrate.1.gz
+ rst2html README > $(DOCS)/python-nitrate.html
+ rst2man $(DOCS)/nitrate.rst | gzip > $(DOCS)/nitrate.1.gz
+ rst2html $(DOCS)/nitrate.rst > $(DOCS)/nitrate.html
+
+tarball: build
+ cd $(TMP) && tar cfj SOURCES/$(PACKAGE).tar.bz2 $(PACKAGE)
+
+rpm: tarball
+ rpmbuild --define '_topdir $(TMP)' -bb python-nitrate.spec
+
+srpm: tarball
+ rpmbuild --define '_topdir $(TMP)' -bs python-nitrate.spec
+
+packages: rpm srpm
+
+push: packages
+ scp python-nitrate.spec \
+ $(TMP)/SRPMS/$(PACKAGE)* \
+ $(TMP)/RPMS/noarch/$(PACKAGE)* \
+ $(TMP)/SOURCES/$(PACKAGE).tar.bz2 \
+ $(DOCS)/*.html \
+ $(PUSH_URL)
+
+clean:
+ rm -rf $(TMP)