1*4882a593SmuzhiyunSUMMARY = "Custom Matchbox session files for the Sato environment" 2*4882a593SmuzhiyunHOMEPAGE = "http://www.matchbox-project.org/" 3*4882a593SmuzhiyunBUGTRACKER = "http://bugzilla.yoctoproject.org/" 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunLICENSE = "GPL-2.0-or-later" 6*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://session;endline=3;md5=f8a5c5b9c279e52dc094d10e11c2be63" 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunSECTION = "x11" 9*4882a593SmuzhiyunRDEPENDS:${PN} = "formfactor matchbox-theme-sato matchbox-panel-2 matchbox-desktop matchbox-session gconf" 10*4882a593SmuzhiyunPR = "r30" 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun# This package is architecture specific because the session script is modified 13*4882a593Smuzhiyun# based on the machine architecture. 14*4882a593SmuzhiyunPACKAGE_ARCH = "${MACHINE_ARCH}" 15*4882a593Smuzhiyun 16*4882a593Smuzhiyuninherit features_check 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun# The matchbox-theme-sato requires x11 in DISTRO_FEATURES 19*4882a593SmuzhiyunREQUIRED_DISTRO_FEATURES = "x11" 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunSRC_URI = "file://session \ 22*4882a593Smuzhiyun file://index.theme" 23*4882a593SmuzhiyunS = "${WORKDIR}" 24*4882a593Smuzhiyun 25*4882a593SmuzhiyunFILES:${PN} += "${datadir}/themes/Sato/index.theme" 26*4882a593Smuzhiyun 27*4882a593Smuzhiyundo_install() { 28*4882a593Smuzhiyun # This is the set of machine features that the script has markers for 29*4882a593Smuzhiyun FEATURES="acpi apm phone" 30*4882a593Smuzhiyun SCRIPT="${S}/sedder" 31*4882a593Smuzhiyun rm -f $SCRIPT 32*4882a593Smuzhiyun touch $SCRIPT 33*4882a593Smuzhiyun for FEAT in $FEATURES; do 34*4882a593Smuzhiyun if echo ${MACHINE_FEATURES} | awk "/$FEAT/ {exit 1}"; then 35*4882a593Smuzhiyun echo "/feature-$FEAT/d" >> $SCRIPT 36*4882a593Smuzhiyun fi 37*4882a593Smuzhiyun done 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun install -D ${S}/index.theme ${D}/${datadir}/themes/Sato/index.theme 40*4882a593Smuzhiyun install -d ${D}/${sysconfdir}/matchbox 41*4882a593Smuzhiyun sed -f "$SCRIPT" ${S}/session > ${D}/${sysconfdir}/matchbox/session 42*4882a593Smuzhiyun chmod +x ${D}/${sysconfdir}/matchbox/session 43*4882a593Smuzhiyun} 44*4882a593Smuzhiyun 45*4882a593SmuzhiyunPACKAGE_WRITE_DEPS += "gconf-native" 46*4882a593Smuzhiyunpkg_postinst:${PN} () { 47*4882a593Smuzhiyun set_value() { 48*4882a593Smuzhiyun #type, name, value 49*4882a593Smuzhiyun gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --direct --type $1 --set /desktop/poky/interface/$2 "$3" 50*4882a593Smuzhiyun } 51*4882a593Smuzhiyun set_value string theme Adwaita 52*4882a593Smuzhiyun set_value string matchbox_theme Sato 53*4882a593Smuzhiyun set_value string icon_theme Sato 54*4882a593Smuzhiyun set_value bool touchscreen true 55*4882a593Smuzhiyun set_value string font_name "Sans 9" 56*4882a593Smuzhiyun} 57