Skip to content
This repository was archived by the owner on Oct 26, 2021. It is now read-only.

Commit 617d455

Browse files
mirzakgunnarx
authored andcommitted
hmi-apps: unified structure
There was a lot of duplication in the application recipes which I try to remedy here with the apps.inc (former ics-apps.inc which was unused). The main changes here are: - application recipes use the apps.inc which contains the common parts of an application recipe - Resources are installed according to AppStream guidelines - /usr/share/applications (desktop file) - /usr/share/app-info/icons/%{origin}/%{size} (icons) - DISTRO_VERSION used as "origin" - application executables are put in /usr/apps - No real "standard" exists for application binaries We are adopting the UsrMove system layout. https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/ Which is a requirement for usage of libostree. [GDP-611] Prepare system for libostree Signed-off-by: Mirza Krak <mirza.krak@endian.se>
1 parent b6bd9d5 commit 617d455

File tree

11 files changed

+99
-180
lines changed

11 files changed

+99
-180
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
APPLICATION_ICON_SIZE ?= "64x64"
2+
APPLICATION_ICON_TARGET_PATH ?= "${datadir}/app-info/icons/${DISTRO_VERSION}/${APPLICATION_ICON_SIZE}/com.genivi.gdp.${PN}.svg"
3+
APPLICATION_DIR ?= "${exec_prefix}/apps"
4+
APPLICATION_DIR_TARGET_PATH ?= "${APPLICATION_DIR}/${PN}/bin/"
5+
APPLICATION_BIN_TARGET_PATH ?= "${APPLICATION_DIR_TARGET_PATH}/${PN}"
6+
APPLICATION_UNIT ?= ""
7+
8+
inherit qmake5
9+
10+
S = "${WORKDIR}/git"
11+
12+
# Aligned with AppStream guidelines for install locations
13+
do_install() {
14+
install -d ${D}${APPLICATION_DIR}/${PN}/bin
15+
install -m 0555 ${APPLICATION_BIN} ${D}${APPLICATION_BIN_TARGET_PATH}
16+
17+
install -d ${D}${datadir}/app-info/icons/${DISTRO_VERSION}/${APPLICATION_ICON_SIZE}/
18+
install -m 0644 ${APPLICATION_ICON} ${D}${APPLICATION_ICON_TARGET_PATH}
19+
20+
sed -i -e 's#[@]APPLICATION_ICON_TARGET_PATH[@]#${APPLICATION_ICON_TARGET_PATH}#' ${WORKDIR}/${APPLICATION_DESKTOP_FILE}
21+
sed -i -e 's#[@]APPLICATION_BIN_TARGET_PATH[@]#${APPLICATION_BIN_TARGET_PATH}#' ${WORKDIR}/${APPLICATION_DESKTOP_FILE}
22+
sed -i -e 's#[@]APPLICATION_UNIT[@]#${APPLICATION_UNIT}#' ${WORKDIR}/${APPLICATION_DESKTOP_FILE}
23+
24+
install -d ${D}${datadir}/applications/
25+
install -m 0444 ${WORKDIR}/${APPLICATION_DESKTOP_FILE} \
26+
${D}${datadir}/applications/
27+
}
28+
29+
FILES_${PN} += "\
30+
${datadir}/app-info/icons \
31+
${APPLICATION_DIR} \
32+
"

meta-genivi-dev/meta-genivi-dev/recipes-dev-hmi/genivi-dev-platform-hmi/bluetoothpairingapp/com.genivi.gdp.bluetoothPairingApp.desktop

Lines changed: 0 additions & 6 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[Desktop Entry]
2+
Name=BluetoothPairingApp
3+
Type=Application
4+
Icon=file://@APPLICATION_ICON_TARGET_PATH@
5+
Exec=@APPLICATION_BIN_TARGET_PATH@
6+
Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,21 @@
1-
# Copyright (C) 2017 GENIVI Alliance
1+
# Copyright (C) 2017-2018 GENIVI Alliance
22
# Released under the MIT license (see LICENSE for the terms)
3-
4-
DESCRIPTION = "Application used to pair bluetooth devices"
3+
SUMMARY = "Simple application for pairing bluetooth devices"
4+
HOMEPAGE = "https://github.com/genivi/bluetoothPairingApp"
55
LICENSE = "MPL-2.0"
66
LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad"
77

88
DEPENDS = "qtbase qtdeclarative"
9-
109
RDEPENDS_${PN} = "blueconnect"
1110

12-
inherit qmake5
13-
14-
SRC_URI = "git://github.com/genivi/bluetoothPairingApp;branch=master"
11+
SRC_URI = "\
12+
git://github.com/genivi/bluetoothPairingApp;branch=master \
13+
file://${APPLICATION_DESKTOP_FILE} \
14+
"
1515
SRCREV = "ad09140f7fb2ce3056a3827729bc833fbb485e8f"
1616

17-
APP = "com.genivi.gdp.bluetoothPairingApp"
18-
EXE = "bluetoothPairingApp"
19-
DESKTOP_FILE = "${APP}.desktop"
20-
SRC_URI_append = " file://${DESKTOP_FILE}"
21-
22-
S = "${WORKDIR}/git"
23-
24-
do_install_append() {
25-
install -d ${D}/opt/${APP}/bin
26-
install -m 0555 ${EXE} \
27-
${D}/opt/${APP}/bin/${EXE}
28-
29-
install -m 0644 ${S}/bluetooth.svg \
30-
${D}/opt/${APP}/bluetooth.svg
31-
32-
install -d ${D}${datadir}/applications
33-
install -m 0444 ${WORKDIR}/${DESKTOP_FILE} \
34-
${D}${datadir}/applications/${DESKTOP_FILE}
35-
}
17+
APPLICATION_DESKTOP_FILE = "com.genivi.gdp.${PN}.desktop"
18+
APPLICATION_BIN = "${B}/bluetoothPairingApp"
19+
APPLICATION_ICON = "${S}/bluetooth.svg"
3620

37-
FILES_${PN} += "\
38-
/opt/${APP} \
39-
"
21+
require apps.inc
Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,21 @@
1-
# Copyright (C) 2015-2016 GENIVI Alliance
1+
# Copyright (C) 2015-2018 GENIVI Alliance
22
# Released under the MIT license (see COPYING.MIT for the terms)
3-
3+
SUMMARY = "Connected Home"
4+
HOMEPAGE = "https://github.com/GENIVI/connected-home"
45
LICENSE = "MPL-2.0"
56
LIC_FILES_CHKSUM = "file://LICENSE;md5=9741c346eef56131163e13b9db1241b3"
6-
SRC_URI = "git://github.com/GENIVI/connected-home"
7-
SRCREV = "2847ab9547be807d0767c69b0c0df7c90461fc6e"
8-
97

10-
SUMMARY = "Connected Home"
118
DEPENDS = "qtbase qtdeclarative"
129

13-
S = "${WORKDIR}/git"
14-
15-
inherit qmake5
16-
17-
APP = "com.genivi.gdp.${PN}"
18-
EXE = "qt-smart-demo"
19-
20-
SRC_URI_append ="\
21-
file://${APP}.desktop \
22-
"
23-
24-
25-
do_install_append() {
26-
install -Dm 644 ${WORKDIR}/git/${APP}.svg \
27-
${D}/opt/${APP}/share/icons/${APP}.svg
28-
29-
install -Dm 555 ${EXE} \
30-
${D}/opt/${APP}/bin/${EXE}
31-
32-
install -Dm 644 ${WORKDIR}/${APP}.desktop \
33-
${D}/usr/share/applications/${APP}.desktop
10+
SRC_URI = "\
11+
git://github.com/GENIVI/connected-home \
12+
file://${APPLICATION_DESKTOP_FILE} \
13+
"
14+
SRCREV = "2847ab9547be807d0767c69b0c0df7c90461fc6e"
3415

35-
install -d ${WORKDIR}/git/imports \
36-
${D}/opt/${APP}/bin/imports
37-
}
16+
APPLICATION_DESKTOP_FILE = "com.genivi.gdp.${PN}.desktop"
17+
APPLICATION_BIN = "${B}/qt-smart-demo"
18+
APPLICATION_ICON = "${S}/com.genivi.gdp.${PN}.svg"
19+
APPLICATION_UNIT = "com.genivi.gdp.connectedhome"
3820

39-
FILES_${PN} += "\
40-
/opt/${APP} \
41-
/usr/bin/${EXE} \
42-
${libdir} \
43-
${libdir}/systemd \
44-
${libdir}/systemd/user \
45-
${libdir}/systemd/user/* \
46-
"
21+
require apps.inc
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[Desktop Entry]
22
Name=Connected Home
33
Type=Application
4-
Icon=file://opt/com.genivi.gdp.connectedhome/share/icons/com.genivi.gdp.connectedhome.svg
5-
Unit=com.genivi.gdp.connectedhome
6-
Exec=bwrap --ro-bind / / --dev-bind /dev/dri/ /dev/dri --unshare-user --uid 128 --gid 512 /opt/com.genivi.gdp.connectedhome/bin/qt-smart-demo -platform wayland
4+
Icon=file://@APPLICATION_ICON_TARGET_PATH@
5+
Unit=@APPLICATION_UNIT@
6+
Exec=bwrap --ro-bind / / --dev-bind /dev/dri/ /dev/dri --unshare-user --uid 128 --gid 512 @APPLICATION_BIN_TARGET_PATH@
Lines changed: 13 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,22 @@
1-
# Copyright (C) 2015-2016 GENIVI Alliance
1+
# Copyright (C) 2015-2018 GENIVI Alliance
22
# Released under the MIT license (see COPYING.MIT for the terms)
3-
3+
SUMMARY = "FM Radio"
4+
HOMEPAGE = "https://github.com/GENIVI/FMRadio"
45
LICENSE = "MPL-2.0"
56
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=815ca599c9df247a0c7f619bab123dad"
6-
SRC_URI = "git://github.com/genivi/FMRadio"
7-
SRCREV = "7d30d07884921affc89901185db2ef743fb41909"
87

9-
SUMMARY = "FM Radio"
108
DEPENDS = "qtbase qtdeclarative"
119
RDEPENDS_${PN} = "qtquickcontrols-qmlplugins bubblewrap"
1210

13-
SRC_URI_append ="\
14-
file://com.genivi.gdp.fmradio.desktop \
15-
"
16-
17-
S = "${WORKDIR}/git"
18-
19-
inherit qmake5
20-
21-
APP = "com.genivi.gdp.${PN}"
22-
EXE = "fm-radio-app"
23-
24-
do_install_append() {
25-
install -d ${D}/opt/${APP}/share/icons
26-
install -m 0444 ${WORKDIR}/git/${APP}.svg \
27-
${D}/opt/${APP}/share/icons/${APP}.svg
28-
29-
install -d ${D}/opt/${APP}/bin
30-
install -m 0555 ${EXE} \
31-
${D}/opt/${APP}/bin/${EXE}
32-
33-
install -d ${D}/usr/share/applications
34-
install -m 0444 ${WORKDIR}/${APP}.desktop \
35-
${D}/usr/share/applications/${APP}.desktop
11+
SRC_URI = "\
12+
git://github.com/genivi/FMRadio \
13+
file://${APPLICATION_DESKTOP_FILE} \
14+
"
15+
SRCREV = "7d30d07884921affc89901185db2ef743fb41909"
3616

37-
install -d ${D}/usr/lib/systemd/user/
38-
install -d ${WORKDIR}/git/imports \
39-
${D}/opt/${APP}/bin/imports
40-
}
17+
APPLICATION_DESKTOP_FILE = "com.genivi.gdp.${PN}.desktop"
18+
APPLICATION_BIN = "${B}/fm-radio-app"
19+
APPLICATION_ICON = "${S}/com.genivi.gdp.${PN}.svg"
20+
APPLICATION_UNIT = "com.genivi.gdp.fmradio"
4121

42-
FILES_${PN} += "\
43-
/opt/${APP} \
44-
/usr/bin/${EXE} \
45-
${libdir} \
46-
${libdir}/systemd \
47-
${libdir}/systemd/user \
48-
${libdir}/systemd/user/* \
49-
"
22+
require apps.inc
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[Desktop Entry]
22
Name=FM Radio
33
Type=Application
4-
Icon=file://opt/com.genivi.gdp.fmradio/share/icons/com.genivi.gdp.fmradio.svg
5-
Unit=com.genivi.gdp.fmradio
6-
Exec=bwrap --ro-bind / / --dev-bind /dev/dri/ /dev/dri --unshare-user --uid 128 --gid 512 /opt/com.genivi.gdp.fmradio/bin/fm-radio-app -platform wayland
4+
Icon=file://@APPLICATION_ICON_TARGET_PATH@
5+
Unit=@APPLICATION_UNIT@
6+
Exec=bwrap --ro-bind / / --dev-bind /dev/dri/ /dev/dri --unshare-user --uid 128 --gid 512 @APPLICATION_BIN_TARGET_PATH@
Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,27 @@
1-
# Copyright (C) 2015-2016 GENIVI Alliance
1+
# Copyright (C) 2015-2018 GENIVI Alliance
22
# Released under the MIT license (see COPYING.MIT for the terms)
3-
3+
SUMMARY = "GDP HVAC app with D-BUS interface"
4+
HOMEPAGE = "https://github.com/GENIVI/HVAC"
45
LICENSE = "MPL-2.0"
56
LIC_FILES_CHKSUM = "file://LICENSE;md5=9741c346eef56131163e13b9db1241b3"
6-
SRC_URI = "git://github.com/GENIVI/HVAC"
7-
SRCREV = "dc5185223e7301807ce1a12c8f30528851fb4dc8"
87

9-
SUMMARY = "HVAC"
108
DEPENDS = "qtbase qtdeclarative dbus"
119
RDEPENDS_${PN} = "qtquickcontrols-qmlplugins"
1210

13-
S = "${WORKDIR}/git"
14-
15-
inherit qmake5
16-
17-
APP = "com.genivi.gdp.${PN}"
18-
EXE = "HVAC_rvi_vtc1010"
11+
SRC_URI = "\
12+
git://github.com/GENIVI/HVAC \
13+
file://${APPLICATION_DESKTOP_FILE} \
14+
"
15+
SRCREV = "dc5185223e7301807ce1a12c8f30528851fb4dc8"
1916

20-
SRC_URI_append ="\
21-
file://${APP}.desktop \
22-
"
17+
APPLICATION_DESKTOP_FILE = "com.genivi.gdp.${PN}.desktop"
18+
APPLICATION_BIN = "${B}/HVAC_rvi_vtc1010"
19+
APPLICATION_ICON = "${S}/com.genivi.gdp.${PN}.svg"
20+
APPLICATION_UNIT = "com.genivi.gdp.hvac"
2321

22+
require apps.inc
2423

2524
do_install_append() {
26-
install -d ${D}/opt/com.genivi.gdp.hvac/bin/imports/
27-
cp -fr ${S}/imports/* ${D}/opt/com.genivi.gdp.hvac/bin/imports/
28-
install -d ${D}/opt/com.genivi.gdp.hvac/bin/
29-
30-
install -Dm 0444 ${WORKDIR}/git/${APP}.svg \
31-
${D}/opt/${APP}/share/icons/${APP}.svg
32-
33-
install -Dm 0555 ${EXE} \
34-
${D}/opt/${APP}/bin/${EXE}
35-
36-
install -Dm 0644 ${WORKDIR}/${APP}.desktop \
37-
${D}/usr/share/applications/${APP}.desktop
25+
install -d ${D}${APPLICATION_DIR_TARGET_PATH}/imports
26+
cp -fr ${S}/imports/* ${D}${APPLICATION_DIR_TARGET_PATH}/imports
3827
}
39-
40-
FILES_${PN} += "\
41-
/opt/* \
42-
${libdir} \
43-
${libdir}/systemd \
44-
${libdir}/systemd/user \
45-
${libdir}/systemd/user/* \
46-
/usr/share/* \
47-
"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[Desktop Entry]
22
Name=Climate Controls
33
Type=Application
4-
Icon=file://opt/com.genivi.gdp.hvac/share/icons/com.genivi.gdp.hvac.svg
5-
Unit=com.genivi.gdp.hvac
6-
Exec=bwrap --ro-bind / / --dev-bind /run /run --dev-bind /dev/dri/ /dev/dri --unshare-user /opt/com.genivi.gdp.hvac/bin/HVAC_rvi_vtc1010
4+
Icon=file://@APPLICATION_ICON_TARGET_PATH@
5+
Unit=@APPLICATION_UNIT@
6+
Exec=bwrap --ro-bind / / --dev-bind /run /run --dev-bind /dev/dri/ /dev/dri --unshare-user @APPLICATION_BIN_TARGET_PATH@

0 commit comments

Comments
 (0)