summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorNathan Straz <nstraz@redhat.com>2009-02-02 18:36:40 -0500
committerNathan Straz <nstraz@redhat.com>2009-02-02 18:36:40 -0500
commit7e1247b426ae86d7c660a9ca87f76d43773670f6 (patch)
treeb91f593102a185a998bec50255e52ef0022de948 /Makefile
downloadsteeltoe-7e1247b426ae86d7c660a9ca87f76d43773670f6.tar.gz
steeltoe-7e1247b426ae86d7c660a9ca87f76d43773670f6.tar.xz
steeltoe-7e1247b426ae86d7c660a9ca87f76d43773670f6.zip
Import a sanitized version of Steel Toe, the provisioning system.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile38
1 files changed, 38 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..14135dd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,38 @@
+
+PYTHON_SITELIB := $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
+
+TARGETS := steeltoe
+
+all: $(TARGETS) build-python
+
+build-python: setup.py
+ python setup.py build
+
+XSL := $(wildcard *.xsl)
+
+install: all
+ install -D steeltoe $(DESTDIR)/usr/bin/steeltoe
+ install -D tftp.conf $(DESTDIR)/etc/httpd/conf.d/tftp.conf
+ install -D steeltoe.xml $(DESTDIR)/etc/steeltoe/steeltoe.xml
+ for i in $(XSL); do install -D $$i $(DESTDIR)/etc/steeltoe/$$i; done
+ install -d $(DESTDIR)$(PYTHON_SITELIB)/st_web/
+ python setup.py install --skip-build --root $(DESTDIR)
+ python setup.py install -O1 --skip-build --root $(DESTDIR)
+ cp -R st_web/templates $(DESTDIR)$(PYTHON_SITELIB)/st_web/
+
+clean:
+ $(RM) $(TARGETS)
+
+
+VERSION := $(shell awk '/^Version:/ { print $$2 }' steeltoe.spec)
+steeltoe-$(VERSION).tar.bz2: steeltoe.spec Makefile
+ -$(RM) $@
+ tar cjf $@ --exclude=.svn --exclude=*.pyc .
+
+tarball: steeltoe-$(VERSION).tar.bz2
+
+rpm: steeltoe-$(VERSION).tar.bz2 steeltoe.spec
+ rpmbuild --target=noarch -ta $<
+
+srpm: steeltoe-$(VERSION).tar.bz2 steeltoe.spec
+ rpmbuild -ts $<