X-Git-Url: http://git.onelab.eu/?p=plstackapi.git;a=blobdiff_plain;f=Makefile;h=f6573ca8ad2d84b001ad0ce8f7481e39b01ca011;hp=802fa0b855c737bbecee330762fda68d6071753e;hb=HEAD;hpb=ab66c77f19719ed3d447595725f52b5670a30a74 diff --git a/Makefile b/Makefile index 802fa0b..f6573ca 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,6 @@ VERSION = $(shell rpm -q --specfile $(SPECFILE) --qf '%{VERSION}\n' | head -n 1) RELEASE = $(shell rpm -q --specfile $(SPECFILE) --qf '%{RELEASE}\n' | head -n 1) UPLOAD_SLICE=princeton_planetstack -UPLOAD_HOST=node36.princeton.vicci.org PWD = $(shell pwd) @@ -12,7 +11,7 @@ dist rpm: $(NAME)-$(VERSION)-$(RELEASE).rpm $(NAME)-$(VERSION).tar.gz: mkdir -p $(NAME)-$(VERSION) - rsync -av --exclude=.svn --exclude=.git --exclude=*.tar.gz --exclude=__history --exclude=$(NAME)-$(VERSION)/ ./ $(NAME)-$(VERSION) + rsync -av --exclude=.svn --exclude=.git --exclude=*.tar.gz --exclude=*.rpm --exclude=__history --exclude=$(NAME)-$(VERSION)/ ./ $(NAME)-$(VERSION) tar -czf $@ $(NAME)-$(VERSION) rm -fr $(NAME)-$(VERSION) @@ -35,11 +34,22 @@ clean: rm -f $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)-$(RELEASE).src.rpm $(NAME)-$(VERSION)-$(RELEASE).noarch.rpm rm -rf build -install: $(NAME)-$(VERSION)-$(RELEASE).rpm +upload: $(NAME)-$(VERSION)-$(RELEASE).rpm +ifndef UPLOAD_HOST + $(error please specify UPLOAD_HOST= on make command line) +endif scp $(NAME)-$(VERSION)-$(RELEASE).x86_64.rpm $(UPLOAD_SLICE)@$(UPLOAD_HOST):/root/ + +install: upload ssh $(UPLOAD_SLICE)@$(UPLOAD_HOST) yum -y install gcc graphviz-devel graphviz-python postgresql postgresql-server python-pip python-psycopg2 libxslt-devel python-httplib2 GeoIP - ssh $(UPLOAD_SLICE)@$(UPLOAD_HOST) rpm --install --upgrade --replacepkgs /root/$(NAME)-$(VERSION)-$(RELEASE).x86_64.rpm + ssh $(UPLOAD_SLICE)@$(UPLOAD_HOST) rpm --install --upgrade --replacefiles --replacepkgs /root/$(NAME)-$(VERSION)-$(RELEASE).x86_64.rpm scp /opt/planetstack/hpc_wizard/bigquery_credentials.dat /opt/planetstack/hpc_wizard/client_secrets.json $(UPLOAD_SLICE)@$(UPLOAD_HOST):/opt/planetstack/hpc_wizard/ +install-keys: +ifndef UPLOAD_HOST + $(error please specify UPLOAD_HOST= on make command line) +endif + scp /opt/planetstack/hpc_wizard/bigquery_credentials.dat /opt/planetstack/hpc_wizard/client_secrets.json $(UPLOAD_SLICE)@$(UPLOAD_HOST):/opt/planetstack/hpc_wizard/ + .PHONY: dist