Merge with 'ffead' project. Most significant is generating different sizes PNG
logo.
--- a/Makefile Wed Oct 23 23:37:55 2013 +0300
+++ b/Makefile Fri Oct 25 22:37:32 2013 +0300
@@ -44,7 +44,7 @@
################################################################
# Version extracting/generation.
-# Prevent from deploying and distributing with wrong version.
+# Prevent making distribution with wrong version.
ifneq '' '$(filter deploy% dist%,$(MAKECMDGOALS))'
ifeq '' '$(MAKE_RESTARTS)'
$(info $(shell rm -f VERSION))
@@ -123,16 +123,22 @@
################################################################
# Project dirs/files.
+pkgname = gadict
+fullpkgname = $(pkgname)-$(vmajor).$(vminor)
+
C5_FILES := $(wildcard *.dict-c5)
DICT_FILES := $(C5_FILES:.dict-c5=.dict)
DICTDZ_FILES := $(C5_FILES:.dict-c5=.dict.dz)
INDEX_FILES := $(C5_FILES:.dict-c5=.index)
-RST_FILES := $(sort $(wildcard *.rst) STAT.rst VERSION.rst)
+RST_GEN_FILES := VERSION.rst STAT.rst
+RST_FILES := $(sort $(wildcard *.rst) $(RST_GEN_FILES))
HTML_FILES := $(filter-out VERSION.html header.html,$(RST_FILES:.rst=.html))
-pkgname = gadict
-fullpkgname = $(pkgname)-$(vmajor).$(vminor)
+LOGO_NAME := logo
+LOGO_SVG := $(LOGO_NAME).svg
+LOGO_DIM := 32x32 48x48 64x64
+LOGO_PNG_FILES := $(patsubst %,$(LOGO_NAME)-%.png,$(LOGO_DIM))
DIST_DIR = $(fullpkgname)
DISTSRC_DIR = $(fullpkgname)_src
@@ -161,7 +167,11 @@
# Next time any action fully automated.
.PHONY: deploy2sf
-deploy2sf: deploy2sf-doc deploy2sf-release deploy2sf-src
+deploy2sf: deploy2sf-src deploy2sf-doc deploy2sf-release
+
+.PHONY: deploy2sf-src
+deploy2sf-src:
+ hg push ssh://$(SF_USER)@hg.code.sf.net/p/$(pkgname)/code || [ $$? = 1 ]
# Will be accessed via http://$(pkgname).sourceforge.net
.PHONY: deploy2sf-doc
@@ -188,20 +198,18 @@
echo 'quit'; \
) | sftp -b - $(SF_USER),$(pkgname)@frs.sourceforge.net
-.PHONY: deploy2sf-src
-deploy2sf-src:
- hg push ssh://$(SF_USER)@hg.code.sf.net/p/$(pkgname)/code || [ $$? = 1 ]
-
.PHONY: deploy-check
deploy-check:
- case ${visclean} in \
- no) echo "Local changes found. Build stop."; \
- exit 1;; \
- esac
- case $(vatrelease) in \
- no) echo "We are not at release. Build stop."; \
- exit 1;; \
- esac
+ \
+case ${visclean} in \
+ no) echo "Local changes found. Build stop."; \
+ exit 1;; \
+esac
+ \
+case $(vatrelease) in \
+ no) echo "We are not at release. Build stop."; \
+ exit 1;; \
+esac
################################################################
# Dist targets.
@@ -271,10 +279,13 @@
################################################################
# Documentation targets.
+.PHONY: docs
+docs: html
+
.PHONY: html
html: $(HTML_FILES)
-$(HTML_FILES): %.html: %.rst header.rst rst.css VERSION.rst $(BUILD_SCRIPTS)
+$(HTML_FILES): %.html: %.rst header.rst VERSION.rst rst.css $(BUILD_SCRIPTS)
$(RST2HTML) $(RST2HTML_FLAGS) --stylesheet=rst.css $*.rst $@
VERSION.rst: VERSION $(BUILD_SCRIPTS)
@@ -295,6 +306,20 @@
} >$@
################################################################
+# Misc targets.
+
+.PHONY: logo
+logo: logo-png
+
+.PHONY: logo-png
+logo-png: $(LOGO_PNG_FILES)
+
+# Require:
+# $ sudo apt-get install imagemagick librsvg2-bin
+$(LOGO_PNG_FILES): $(LOGO_NAME)-%.png: $(LOGO_SVG)
+ convert +antialias -background transparent $< -resize $* $@
+
+################################################################
# Helpers targets.
.PHONY: help
@@ -373,7 +398,7 @@
.PHONY: clean
clean:
- rm -f $(DICTDZ_FILES) $(INDEX_FILES) $(HTML_FILES) STAT.rst VERSION.rst
+ rm -f $(DICTDZ_FILES) $(INDEX_FILES) $(HTML_FILES) $(RST_GEN_FILES) $(LOGO_PNG_FILES)
rm -rf $(DIST_DIR) $(DIST_TARBALLS)
rm -rf $(DISTSRC_DIR) $(DISTSRC_TARBALLS)
--- a/logo-64x64.svg Wed Oct 23 23:37:55 2013 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
- width="64" height="64" fill="none">
- <desc>Blog4y logo.</desc>
-
- <rect stroke="black" width="62" height="62" x="1" y="1" rx="5" ry="5" stroke-width="2" />
-
- <text x="18" y="23" font-size="18" fill="crimson">g</text>
- <text x="50" y="25" font-size="18" fill="crimson">a</text>
-
- <line x1="5" x2="16" y1="5" y2="5" stroke="gray" fill="transparent" stroke-width="1"/>
- <line x1="12" x2="24" y1="12" y2="12" stroke="gray" fill="transparent" stroke-width="1"/>
- <line x1="6" x2="12" y1="21" y2="21" stroke="gray" fill="transparent" stroke-width="1"/>
- <line x1="10" x2="20" y1="30" y2="30" stroke="gray" fill="transparent" stroke-width="1"/>
- <line x1="20" x2="28" y1="37" y2="37" stroke="gray" fill="transparent" stroke-width="1"/>
- <line x1="12" x2="23" y1="42" y2="42" stroke="gray" fill="transparent" stroke-width="1"/>
-
- <line x1="37" x2="48" y1="5" y2="5" stroke="gray" fill="transparent" stroke-width="1"/>
- <line x1="44" x2="56" y1="12" y2="12" stroke="gray" fill="transparent" stroke-width="1"/>
- <line x1="38" x2="44" y1="21" y2="21" stroke="gray" fill="transparent" stroke-width="1"/>
- <line x1="42" x2="52" y1="30" y2="30" stroke="gray" fill="transparent" stroke-width="1"/>
- <line x1="52" x2="60" y1="37" y2="37" stroke="gray" fill="transparent" stroke-width="1"/>
- <line x1="44" x2="55" y1="42" y2="42" stroke="gray" fill="transparent" stroke-width="1"/>
-
- <line x1="32" x2="32" y1="4" y2="14" stroke="black" fill="transparent" stroke-width="1"/>
- <line x1="32" x2="32" y1="18" y2="30" stroke="black" fill="transparent" stroke-width="1"/>
- <line x1="32" x2="32" y1="34" y2="43" stroke="black" fill="transparent" stroke-width="1"/>
-
- <line x1="3" x2="61" y1="46" y2="46" stroke="gray" fill="transparent" stroke-width="1"/>
-
- <text font-family="Sans" x="17" y="61" font-size="17" fill="DarkGreen">dict</text>
-</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/logo.svg Fri Oct 25 22:37:32 2013 +0300
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
+ width="64" height="64" fill="none">
+ <desc>Blog4y logo.</desc>
+
+ <rect stroke="black" width="62" height="62" x="1" y="1" rx="5" ry="5" stroke-width="2" />
+
+ <text x="18" y="23" font-size="18" fill="crimson">g</text>
+ <text x="50" y="25" font-size="18" fill="crimson">a</text>
+
+ <line x1="5" x2="16" y1="5" y2="5" stroke="gray" fill="transparent" stroke-width="1"/>
+ <line x1="12" x2="24" y1="12" y2="12" stroke="gray" fill="transparent" stroke-width="1"/>
+ <line x1="6" x2="12" y1="21" y2="21" stroke="gray" fill="transparent" stroke-width="1"/>
+ <line x1="10" x2="20" y1="30" y2="30" stroke="gray" fill="transparent" stroke-width="1"/>
+ <line x1="20" x2="28" y1="37" y2="37" stroke="gray" fill="transparent" stroke-width="1"/>
+ <line x1="12" x2="23" y1="42" y2="42" stroke="gray" fill="transparent" stroke-width="1"/>
+
+ <line x1="37" x2="48" y1="5" y2="5" stroke="gray" fill="transparent" stroke-width="1"/>
+ <line x1="44" x2="56" y1="12" y2="12" stroke="gray" fill="transparent" stroke-width="1"/>
+ <line x1="38" x2="44" y1="21" y2="21" stroke="gray" fill="transparent" stroke-width="1"/>
+ <line x1="42" x2="52" y1="30" y2="30" stroke="gray" fill="transparent" stroke-width="1"/>
+ <line x1="52" x2="60" y1="37" y2="37" stroke="gray" fill="transparent" stroke-width="1"/>
+ <line x1="44" x2="55" y1="42" y2="42" stroke="gray" fill="transparent" stroke-width="1"/>
+
+ <line x1="32" x2="32" y1="4" y2="14" stroke="black" fill="transparent" stroke-width="1"/>
+ <line x1="32" x2="32" y1="18" y2="30" stroke="black" fill="transparent" stroke-width="1"/>
+ <line x1="32" x2="32" y1="34" y2="43" stroke="black" fill="transparent" stroke-width="1"/>
+
+ <line x1="3" x2="61" y1="46" y2="46" stroke="gray" fill="transparent" stroke-width="1"/>
+
+ <text font-family="Sans" x="17" y="61" font-size="17" fill="DarkGreen">dict</text>
+</svg>