X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=blobdiff_plain;f=Makefile;h=90e70def9446fccf6895dca65d2c298565200c34;hp=bcf1edca12c7af94ecaa9b7ec253c2aa2c3e8bb7;hb=HEAD;hpb=7ebd40bbcacbb55e3e56d868b4f31b73c119a1a2 diff --git a/Makefile b/Makefile index bcf1edca..90e70def 100644 --- a/Makefile +++ b/Makefile @@ -5,11 +5,11 @@ DESTDIR="/" PREFIX=/usr ########## -all: python wsdl +all: python -install: python-install wsdl-install tests-install +install: python-install tests-install -clean: python-clean wsdl-clean +clean: python-clean uninstall: python-uninstall tests-uninstall @@ -31,32 +31,20 @@ sfa/util/version.py: sfa/util/version.py.in force # postinstall steps - various cleanups and tweaks for a nicer rpm python-install: - python setup.py install --prefix=$(PREFIX) --root=$(DESTDIR) + python3 setup.py install --prefix=$(PREFIX) --root=$(DESTDIR) chmod 444 $(DESTDIR)/etc/sfa/default_config.xml rm -rf $(DESTDIR)/usr/lib*/python*/site-packages/*egg-info rm -rf $(DESTDIR)/usr/lib*/python*/site-packages/sfa/storage/migrations (cd $(DESTDIR)/usr/bin ; ln -s sfi.py sfi; ln -s sfascan.py sfascan; ln -s sfaadmin.py sfaadmin) python-clean: version-clean - python setup.py clean + python3 setup.py clean # rm $(init) version-clean: rm -f sfa/util/version.py .PHONY: python version python-install python-clean version-clean -########## -wsdl: - $(MAKE) -C wsdl - -# propagate DESTDIR from the specfile -wsdl-install: - $(MAKE) -C wsdl install - -wsdl-clean: - $(MAKE) -C wsdl clean - -.PHONY: wsdl wsdl-install wsdl-clean ########## tests-install: @@ -124,7 +112,7 @@ PYPI_TARBALL_TOPDIR=/build/sfa # this target is still helpful to produce the readme in html from README.md index.zip index.html: README.md - python readme.py + python3 readme.py # I need to run this on my mac as my pypi # run git pull first as this often comes afet a module-tag @@ -139,7 +127,7 @@ git: pypi: index.html setup.py sdist upload -r $(PYPI_TARGET) ssh $(PYPI_TARBALL_HOST) mkdir -p $(PYPI_TARBALL_TOPDIR)/$(VERSIONTAG) - rsync -av dist/sfa-$(VERSIONTAG).tar.gz $(PYPI_TARBALL_HOST):$(PYPI_TARBALL_TOPDIR)/$(VERSIONTAG) + rsync -ai dist/sfa-$(VERSIONTAG).tar.gz $(PYPI_TARBALL_HOST):$(PYPI_TARBALL_TOPDIR)/$(VERSIONTAG) # cleanup clean: readme-clean @@ -183,27 +171,22 @@ LOCAL_RSYNC_EXCLUDES += --exclude '*.pyc' LOCAL_RSYNC_EXCLUDES += --exclude '*.png' --exclude '*.svg' --exclude '*.out' RSYNC_EXCLUDES := --exclude .svn --exclude .git --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES) RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,) -RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) --no-owner $(RSYNC_EXCLUDES) +RSYNC := rsync -ai $(RSYNC_COND_DRY_RUN) --no-owner $(RSYNC_EXCLUDES) CLIENTS = $(shell ls clientbin/*.py) -BINS = ./config/sfa-config-tty ./config/gen-sfa-cm-config.py ./systemd/sfa-setup.sh \ - ./sfa/server/sfa-start.py \ - ./clientbin/sfaadmin.py \ +BINS = ./config/sfa-config-tty ./systemd/sfa-setup.sh \ + ./sfa/server/sfa-start.py ./clientbin/sfaadmin.py keyconvert/keyconvert.py \ $(CLIENTS) synclib: synccheck - +$(RSYNC) --relative ./sfa/ --exclude migrations $(SSHURL)/usr/lib\*/python2.\*/site-packages/ -synclib3: synccheck +$(RSYNC) --relative ./sfa/ --exclude migrations $(SSHURL)/usr/lib\*/python3.\*/site-packages/ -synclibdeb: synccheck - +$(RSYNC) --relative ./sfa/ --exclude migrations $(SSHURL)/usr/share/pyshared/ syncmigrations: +$(RSYNC) ./sfa/storage/migrations/versions/*.py $(SSHURL)/usr/share/sfa/migrations/versions/ syncbin: synccheck +$(RSYNC) $(BINS) $(SSHURL)/usr/bin/ syncservices: synccheck - +$(RSYNC) ./systemd/*.service $(SSHURL)/usr/lib/systemd/system + +$(RSYNC) ./systemd/*.service $(SSHURL)/lib/systemd/system +$(RSYNC) ./systemd/sfa-setup.sh $(SSHURL)/usr/bin syncconfig: +$(RSYNC) ./config/default_config.xml $(SSHURL)/etc/sfa/ @@ -211,7 +194,9 @@ synctest: synccheck +$(RSYNC) ./tests/ $(SSHURL)/root/tests-sfa syncrestart: synccheck -$(SSHCOMMAND) systemctl --system daemon-reload - $(SSHCOMMAND) service sfa restart + $(SSHCOMMAND) systemctl restart sfa-db + $(SSHCOMMAND) systemctl restart sfa-aggregate + $(SSHCOMMAND) systemctl restart sfa-registry syncmig: +$(RSYNC) ./sfa/storage/migrations $(SSHURL)/usr/share/sfa/ @@ -235,7 +220,7 @@ sfa/util/{sfalogging,faults,genicode,enumeration,__init__}.py clientlibsync: @[ -d "$(CLIENTLIBTARGET)" ] || { echo "You need to set the make variable CLIENTLIBTARGET"; exit 1; } - rsync -av --relative $(CLIENTLIBFILES) $(CLIENTLIBTARGET) + rsync -ai --relative $(CLIENTLIBFILES) $(CLIENTLIBTARGET) #################### convenience, for debugging only # make +foo : prints the value of $(foo)