increase dvbapp PR.
[vuplus_openembedded] / recipes / openmoko2 / openmoko-icon-theme-standard2-qvga_svn.bb
1 DESCRIPTION = "Standard Gtk+ icon theme for the Openmoko framework, QVGA edition"
2 SECTION = "openmoko/base"
3 DEPENDS = "imagemagick-native librsvg-native"
4 PV = "0.1.0+svnr${SRCPV}"
5 PR = "r2"
6
7 EXCLUDE_FROM_WORLD = "1"
8
9 inherit openmoko2
10
11 SRC_URI = "svn://svn.openmoko.org/trunk/src/target/OM-2007.2/artwork/;module=icons;proto=http"
12 S = "${WORKDIR}/icons"
13
14 pkg_postinst_${PN} () {
15     if [ "x$D" != "x" ]; then
16         exit 1
17     fi
18     gtk-update-icon-cache -q /usr/share/icons/openmoko-standard
19 }
20
21 do_configure_prepend () {
22         cd ${S}
23         #
24         # don't include 36x36 and 128x128 icons, 32x32 and 48x48 stock icons
25         #
26         sed -i -e "/\(36\|128\)/d" -e "/\(32\|48\)\/stock/d" configure.ac
27         cd openmoko-standard
28         sed -i -e "s/\(36x36\|128x128\) //g" Makefile.am
29         sed -i "/^SUBDIRS=/s/ stock//" {32x32,48x48}/Makefile.am 
30         #
31         # rescale stock icons to 22x22
32         #
33         for png in $(ls */stock/*.png | sed "s,.*/,," | sort | uniq); do
34                 svg=scalable/stock/$(basename $png .png).svg
35                 out=22x22/stock/$png
36                 if [ -f $svg ]; then
37                         #
38                         # if there are vector graphics, rerender
39                         #
40                         rsvg -w 22 -h 22 $svg $out
41                 else
42                         #
43                         # otherwise rescale biggest existing bitmap
44                         #
45                         png=$(echo */stock/$png | sed "s/.* //")
46                         convert -scale 22x22 $png $out
47                 fi
48         done
49         #
50         # register the rescaled icons with automake
51         #
52         cd 22x22/stock
53         sed -i "/^icons_DATA/s/=.*/= $(echo *.png)/" Makefile.am
54         cd ${S}
55 }
56
57 PACKAGE_ARCH = "all"