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

Up tazpanel(522)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Aug 07 02:40:28 2015 +0300 (2015-08-07)
parents c6036b12bcaf
children e4eed57a72a5
line source
1 # SliTaz package receipt.
3 PACKAGE="tazpanel-ttf-css"
4 VERSION="522"
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 }