Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Custom Matchbox session files for the Sato environment" |
| 2 | HOMEPAGE = "http://www.matchbox-project.org/" |
| 3 | BUGTRACKER = "http://bugzilla.yoctoproject.org/" |
| 4 | |
| 5 | LICENSE = "GPLv2.0+" |
| 6 | LIC_FILES_CHKSUM = "file://session;endline=3;md5=f8a5c5b9c279e52dc094d10e11c2be63" |
| 7 | |
| 8 | SECTION = "x11" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 9 | RDEPENDS_${PN} = "formfactor matchbox-theme-sato matchbox-panel-2 matchbox-desktop matchbox-session gconf" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 10 | PR = "r30" |
| 11 | |
| 12 | # This package is architecture specific because the session script is modified |
| 13 | # based on the machine architecture. |
| 14 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 15 | |
Brad Bishop | 6dbb316 | 2019-11-25 09:41:34 -0500 | [diff] [blame^] | 16 | inherit features_check |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 17 | |
| 18 | # The matchbox-theme-sato requires x11 in DISTRO_FEATURES |
| 19 | REQUIRED_DISTRO_FEATURES = "x11" |
| 20 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 21 | SRC_URI = "file://session \ |
| 22 | file://index.theme" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 23 | S = "${WORKDIR}" |
| 24 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 25 | FILES_${PN} += "${datadir}/themes/Sato/index.theme" |
| 26 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 27 | do_install() { |
| 28 | # This is the set of machine features that the script has markers for |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 29 | FEATURES="acpi apm phone" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 30 | SCRIPT="${S}/sedder" |
| 31 | rm -f $SCRIPT |
| 32 | touch $SCRIPT |
| 33 | for FEAT in $FEATURES; do |
| 34 | if echo ${MACHINE_FEATURES} | awk "/$FEAT/ {exit 1}"; then |
| 35 | echo "/feature-$FEAT/d" >> $SCRIPT |
| 36 | fi |
| 37 | done |
| 38 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 39 | install -D ${S}/index.theme ${D}/${datadir}/themes/Sato/index.theme |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 40 | install -d ${D}/${sysconfdir}/matchbox |
| 41 | sed -f "$SCRIPT" ${S}/session > ${D}/${sysconfdir}/matchbox/session |
| 42 | chmod +x ${D}/${sysconfdir}/matchbox/session |
| 43 | } |
| 44 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 45 | PACKAGE_WRITE_DEPS += "gconf-native" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 46 | pkg_postinst_${PN} () { |
| 47 | set_value() { |
| 48 | #type, name, value |
| 49 | gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --direct --type $1 --set /desktop/poky/interface/$2 "$3" |
| 50 | } |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 51 | set_value string theme Adwaita |
| 52 | set_value string matchbox_theme Sato |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 53 | set_value string icon_theme Sato |
| 54 | set_value bool touchscreen true |
| 55 | set_value string font_name "Sans 9" |
| 56 | } |