wok-next diff tazpanel-ttf-css/receipt @ rev 18187

Up lessfs (1.7.0)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jul 08 11:52:12 2015 +0200 (2015-07-08)
parents
children e12b8d32e95b
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tazpanel-ttf-css/receipt	Wed Jul 08 11:52:12 2015 +0200
     1.3 @@ -0,0 +1,47 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="tazpanel-ttf-css"
     1.7 +VERSION="501"
     1.8 +CATEGORY="misc"
     1.9 +SHORT_DESC="Enables tazpanel.ttf icons in opera browser"
    1.10 +MAINTAINER="psychomaniak@xakep.ru"
    1.11 +LICENSE="BSD"
    1.12 +SOURCE="tazpanel"
    1.13 +TARBALL="$SOURCE-$VERSION.tar.gz"
    1.14 +WEB_SITE="http://www.slitaz.org/"
    1.15 +WGET_URL="http://hg.slitaz.org/tazpanel/archive/$VERSION.tar.gz"
    1.16 +
    1.17 +DEPENDS="tazpanel"
    1.18 +BUILD_DEPENDS="fontforge"
    1.19 +
    1.20 +# Rules to configure and make the package.
    1.21 +compile_rules()
    1.22 +{
    1.23 +	cd $src/styles/default
    1.24 +	cat > ttf2svg.pe <<EOF
    1.25 +#!/usr/bin/fontforge
    1.26 +Open(\$1)
    1.27 +Generate(\$1:r + ".svg")
    1.28 +EOF
    1.29 +	chmod +x ttf2svg.pe
    1.30 +	fontforge --script ttf2svg.pe tazpanel.ttf
    1.31 +
    1.32 +	for i in $(fgrep 'glyph-name="uniF1' tazpanel.svg | sed 's/ //g'); do
    1.33 +		name=$(expr ${i/;/}| cut -d'"' -f4 | sed 's|&#x3||; s|&#x7a|z|')
    1.34 +		addr=$(expr ${i/uni/\\} | cut -d'"' -f2)
    1.35 +		cat >> presto.css <<EOT
    1.36 +[data-icon="${name}"]::before, [data-img="${name}"]::before {
    1.37 +	content: '${addr}';
    1.38 +}
    1.39 +EOT
    1.40 +	done
    1.41 +}
    1.42 +
    1.43 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.44 +genpkg_rules()
    1.45 +{
    1.46 +	S="$fs/var/www/tazpanel/styles/default"
    1.47 +	mkdir -p $S
    1.48 +	cp $src/styles/default/presto.css $S
    1.49 +}
    1.50 +