wok-6.x view tazpanel-ttf-css/receipt @ rev 18251

Up tazpanel (517)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Aug 03 10:18:09 2015 +0200 (2015-08-03)
parents e12b8d32e95b
children c6036b12bcaf
line source
1 # SliTaz package receipt.
3 PACKAGE="tazpanel-ttf-css"
4 VERSION="517"
5 CATEGORY="misc"
6 SHORT_DESC="Enables tazpanel.ttf icons in opera browser"
7 MAINTAINER="psychomaniak@xakep.ru"
8 LICENSE="BSD"
9 SOURCE="tazpanel"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WEB_SITE="http://www.slitaz.org/"
12 WGET_URL="http://hg.slitaz.org/tazpanel/archive/$VERSION.tar.gz"
14 DEPENDS="tazpanel"
15 BUILD_DEPENDS="fontforge"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src/styles/default
21 cat > ttf2svg.pe <<EOF
22 #!/usr/bin/fontforge
23 Open(\$1)
24 Generate(\$1:r + ".svg")
25 EOF
26 chmod +x ttf2svg.pe
27 fontforge --script ttf2svg.pe tazpanel.ttf
29 for i in $(fgrep 'glyph-name="uniF1' tazpanel.svg | sed 's/ //g'); do
30 name=$(expr ${i/;/}| cut -d'"' -f4 | sed 's|&#x3||; s|&#x7a|z|')
31 addr=$(expr ${i/uni/\\} | cut -d'"' -f2)
32 cat >> presto.css <<EOT
33 [data-icon="${name}"]::before, [data-img="${name}"]::before {
34 content: '${addr}';
35 }
36 EOT
37 done
38 }
40 # Rules to gen a SliTaz package suitable for Tazpkg.
41 genpkg_rules()
42 {
43 S="$fs/var/www/tazpanel/styles/default"
44 mkdir -p $S
45 cp $src/styles/default/presto.css $S
46 }