X-Git-Url: http://git.onelab.eu/?p=myops.git;a=blobdiff_plain;f=Makefile;fp=Makefile;h=3e7a7d60d0741664386b9bd6c6b5da1aea14866f;hp=0000000000000000000000000000000000000000;hb=2b8bf09f10cc0b44bb341c661230cf6de38e48fd;hpb=f9ef0ba59143f13b5731aeb03518ff7e4ffd7bb2 diff --git a/Makefile b/Makefile new file mode 100644 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