Makefile
changeset 338 61a9d2de0e3e
parent 313 09992a817891
child 339 4d8d46bbe30d
equal deleted inserted replaced
337:33b08a8b7fb1 338:61a9d2de0e3e
   155 DISTSRC_TARBALLS = $(DISTSRC_DIR).tar.gz $(DISTSRC_DIR).tar.bz2
   155 DISTSRC_TARBALLS = $(DISTSRC_DIR).tar.gz $(DISTSRC_DIR).tar.bz2
   156 
   156 
   157 ################################################################
   157 ################################################################
   158 # Deploy targets.
   158 # Deploy targets.
   159 
   159 
   160 ifeq '' '$(SF_USER)'
       
   161   SF_USER := gavenkoa
       
   162 endif
       
   163 
       
   164 .PHONY: deploy
   160 .PHONY: deploy
   165 deploy: deploy2sf
   161 deploy: deploy2defun deploy2sf
       
   162 
       
   163 
       
   164 DEFUN_USER ?= user
       
   165 DEFUN_HG_SRV ?= hg.defun.work
       
   166 DEFUN_HG_DIR ?= /srv/hg/gadict
       
   167 DEFUN_WWW_SRV ?= defun.work
       
   168 DEFUN_WWW_DIR ?= /srv/www/gadict
       
   169 
       
   170 .PHONY: deploy2defun
       
   171 deploy2defun: deploy2defun-src deploy2defun-www
       
   172 
       
   173 .PHONY: deploy2defun-src
       
   174 deploy2defun-src:
       
   175 	hg push ssh://$(DEFUN_USER)@$(DEFUN_HG_SRV)/$(DEFUN_HG_DIR) || [ $$? = 1 ]
       
   176 
       
   177 .PHONY: deploy2defun-www
       
   178 deploy2defun-www: $(RST_HTML_FILES)
       
   179 	( \
       
   180 echo 'cd $(DEFUN_WWW_DIR)'; \
       
   181 for f in $(RST_HTML_FILES); do \
       
   182   echo "put $$f"; \
       
   183   echo "chmod 644 $$f"; \
       
   184 done; \
       
   185 echo 'quit'; \
       
   186 ) | sftp -b - $(DEFUN_USER)@$(DEFUN_WWW_SRV)
       
   187 
       
   188 
       
   189 SF_USER ?= gavenkoa
   166 
   190 
   167 # First time you deploy to SourceForge (sf) you need manually login to:
   191 # First time you deploy to SourceForge (sf) you need manually login to:
   168 #   $ sftp $(SF_USER),$(pkgname)@web.sourceforge.net
   192 #   $ sftp $(SF_USER),$(pkgname)@web.sourceforge.net
   169 # as it may require interactive input for accepting server public key.
   193 # as it may require interactive input for accepting server public key.
   170 # Next time any action fully automated.
   194 # Next time any action fully automated.
   171 
   195 
   172 .PHONY: deploy2sf
   196 .PHONY: deploy2sf
   173 deploy2sf: deploy2sf-src deploy2sf-doc deploy2sf-voa deploy2sf-release
   197 deploy2sf: deploy2sf-src deploy2sf-www deploy2sf-voa deploy2sf-release
   174 
   198 
   175 .PHONY: deploy2sf-src
   199 .PHONY: deploy2sf-src
   176 deploy2sf-src:
   200 deploy2sf-src:
   177 	hg push ssh://$(SF_USER)@hg.code.sf.net/p/$(pkgname)/code || [ $$? = 1 ]
   201 	hg push ssh://$(SF_USER)@hg.code.sf.net/p/$(pkgname)/code || [ $$? = 1 ]
   178 
   202 
   179 # Will be accessed via http://$(pkgname).sourceforge.net
   203 # Will be accessed via http://$(pkgname).sourceforge.net
   180 .PHONY: deploy2sf-doc
   204 .PHONY: deploy2sf-www
   181 deploy2sf-doc: deploy-check $(RST_HTML_FILES)
   205 deploy2sf-www: deploy-check $(RST_HTML_FILES)
   182 	( echo 'cd htdocs'; \
   206 	( echo 'cd htdocs'; \
   183 for f in $(RST_HTML_FILES); do \
   207 for f in $(RST_HTML_FILES); do \
   184   echo "put $$f"; \
   208   echo "put $$f"; \
   185   echo "chmod 644 $$f"; \
   209   echo "chmod 644 $$f"; \
   186 done; \
   210 done; \