summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-05-20 15:42:24 -0400
committerSimo Sorce <simo@redhat.com>2014-05-20 16:29:44 -0400
commit71eeef1008cf47c3e60d61ac476777ffec5120c3 (patch)
tree96e8a585c8850e4ac4cf805260488fe0b525d351 /Makefile
parent316517abf818f528d6e63af0726a294f0c0552e6 (diff)
downloadipsilon-71eeef1008cf47c3e60d61ac476777ffec5120c3.tar.gz
ipsilon-71eeef1008cf47c3e60d61ac476777ffec5120c3.tar.xz
ipsilon-71eeef1008cf47c3e60d61ac476777ffec5120c3.zip
Add sdist and rpms targets to Makefile
make rpms will now create fedora rpms in dist/[s]rpms Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 5a2a35f..d02a974 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+RPMBUILD = $(PWD)/dist/rpmbuild
+
all: lint pep8
lint:
@@ -26,3 +28,27 @@ ui-node: less/ipsilon.less less/admin.less
# Create and minify CSS
lessc --clean-css less/ipsilon.less ui/css/ipsilon.css
lessc --clean-css less/admin.less ui/css/admin.css
+
+sdist:
+ python setup.py sdist
+
+rpmroot:
+ rm -rf $(RPMBUILD)
+ mkdir -p $(RPMBUILD)/BUILD
+ mkdir -p $(RPMBUILD)/RPMS
+ mkdir -p $(RPMBUILD)/SOURCES
+ mkdir -p $(RPMBUILD)/SPECS
+ mkdir -p $(RPMBUILD)/SRPMS
+
+rpmdistdir:
+ mkdir -p dist/rpms
+ mkdir -p dist/srpms
+
+rpms: rpmroot rpmdistdir sdist
+ cp dist/ipsilon*.tar.gz $(RPMBUILD)/SOURCES/
+ rpmbuild --define "_topdir $(RPMBUILD)" -ba contrib/fedora/ipsilon.spec
+ mv $(RPMBUILD)/RPMS/*/ipsilon-*.rpm dist/rpms/
+ mv $(RPMBUILD)/SRPMS/ipsilon-*.src.rpm dist/srpms/
+ rm -rf $(RPMBUILD)
+
+rpms: sdist