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