1 DESCRIPTION = "Tizen Common Weston configuration and set-up"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "Base/Configuration"
10 inherit autotools-brokensep
15 #PROVIDES by weston-common
16 # the PROVIDES rules is ignore "weston-startup "
17 PROVIDES += "weston-startup"
18 RPROVIDES_weston-common += "weston-startup"
21 #PROVIDES by weston-common-config
24 #PROVIDES by weston-common-tz-launcher
28 #RDEPENDS of weston-common (${PN})
29 RDEPENDS_${PN} += "weston"
30 RDEPENDS_${PN} += "eglibc"
31 RDEPENDS_${PN} += "pwdutils"
35 #DEPENDS of weston-common
37 DEPENDS += "libxkbcommon"
40 DEPENDS_append_class-native = " pkgconfig-native"
41 DEPENDS_append_class-target = " pkgconfig-native"
43 DEPENDS_append_class-native = " automake-native"
44 DEPENDS_append_class-target = " automake-native"
47 DEPENDS_append_class-native = " libtool"
48 DEPENDS_append_class-target = " libtool-cross"
51 DEPENDS_append_class-native = " autoconf-native"
52 DEPENDS_append_class-target = " autoconf-native"
58 chmod -Rf a+rX,u+w,g-w,o-w ${S}
60 cp ${S}/packaging/weston-common.manifest .
65 bb.build.exec_func('do_prep', d)
76 CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ;
77 CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ;
78 FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ;
79 LD_AS_NEEDED=1; export LD_AS_NEEDED ;
83 CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ;
84 CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ;
85 FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ;
86 autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
87 --target=x86_64-tizen-linux \
90 --exec-prefix=${prefix} \
91 --bindir=${prefix}/bin \
92 --sbindir=${prefix}/sbin \
93 --sysconfdir=${sysconfdir} \
94 --datadir=${prefix}/share \
95 --includedir=${prefix}/include \
96 --libdir=${prefix}/lib \
97 --libexecdir=${prefix}/libexec \
98 --localstatedir=${localstatedir} \
99 --sharedstatedir=${prefix}/com \
109 echo export RPM_BUILD_ROOT=${D}
124 BINDIR=${prefix}/bin \
126 rm -f ${D}${infodir}/dir
127 find ${D} -regex ".*\.la$" | xargs rm -f --
128 find ${D} -regex ".*\.a$" | xargs rm -f --
131 # install weston service as 'display-manager.service' as it's the one wanted by graphical.target
132 mkdir -p ${D}/lib/systemd/system
133 install -m 644 display-manager-run.service ${D}/lib/systemd/system/display-manager-run.service
134 install -m 644 display-manager.service ${D}/lib/systemd/system/display-manager.service
135 install -m 644 display-manager.path ${D}/lib/systemd/system/display-manager.path
137 # install Environment file for weston service and weston-user.service
138 mkdir -p ${D}${sysconfdir}/sysconfig
139 install -m 0644 weston.sysconfig ${D}${sysconfdir}/sysconfig/weston
140 install -m 0644 weston-user.sysconfig ${D}${sysconfdir}/sysconfig/weston-user
142 # install tmpfiles.d(5) conf
143 mkdir -p ${D}${prefix}/lib/tmpfiles.d
144 install -m 0644 weston_tmpfiles.conf ${D}${prefix}/lib/tmpfiles.d/weston.conf
146 # install weston-user service in user session
147 mkdir -p ${D}/lib/systemd/user
148 install -m 644 weston-user.service ${D}/lib/systemd/user/
151 mkdir -p ${D}${sysconfdir}/profile.d/
152 install -m 0644 weston.sh ${D}${sysconfdir}/profile.d/
155 mkdir -p ${D}${sysconfdir}/xdg/weston
156 install -m 0644 weston.ini ${D}${sysconfdir}/xdg/weston
158 # Add a rule to ensure the 'display' user has permissions to
159 # open the graphics device
160 mkdir -p ${D}${sysconfdir}/udev/rules.d
161 cat >${D}${sysconfdir}/udev/rules.d/99-dri.rules <<'EOF'
162 SUBSYSTEM=="drm", MODE="0660", GROUP="display", SMACK="*"
165 # user 'display' must own /dev/tty7 for weston to start correctly
166 cat >${D}${sysconfdir}/udev/rules.d/99-tty.rules <<'EOF'
167 SUBSYSTEM=="tty", KERNEL=="tty7", OWNER="display", SMACK="^"
170 # user 'display' must also be able to access /dev/input/event*
171 cat >${D}${sysconfdir}/udev/rules.d/99-input.rules <<'EOF'
172 SUBSYSTEM=="input", KERNEL=="event*", MODE="0660", GROUP="input", SMACK="^"
175 # install desktop file
176 mkdir -p ${D}${prefix}/share/applications
177 install -m 0644 weston-terminal.desktop ${D}${prefix}/share/applications
182 PACKAGES += " weston-common-tz-launcher "
183 PACKAGES += " weston-common-config "
185 weston-common-tz-launcher_files = ""
186 weston-common-tz-launcher_files += "weston-common.manifest"
187 weston-common-tz-launcher_files += "${prefix}/bin/tz-launcher"
188 weston-common-tz-launcher_files += "${prefix}/bin/wl-pre"
190 weston-common_files = ""
191 weston-common_files += "weston-common.manifest"
192 weston-common_files += "/lib/systemd/system/display-manager-run.service"
193 weston-common_files += "/lib/systemd/system/display-manager.service"
194 weston-common_files += "/lib/systemd/system/display-manager.path"
195 weston-common_files += "${sysconfdir}/sysconfig/*"
196 weston-common_files += "${prefix}/lib/tmpfiles.d/weston.conf"
197 weston-common_files += "/lib/systemd/user/weston-user.service"
198 weston-common_files += "${sysconfdir}/profile.d/*"
199 weston-common_files += "${sysconfdir}/udev/rules.d/*"
200 weston-common_files += "${prefix}/share/applications/*.desktop"
202 weston-common-config_files = ""
203 weston-common-config_files += "weston-common.manifest"
204 weston-common-config_files += "${sysconfdir}/xdg/weston/weston.ini"
206 FILES_${PN}-tz-launcher = "${weston-common-tz-launcher_files}"
207 FILES_${PN} = "${weston-common_files}"
208 FILES_${PN}-config = "${weston-common-config_files}"
210 PKG_weston-common-tz-launcher= "weston-common-tz-launcher"
211 PKG_weston-common= "weston-common"
212 PKG_weston-common-config= "weston-common-config"
214 require weston-common-extraconf.inc