Add spec file for basic puppet configuration on client & server
[myops.git] / Makefile
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..3e7a7d6
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,39 @@
+# $Id$
+CURL    := curl -H Pragma: -O -R -S --fail --show-error
+SHA1SUM = sha1sum
+
+# default - overridden by the build
+SPECFILE = myops.spec
+
+#main.URL      := http://build.planet-lab.org/third-party/zabbix-1.6.2.tar.gz
+#main.SHA1SUM   := 575c443adec1703c2c242dbf353de9dc3bb4cafb
+main.FILE      := myops-1.0.tar.bz2
+
+# Thierry - when called from within the build, PWD is /build
+SOURCEFILES := $(main.FILE)
+
+$(main.FILE): #FORCE
+       rm -f myops-1.0.tar.bz2
+       tar -jchvf myops-1.0.tar.bz2 -C ../  myops-1.0
+       @echo "hello"
+
+sources: $(SOURCEFILES)
+.PHONY: sources
+
+PWD=$(shell pwd)
+PREPARCH ?= noarch
+RPMDIRDEFS = --define "_sourcedir $(PWD)" --define "_builddir $(PWD)" --define "_srcrpmdir $(PWD)" --define "_rpmdir $(PWD)"
+
+trees: sources
+       rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bp --target $(PREPARCH) $(SPECFILE)
+
+srpm: sources
+       rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bs $(SPECFILE)
+
+TARGET ?= $(shell uname -m)
+rpm: sources
+       rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps --target $(TARGET) -bb $(SPECFILE)
+
+clean:
+       rm -f *.rpm *.tgz *.bz2 *.gz
+       rm *.pyc *.dat *.log