summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorPhilipp Zabel <philipp.zabel@gmail.com>2007-09-16 09:49:14 +0000
committerPhilipp Zabel <philipp.zabel@gmail.com>2007-09-16 09:49:14 +0000
commit97b3461578bf4bc36f9a043cfeaecfca692ab27b (patch)
treecd235193dca07391ed1d014b582dfd1fe0ff5e3d /packages
parent25b5ef3085788aaffccb732b628f09ff5d77c61a (diff)
openmoko-icon-theme-standard2-qvga: icon theme for qvga devices
* this recipe is a hack that rescales (from svgs or pngs) the stock icons in openmoko-icon-theme-standard2 to 22x22 and removes the bigger stock icons as well as the 128x128 icons. * needs convert and rsvg, their native recipes are still missing
Diffstat (limited to 'packages')
-rw-r--r--packages/openmoko2/openmoko-icon-theme-standard2-qvga_svn.bb54
1 files changed, 54 insertions, 0 deletions
diff --git a/packages/openmoko2/openmoko-icon-theme-standard2-qvga_svn.bb b/packages/openmoko2/openmoko-icon-theme-standard2-qvga_svn.bb
new file mode 100644
index 0000000000..723042da94
--- /dev/null
+++ b/packages/openmoko2/openmoko-icon-theme-standard2-qvga_svn.bb
@@ -0,0 +1,54 @@
+DESCRIPTION = "Standard Gtk+ icon theme for the OpenMoko distribution, QVGA edition"
+SECTION = "openmoko/base"
+PV = "0.1.0+svn${SVNREV}"
+PR = "r0"
+
+inherit openmoko2
+
+SRC_URI = "svn://svn.openmoko.org/trunk/src/target/OM-2007.2/artwork/;module=icons;proto=http"
+S = "${WORKDIR}/icons"
+
+pkg_postinst_${PN} () {
+ if [ "x$D" != "x" ]; then
+ exit 1
+ fi
+ gtk-update-icon-cache -q /usr/share/icons/openmoko-standard
+}
+
+do_configure_prepend () {
+ cd ${S}
+ #
+ # don't include 36x36 and 128x128 icons, 32x32 and 48x48 stock icons
+ #
+ sed -i -e "/\(36\|128\)/d" -e "/\(32\|48\)\/stock/d" configure.ac
+ cd openmoko-standard
+ sed -i -e "s/\(36x36\|128x128\) //g" Makefile.am
+ sed -i "/^SUBDIRS=/s/ stock//" {32x32,48x48}/Makefile.am
+ #
+ # rescale stock icons to 22x22
+ #
+ for png in $(ls */stock/*.png | sed "s,.*/,," | sort | uniq); do
+ svg=scalable/stock/$(basename $png .png).svg
+ out=22x22/stock/$png
+ if [ -f $svg ]; then
+ #
+ # if there are vector graphics, rerender
+ #
+ rsvg -w 22 -h 22 $svg $out
+ else
+ #
+ # otherwise rescale biggest existing bitmap
+ #
+ png=$(echo */stock/$png | sed "s/.* //")
+ convert -scale 22x22 $png $out
+ fi
+ done
+ #
+ # register the rescaled icons with automake
+ #
+ cd 22x22/stock
+ sed -i "/^icons_DATA/s/=.*/= $(echo *.png)/" Makefile.am
+ cd ${S}
+}
+
+PACKAGE_ARCH = "all"