155 INDEX_HTML_FILE := dist/www/index.html |
155 INDEX_HTML_FILE := dist/www/index.html |
156 |
156 |
157 STAT_RST_FILE := dist/misc/STAT.rst |
157 STAT_RST_FILE := dist/misc/STAT.rst |
158 STAT_HTML_FILE := dist/www/STAT.html |
158 STAT_HTML_FILE := dist/www/STAT.html |
159 |
159 |
160 HTML_FILES := $(RST_HTML_FILES) $(INDEX_HTML_FILE) $(STAT_HTML_FILE) |
160 WWW_HTML_FILES := $(RST_HTML_FILES) $(INDEX_HTML_FILE) $(STAT_HTML_FILE) |
161 |
161 |
162 LOGO_FILE := www/logo.svg |
162 LOGO_FILE := www/logo.svg |
163 LOGO_DIM := 32x32 48x48 64x64 |
163 LOGO_DIM := 32x32 48x48 64x64 |
164 LOGO_PNG_FILES := $(patsubst %,dist/misc/logo-%.png,$(LOGO_DIM)) |
164 LOGO_PNG_FILES := $(patsubst %,dist/misc/logo-%.png,$(LOGO_DIM)) |
165 FAVICON := dist/www/favicon.ico |
165 FAVICON := dist/www/favicon.ico |
238 .PHONY: deploy2defun-hg |
238 .PHONY: deploy2defun-hg |
239 deploy2defun-hg: |
239 deploy2defun-hg: |
240 hg push ssh://$(DEFUN_USER)@$(DEFUN_HG_SRV)/$(DEFUN_HG_DIR) || [ $$? = 1 ] |
240 hg push ssh://$(DEFUN_USER)@$(DEFUN_HG_SRV)/$(DEFUN_HG_DIR) || [ $$? = 1 ] |
241 |
241 |
242 .PHONY: deploy2defun-www |
242 .PHONY: deploy2defun-www |
243 deploy2defun-www: $(HTML_FILES) $(FAVICON) |
243 deploy2defun-www: $(WWW_HTML_FILES) $(FAVICON) |
244 ( \ |
244 ( \ |
245 echo 'cd $(DEFUN_WWW_DIR)'; \ |
245 echo 'cd $(DEFUN_WWW_DIR)'; \ |
246 for f in $(HTML_FILES) $(FAVICON); do \ |
246 for f in $(WWW_HTML_FILES) $(FAVICON); do \ |
247 n=$${f##*/}; \ |
247 n=$${f##*/}; \ |
248 echo "put $$f $$n"; \ |
248 echo "put $$f $$n"; \ |
249 echo "chmod 644 $$n"; \ |
249 echo "chmod 644 $$n"; \ |
250 done; \ |
250 done; \ |
251 echo 'quit'; \ |
251 echo 'quit'; \ |
278 deploy2sf-hg: |
278 deploy2sf-hg: |
279 hg push ssh://$(SF_USER)@hg.code.sf.net/p/$(pkgname)/code || [ $$? = 1 ] |
279 hg push ssh://$(SF_USER)@hg.code.sf.net/p/$(pkgname)/code || [ $$? = 1 ] |
280 |
280 |
281 # Will be accessed via http://$(pkgname).sourceforge.net |
281 # Will be accessed via http://$(pkgname).sourceforge.net |
282 .PHONY: deploy2sf-www |
282 .PHONY: deploy2sf-www |
283 deploy2sf-www: $(HTML_FILES) $(FAVICON) |
283 deploy2sf-www: $(WWW_HTML_FILES) $(FAVICON) |
284 ( echo 'cd htdocs'; \ |
284 ( echo 'cd htdocs'; \ |
285 for f in $(HTML_FILES) $(FAVICON); do \ |
285 for f in $(WWW_HTML_FILES) $(FAVICON); do \ |
286 n=$${f##*/}; \ |
286 n=$${f##*/}; \ |
287 echo "put $$f $$n"; \ |
287 echo "put $$f $$n"; \ |
288 echo "chmod 644 $$n"; \ |
288 echo "chmod 644 $$n"; \ |
289 done; \ |
289 done; \ |
290 echo 'quit'; \ |
290 echo 'quit'; \ |
336 dist-rel: $(DISTREL_TARBALLS) |
336 dist-rel: $(DISTREL_TARBALLS) |
337 |
337 |
338 DISTREL_DICTDZ_FILES := $(patsubst %,dist/$(fullpkgname)/dictd/%,$(notdir $(DICTDZ_FILES))) |
338 DISTREL_DICTDZ_FILES := $(patsubst %,dist/$(fullpkgname)/dictd/%,$(notdir $(DICTDZ_FILES))) |
339 DISTREL_INDEX_FILES := $(patsubst %,dist/$(fullpkgname)/dictd/%,$(notdir $(INDEX_FILES))) |
339 DISTREL_INDEX_FILES := $(patsubst %,dist/$(fullpkgname)/dictd/%,$(notdir $(INDEX_FILES))) |
340 DISTREL_RST_FILES := $(patsubst %,dist/$(fullpkgname)/doc/txt/%,$(notdir $(RST_FILES))) |
340 DISTREL_RST_FILES := $(patsubst %,dist/$(fullpkgname)/doc/txt/%,$(notdir $(RST_FILES))) |
341 DISTREL_HTML_FILES := $(patsubst %,dist/$(fullpkgname)/doc/html/%,$(notdir $(RST_HTML_FILES))) |
341 DISTREL_WWW_HTML_FILES := $(patsubst %,dist/$(fullpkgname)/doc/html/%,$(notdir $(RST_HTML_FILES))) |
342 DISTREL_SRS_TAB_FILES := $(patsubst %,dist/$(fullpkgname)/srs/%,$(notdir $(SRS_TAB_FILES))) |
342 DISTREL_SRS_TAB_FILES := $(patsubst %,dist/$(fullpkgname)/srs/%,$(notdir $(SRS_TAB_FILES))) |
343 DISTREL_SRS_ANKI_FILES := $(patsubst %,dist/$(fullpkgname)/anki/%,$(notdir $(SRS_ANKI_FILES))) |
343 DISTREL_SRS_ANKI_FILES := $(patsubst %,dist/$(fullpkgname)/anki/%,$(notdir $(SRS_ANKI_FILES))) |
344 |
344 |
345 dist/$(fullpkgname).tar.gz: $(DISTREL_DICTDZ_FILES) $(DISTREL_INDEX_FILES) $(DISTREL_SRS_TAB_FILES) $(DISTREL_SRS_ANKI_FILES) $(DISTREL_RST_FILES) $(DISTREL_HTML_FILES) $(BUILD_SCRIPTS) |
345 dist/$(fullpkgname).tar.gz: $(DISTREL_DICTDZ_FILES) $(DISTREL_INDEX_FILES) $(DISTREL_SRS_TAB_FILES) $(DISTREL_SRS_ANKI_FILES) $(DISTREL_RST_FILES) $(DISTREL_WWW_HTML_FILES) $(BUILD_SCRIPTS) |
346 rm -rf $@ |
346 rm -rf $@ |
347 tar zcf $@ -C dist/ $(fullpkgname) |
347 tar zcf $@ -C dist/ $(fullpkgname) |
348 |
348 |
349 dist/$(fullpkgname).zip: $(DISTREL_DICTDZ_FILES) $(DISTREL_INDEX_FILES) $(DISTREL_RST_FILES) $(DISTREL_HTML_FILES) $(BUILD_SCRIPTS) |
349 dist/$(fullpkgname).zip: $(DISTREL_DICTDZ_FILES) $(DISTREL_INDEX_FILES) $(DISTREL_RST_FILES) $(DISTREL_WWW_HTML_FILES) $(BUILD_SCRIPTS) |
350 rm -rf $@ |
350 rm -rf $@ |
351 cd $(dir $@) && zip -r $(notdir $@) $(fullpkgname) |
351 cd $(dir $@) && zip -r $(notdir $@) $(fullpkgname) |
352 |
352 |
353 $(DISTREL_DICTDZ_FILES) $(DISTREL_INDEX_FILES): dist/$(fullpkgname)/dictd/%: dist/dictd/% | dist/$(fullpkgname)/dictd/ |
353 $(DISTREL_DICTDZ_FILES) $(DISTREL_INDEX_FILES): dist/$(fullpkgname)/dictd/%: dist/dictd/% | dist/$(fullpkgname)/dictd/ |
354 cp $< $@ |
354 cp $< $@ |