wok view tazpanel-ttf-css/receipt @ rev 18156
Add: tazpanel-ttf-css. Fix duplicate: slitaz-base-files (277)
author | Xander Ziiryanoff <psychomaniak@xakep.ru> |
---|---|
date | Sun Jun 21 22:56:45 2015 +0300 (2015-06-21) |
parents | |
children | e12b8d32e95b |
line source
1 # SliTaz package receipt.
3 PACKAGE="tazpanel-ttf-css"
4 VERSION="501"
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|||; s|z|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 }