DIRBASE=/opt/www/passport
REPBASE=svn+ssh://svn.yandex.ru/passport
REPBRANCH=trunk

TMP=$(CURDIR)/tmp
DST=$(DESTDIR)$(DIRBASE)
REP=$(REPBASE)/$(REPBRANCH)

DIRSTOCOPY=conf
FILESTOEXPORT=conf/templates/push-client.yaml.tt conf/templates/push-client-historydb-enc.yaml.tt \
			  conf/templates/ranges.conf.tt conf/templates/ranges-prod.conf.tt conf/templates/ranges-stress.conf.tt conf/templates/ranges-test.conf.tt conf/templates/ranges-team-prod.conf.tt conf/templates/ranges-team-test.conf.tt

clean:
	true

build:
	rm -rf $(TMP)
	mkdir -p -m755 $(TMP)
	mkdir -p $(TMP)/conf/templates
	$(foreach FILE, $(FILESTOEXPORT), svn export $(REP)/$(FILE) $(TMP)/$(FILE);)

install:
	rm -rf $(DST)
	mkdir -p -m755 $(DST)
	$(foreach DIR, $(DIRSTOCOPY), cp -r $(TMP)/$(DIR) $(DST)/$(DIR);)
