Makefile
changeset 493 8bfe8d4ad4a4
parent 482 fefea56726d2
child 494 f931ef10c1b0
equal deleted inserted replaced
492:b895111a2e39 493:8bfe8d4ad4a4
   182 DEFUN_USER ?= user
   182 DEFUN_USER ?= user
   183 DEFUN_HG_SRV ?= hg.defun.work
   183 DEFUN_HG_SRV ?= hg.defun.work
   184 DEFUN_HG_DIR ?= /srv/hg/gadict
   184 DEFUN_HG_DIR ?= /srv/hg/gadict
   185 DEFUN_WWW_SRV ?= defun.work
   185 DEFUN_WWW_SRV ?= defun.work
   186 DEFUN_WWW_DIR ?= /srv/www/gadict
   186 DEFUN_WWW_DIR ?= /srv/www/gadict
       
   187 DEFUN_REL_DIR ?= /srv/www/gadict/download
   187 
   188 
   188 .PHONY: deploy2defun
   189 .PHONY: deploy2defun
   189 deploy2defun: deploy2defun-src deploy2defun-www
   190 deploy2defun: deploy2defun-src deploy2defun-www deploy2defun-distrel
   190 
   191 
   191 .PHONY: deploy2defun-src
   192 .PHONY: deploy2defun-src
   192 deploy2defun-src:
   193 deploy2defun-src:
   193 	hg push ssh://$(DEFUN_USER)@$(DEFUN_HG_SRV)/$(DEFUN_HG_DIR) || [ $$? = 1 ]
   194 	hg push ssh://$(DEFUN_USER)@$(DEFUN_HG_SRV)/$(DEFUN_HG_DIR) || [ $$? = 1 ]
   194 
   195 
   202   echo "chmod 644 $$n"; \
   203   echo "chmod 644 $$n"; \
   203 done; \
   204 done; \
   204 echo 'quit'; \
   205 echo 'quit'; \
   205 ) | sftp -b - $(DEFUN_USER)@$(DEFUN_WWW_SRV)
   206 ) | sftp -b - $(DEFUN_USER)@$(DEFUN_WWW_SRV)
   206 
   207 
       
   208 .PHONY: deploy2defun-distrel
       
   209 deploy2defun-distrel: $(DISTREL_TARBALLS) $(DISTSRC_TARBALLS)
       
   210 	( \
       
   211 echo "mkdir $(DEFUN_REL_DIR)"; \
       
   212 echo "mkdir $(DEFUN_REL_DIR)/v$(vmajor).$(vminor)"; \
       
   213 echo "cd $(DEFUN_REL_DIR)/v$(vmajor).$(vminor)"; \
       
   214 for f in $(DISTREL_TARBALLS) $(DISTSRC_TARBALLS); do \
       
   215   n=$${f##*/}; \
       
   216   echo "put $$f $$n"; \
       
   217   echo "chmod 644 $$n"; \
       
   218 done; \
       
   219 ) | sftp -b - $(DEFUN_USER)@$(DEFUN_WWW_SRV)
   207 
   220 
   208 SF_USER ?= gavenkoa
   221 SF_USER ?= gavenkoa
   209 
   222 
   210 # First time you deploy to SourceForge (sf) you need manually login to:
   223 # First time you deploy to SourceForge (sf) you need manually login to:
   211 #   $ sftp $(SF_USER),$(pkgname)@web.sourceforge.net
   224 #   $ sftp $(SF_USER),$(pkgname)@web.sourceforge.net
   240 ) | sftp -b - $(SF_USER),$(pkgname)@web.sourceforge.net
   253 ) | sftp -b - $(SF_USER),$(pkgname)@web.sourceforge.net
   241 
   254 
   242 .PHONY: release2sf
   255 .PHONY: release2sf
   243 deploy2sf-release: validate-release $(DISTREL_TARBALLS) $(DISTSRC_TARBALLS)
   256 deploy2sf-release: validate-release $(DISTREL_TARBALLS) $(DISTSRC_TARBALLS)
   244 	exit 1
   257 	exit 1
   245 	: TODO broken due to new project hierarchy
       
   246 	( echo 'cd /home/frs/project/$(shell v=$(pkgname); echo $${v:0:1}/$${v:0:2})/$(pkgname)'; \
   258 	( echo 'cd /home/frs/project/$(shell v=$(pkgname); echo $${v:0:1}/$${v:0:2})/$(pkgname)'; \
   247 echo "put  README.rst"; \
   259 echo "put  README.rst"; \
   248 echo "chmod 644 README.rst"; \
   260 echo "chmod 644 README.rst"; \
   249 echo "mkdir v$(vmajor).$(vminor)"; \
   261 echo "mkdir v$(vmajor).$(vminor)"; \
   250 echo "cd v$(vmajor).$(vminor)"; \
   262 echo "cd v$(vmajor).$(vminor)"; \