summaryrefslogtreecommitdiff
path: root/meta-tizen-ivi/recipes-graphics/weston-ivi/weston-ivi.inc
blob: b7b315ddc07c50b398c6e414345a9c9ee3d027f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
DESCRIPTION = "Tizen IVI Weston configuration and set-up"
HOMEPAGE = "http://nohomepage.org"
SECTION = "Automotive/Configuration"
LICENSE = "MIT"
PV = "1"

SRC_URI = ""

S = "${WORKDIR}/git"

inherit manifest autotools-brokensep

BBCLASSEXTEND = ""
PROVIDES = ""

#PROVIDES by weston-ivi-config-modello
PROVIDES += "weston-ivi-config-modello"


#PROVIDES by weston-ivi-config
PROVIDES += "weston-ivi-config"


#PROVIDES by weston-ivi
# the PROVIDES rules is ignore "weston-startup  "
PROVIDES += "weston-startup"
RPROVIDES_weston-ivi += "weston-startup"


RDEPENDS = ""
#RDEPENDS of weston-ivi-config-modello (${PN}-config-modello)
RDEPENDS_${PN}-config-modello += "weekeyboard"
RDEPENDS_${PN}-config-modello += "sed"

#RDEPENDS of weston-ivi-config (${PN}-config)
RDEPENDS_${PN}-config += "weekeyboard"


DEPENDS = ""

do_prep() {
 cd ${S}
 chmod -Rf a+rX,u+w,g-w,o-w ${S}
 #setup -q
 cp ${S}/packaging/weston-ivi.manifest .
 
 
}
do_patch_append() {
    bb.build.exec_func('do_prep', d)
}

do_configure() {
}

do_compile() {
 cd ${S}
 LANG=C
 export LANG
 unset DISPLAY
 LD_AS_NEEDED=1; export LD_AS_NEEDED ;
 
 
 
 
}

do_install() {
 export RPM_BUILD_ROOT=${D}
 cd ${S}
 LANG=C
 export LANG
 unset DISPLAY
 rm -rf ${D}
 mkdir -p ${D}
 
 
 install -d ${D}${prefix}/lib/systemd/user/weston.target.wants
 install -m 644 weston.service ${D}${prefix}/lib/systemd/user/weston.service
 ln -sf ../weston.service ${D}/${prefix}/lib/systemd/user/weston.target.wants/
 
 mkdir -p ${D}${sysconfdir}/profile.d/
 install -m 0644 weston.sh ${D}${sysconfdir}/profile.d/
 
 mkdir -p ${D}${sysconfdir}/xdg/weston
 install -m 0644 weston.ini ${D}${sysconfdir}/xdg/weston
 install -m 0644 weston-modello.ini ${D}${sysconfdir}/xdg/weston/weston-modello.ini
 
 
}

pkg_postinst_${PN}() {
    #!/bin/sh -e

    ln -s $D${sysconfdir}/xdg/weston/weston-modello.ini $D${sysconfdir}/xdg/weston/weston.ini
    sed -i 's/ --current-mode//' $D${prefix}/lib/systemd/user/weston.service

}

pkg_postrm_${PN}() {
    #!/bin/sh -e

    rm $D${sysconfdir}/xdg/weston/weston.ini
    sed -i 's/\(^ExecStart.*\)/\1 --current-mode/' $D${prefix}/lib/systemd/user/weston.service

}

PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
PACKAGES += " weston-ivi-config-modello "
PACKAGES += " weston-ivi-config "
PACKAGES += " weston-ivi "

weston-ivi-config-modello_files = ""
weston-ivi-config-modello_files += "${sysconfdir}/xdg/weston/weston-modello.ini"
CONFFILES_${PN}-config-modello = ""
CONFFILES_${PN}-config-modello += "${sysconfdir}/xdg/weston/weston-modello.ini"
MANIFESTFILES_${PN}-config-modello = "weston-ivi.manifest"

weston-ivi-config_files = ""
weston-ivi-config_files += "${sysconfdir}/xdg/weston/weston.ini"
CONFFILES_${PN}-config = ""
CONFFILES_${PN}-config += "${sysconfdir}/xdg/weston/weston.ini"
MANIFESTFILES_${PN}-config = "weston-ivi.manifest"

weston-ivi_files = ""
weston-ivi_files += "${prefix}/lib/systemd/user/weston.service"
weston-ivi_files += "${prefix}/lib/systemd/user/weston.target.wants/weston.service"
weston-ivi_files += "${sysconfdir}/profile.d/*"
CONFFILES_${PN} = ""
CONFFILES_${PN} += "${sysconfdir}/profile.d/*"
MANIFESTFILES_${PN} = "weston-ivi.manifest"

FILES_${PN}-config-modello = "${weston-ivi-config-modello_files}"
FILES_${PN}-config = "${weston-ivi-config_files}"
FILES_${PN} = "${weston-ivi_files}"

PKG_weston-ivi-config-modello= "weston-ivi-config-modello"
PKG_weston-ivi-config= "weston-ivi-config"
PKG_weston-ivi= "weston-ivi"

require weston-ivi-extraconf.inc