wok 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 | 8407f9c3f9be |
children | 1a7f0416f9b1 |
files | paper-icon-theme/receipt |
line diff
1.1 --- a/paper-icon-theme/receipt Tue Nov 01 03:56:17 2016 +0200 1.2 +++ b/paper-icon-theme/receipt Tue Nov 01 04:02:18 2016 +0200 1.3 @@ -1,18 +1,18 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="paper-icon-theme" 1.7 -VERSION="1.1" 1.8 -COMMIT="7cb5e66" 1.9 +VERSION="1.3.4" 1.10 +COMMIT="712acc0" 1.11 CATEGORY="customization" 1.12 SHORT_DESC="Simple and modern icon theme with material design influences" 1.13 MAINTAINER="al.bobylev@gmail.com" 1.14 -LICENSE="LGPL3 CC-ASA" 1.15 +LICENSE="CC-BY-SA-4" 1.16 WEB_SITE="https://snwh.org/paper/" 1.17 TARBALL="$PACKAGE-$COMMIT.tar.gz" 1.18 WGET_URL="https://github.com/snwh/paper-icon-theme/archive/$COMMIT.tar.gz" 1.19 1.20 -DEPENDS="" 1.21 -BUILD_DEPENDS="autoconf automake" 1.22 +DEPENDS="librsvg" 1.23 +BUILD_DEPENDS="autoconf automake svgcleaner" 1.24 1.25 # Rules to configure and make the package. 1.26 compile_rules() 1.27 @@ -20,9 +20,17 @@ 1.28 ./autogen.sh && 1.29 make && make install 1.30 1.31 - # make the background transparent (fix future export to png problems) 1.32 + # optimize all svg icons 1.33 for svg in $(find $install -type f -name '*.svg'); do 1.34 - sed -i "s|pageopacity='1'|pageopacity='0'|" $svg 1.35 + echo -n "${svg#*Paper/}: "; svgcleaner $svg $svg 1.36 + done 1.37 + 1.38 + # remove duplicates (keep <name>.png, remove <name>.svg) 1.39 + for svg in $(find $install -name '*.svg'); do 1.40 + if [ -e "${svg%svg}png" ]; then 1.41 + echo "Remove duplicate: ${svg#*Paper/}" 1.42 + rm "$svg" 1.43 + fi 1.44 done 1.45 } 1.46 1.47 @@ -30,4 +38,14 @@ 1.48 genpkg_rules() 1.49 { 1.50 cp -a $install/* $fs 1.51 + 1.52 + # remove hdpi icons, and huge sizes 1.53 + it="$fs/usr/share/icons/Paper/index.theme" 1.54 + for i in 8x8@2x 16x16@2x 24x24@2x 32x32@2x 48x48@2x 512x512@2x 512x512; do 1.55 + rm -r $fs/usr/share/icons/Paper/$i 1.56 + sed -i "s|$i[^,]*,||g" $it 1.57 + sed -i "/^\[$i/,/^\[/{/^\[/b;d}" $it 1.58 + sed -i "/^\[$i/d" $it 1.59 + done 1.60 + sed -i '/HiDPi/,$d' $it 1.61 }