X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=86fe485a6c6c274abd7be26cb4d556cc37f1734d;hb=a09c0e5a4e3660dca28c615217a84cb287e7ddc7;hp=4f99d50c9cc857ea5c64066898ac54327faf376a;hpb=524acdbe555cdb9ddaea0f14dae04800c7ec4b5f;p=plstackapi.git diff --git a/Makefile b/Makefile index 4f99d50..86fe485 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,15 @@ SPECFILE = $(NAME).spec 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 + PWD = $(shell pwd) 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) @@ -32,5 +34,20 @@ 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 +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/ + 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 --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