wok annotate 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
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@19479 23 # optimize all svg icons
al@19109 24 for svg in $(find $install -type f -name '*.svg'); do
al@19479 25 echo -n "${svg#*Paper/}: "; svgcleaner $svg $svg
al@19479 26 done
al@19479 27
al@19479 28 # remove duplicates (keep <name>.png, remove <name>.svg)
al@19479 29 for svg in $(find $install -name '*.svg'); do
al@19479 30 if [ -e "${svg%svg}png" ]; then
al@19479 31 echo "Remove duplicate: ${svg#*Paper/}"
al@19479 32 rm "$svg"
al@19479 33 fi
al@19109 34 done
al@19013 35 }
al@19013 36
al@19013 37 # Rules to gen a SliTaz package suitable for Tazpkg.
al@19013 38 genpkg_rules()
al@19013 39 {
al@19013 40 cp -a $install/* $fs
al@19479 41
al@19479 42 # remove hdpi icons, and huge sizes
al@19479 43 it="$fs/usr/share/icons/Paper/index.theme"
al@19479 44 for i in 8x8@2x 16x16@2x 24x24@2x 32x32@2x 48x48@2x 512x512@2x 512x512; do
al@19479 45 rm -r $fs/usr/share/icons/Paper/$i
al@19479 46 sed -i "s|$i[^,]*,||g" $it
al@19479 47 sed -i "/^\[$i/,/^\[/{/^\[/b;d}" $it
al@19479 48 sed -i "/^\[$i/d" $it
al@19479 49 done
al@19479 50 sed -i '/HiDPi/,$d' $it
al@19013 51 }