# HG changeset patch # User Aleksej Bobylev # Date 1477965738 -7200 # Node ID 3498b49b1fc92a84b4ef562ff3653dc470e61767 # Parent 8407f9c3f9bec8004048403999df0acc535eeed6 paper-icon-theme: update from git, make package a way smaller (remove HiDPI icons and shrink svg icons) diff -r 8407f9c3f9be -r 3498b49b1fc9 paper-icon-theme/receipt --- a/paper-icon-theme/receipt Tue Nov 01 03:56:17 2016 +0200 +++ b/paper-icon-theme/receipt Tue Nov 01 04:02:18 2016 +0200 @@ -1,18 +1,18 @@ # SliTaz package receipt. PACKAGE="paper-icon-theme" -VERSION="1.1" -COMMIT="7cb5e66" +VERSION="1.3.4" +COMMIT="712acc0" CATEGORY="customization" SHORT_DESC="Simple and modern icon theme with material design influences" MAINTAINER="al.bobylev@gmail.com" -LICENSE="LGPL3 CC-ASA" +LICENSE="CC-BY-SA-4" WEB_SITE="https://snwh.org/paper/" TARBALL="$PACKAGE-$COMMIT.tar.gz" WGET_URL="https://github.com/snwh/paper-icon-theme/archive/$COMMIT.tar.gz" -DEPENDS="" -BUILD_DEPENDS="autoconf automake" +DEPENDS="librsvg" +BUILD_DEPENDS="autoconf automake svgcleaner" # Rules to configure and make the package. compile_rules() @@ -20,9 +20,17 @@ ./autogen.sh && make && make install - # make the background transparent (fix future export to png problems) + # optimize all svg icons for svg in $(find $install -type f -name '*.svg'); do - sed -i "s|pageopacity='1'|pageopacity='0'|" $svg + echo -n "${svg#*Paper/}: "; svgcleaner $svg $svg + done + + # remove duplicates (keep .png, remove .svg) + for svg in $(find $install -name '*.svg'); do + if [ -e "${svg%svg}png" ]; then + echo "Remove duplicate: ${svg#*Paper/}" + rm "$svg" + fi done } @@ -30,4 +38,14 @@ genpkg_rules() { cp -a $install/* $fs + + # remove hdpi icons, and huge sizes + it="$fs/usr/share/icons/Paper/index.theme" + for i in 8x8@2x 16x16@2x 24x24@2x 32x32@2x 48x48@2x 512x512@2x 512x512; do + rm -r $fs/usr/share/icons/Paper/$i + sed -i "s|$i[^,]*,||g" $it + sed -i "/^\[$i/,/^\[/{/^\[/b;d}" $it + sed -i "/^\[$i/d" $it + done + sed -i '/HiDPi/,$d' $it }