wok view paper-icon-theme/receipt @ rev 19479

paper-icon-theme: update from git, make package a way smaller (remove HiDPI icons and shrink svg icons)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Nov 01 04:02:18 2016 +0200 (2016-11-01)
parents 40fab26c175d
children cf98dd06cfca
line source
1 # SliTaz package receipt.
3 PACKAGE="paper-icon-theme"
4 VERSION="1.3.4"
5 COMMIT="712acc0"
6 CATEGORY="customization"
7 SHORT_DESC="Simple and modern icon theme with material design influences"
8 MAINTAINER="al.bobylev@gmail.com"
9 LICENSE="CC-BY-SA-4"
10 WEB_SITE="https://snwh.org/paper/"
11 TARBALL="$PACKAGE-$COMMIT.tar.gz"
12 WGET_URL="https://github.com/snwh/paper-icon-theme/archive/$COMMIT.tar.gz"
14 DEPENDS="librsvg"
15 BUILD_DEPENDS="autoconf automake svgcleaner"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 ./autogen.sh &&
21 make && make install
23 # optimize all svg icons
24 for svg in $(find $install -type f -name '*.svg'); do
25 echo -n "${svg#*Paper/}: "; svgcleaner $svg $svg
26 done
28 # remove duplicates (keep <name>.png, remove <name>.svg)
29 for svg in $(find $install -name '*.svg'); do
30 if [ -e "${svg%svg}png" ]; then
31 echo "Remove duplicate: ${svg#*Paper/}"
32 rm "$svg"
33 fi
34 done
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 cp -a $install/* $fs
42 # remove hdpi icons, and huge sizes
43 it="$fs/usr/share/icons/Paper/index.theme"
44 for i in 8x8@2x 16x16@2x 24x24@2x 32x32@2x 48x48@2x 512x512@2x 512x512; do
45 rm -r $fs/usr/share/icons/Paper/$i
46 sed -i "s|$i[^,]*,||g" $it
47 sed -i "/^\[$i/,/^\[/{/^\[/b;d}" $it
48 sed -i "/^\[$i/d" $it
49 done
50 sed -i '/HiDPi/,$d' $it
51 }