wok-current view tazpanel-ttf-css/receipt @ rev 18717

Up tor (0.2.7.6)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Dec 17 13:30:03 2015 +0100 (2015-12-17)
parents 0da56c065d14
children d94dea3c101e
line source
1 # SliTaz package receipt.
3 PACKAGE="tazpanel-ttf-css"
4 VERSION="558"
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 }