c23a10340cab8bb8c639a42b64e99e6c90f2e1b1
[scm/bb/meta-tizen.git] / recipes-tizen / aul-1 / aul-1.inc
1 DESCRIPTION = "App utility library"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "System/Libraries"
4 LICENSE = "Apache-2.0"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 inherit autotools-brokensep
11
12 PROVIDES = ""
13
14 #PROVIDES by aul 
15
16
17 #PROVIDES by aul-dev 
18
19
20 RDEPENDS = ""
21 #RDEPENDS of aul (aul)
22 RDEPENDS_aul += "eglibc"
23 RDEPENDS_aul += "systemd"
24
25 #RDEPENDS of aul-dev (aul-dev)
26 RDEPENDS_aul-dev += "aul"
27
28
29 DEPENDS = ""
30 #DEPENDS of aul 
31 DEPENDS += "pkgmgr-info"
32 DEPENDS += "librua"
33 DEPENDS += "cmake"
34 DEPENDS += "attr"
35 DEPENDS += "dbus"
36 DEPENDS += "tizen-platform-config"
37 DEPENDS += "dlog"
38 DEPENDS += "xdgmime"
39 DEPENDS += "ail"
40 DEPENDS += "bundle"
41 DEPENDS += "sqlite3"
42 DEPENDS += "ecore"
43 DEPENDS += "libprivilege-control"
44 DEPENDS += "app-checker"
45 DEPENDS += "vconf"
46 DEPENDS += "privacy-manager"
47
48 do_prep() {
49  cd ${S}
50  chmod -Rf a+rX,u+w,g-w,o-w ${S}
51  #setup -q
52  cp ${S}/packaging/aul.manifest .
53  
54  
55 }
56 do_patch_append() {
57     bb.build.exec_func('do_prep', d)
58 }
59
60 do_configure() {
61 }
62
63 do_compile() {
64  cd ${S}
65  LANG=C
66  export LANG
67  unset DISPLAY
68  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
69  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
70  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
71  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
72  
73  
74  
75    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
76    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
77    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export FFLAGS ; 
78    cmake \
79          -DCMAKE_VERBOSE_MAKEFILE=ON \
80          -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
81          -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
82          -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
83          -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
84          -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
85          -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
86          -DCMAKE_SKIP_RPATH:BOOL=ON \
87          -DBUILD_SHARED_LIBS:BOOL=ON \
88          -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake . -DWITH_WAYLAND=On
89  
90  make -j16
91  
92  
93  
94 }
95
96 do_install() {
97  echo export RPM_BUILD_ROOT=${D}
98  cd ${S}
99  LANG=C
100  export LANG
101  unset DISPLAY
102  rm -rf ${D} 
103  mkdir -p ${D} 
104  
105  rm -rf ${D}
106  
107    oe_runmake \
108          DESTDIR=${D} \
109          INSTALL_ROOT=${D} \
110          BINDIR=${prefix}/bin \
111    install  
112    rm -f ${D}${infodir}/dir 
113    find ${D} -regex ".*\.la$" | xargs rm -f -- 
114    find ${D} -regex ".*\.a$" | xargs rm -f --
115  
116  mkdir -p ${D}/etc/init.d
117  install -m 755 launchpad_run ${D}/etc/init.d
118  
119  mkdir -p ${D}/etc/rc.d/rc3.d
120  mkdir -p ${D}/etc/rc.d/rc4.d
121  ln -sf ../../init.d/launchpad_run ${D}/${sysconfdir}/rc.d/rc3.d/S34launchpad_run
122  ln -sf ../../init.d/launchpad_run ${D}/${sysconfdir}/rc.d/rc4.d/S80launchpad_run
123  
124  mkdir -p ${D}%{TZ_SYS_DB}
125  sqlite3 ${D}%{TZ_SYS_DB}/.mida.db < ${D}/usr/share/aul/mida_db.sql
126  rm -rf ${D}/usr/share/aul/mida_db.sql
127  
128  mkdir -p ${D}/usr/lib/systemd/system/graphical.target.wants
129  install -m 0644 ${S}/packaging/launchpad-preload@.service ${D}/usr/lib/systemd/system/launchpad-preload@.service
130  install -m 0644 ${S}/packaging/ac.service ${D}/usr/lib/systemd/system/ac.service
131  ln -s ../launchpad-preload@.service ${D}/usr/lib/systemd/system/graphical.target.wants/launchpad-preload@5000.service
132  ln -s ../ac.service ${D}/usr/lib/systemd/system/graphical.target.wants/ac.service
133  
134  mkdir -p ${D}%{TZ_SYS_SMACK}/accesses.d
135  
136  mkdir -p ${D}/usr/share/license
137  cp LICENSE ${D}/usr/share/license/aul
138  
139  
140  
141 }
142
143 PACKAGES += " aul "
144 PACKAGES += " aul-dev "
145
146 aul_files = ""
147 aul_files += "aul.manifest"
148 aul_files += "${prefix}/lib/libaul.so.0"
149 aul_files += "${prefix}/lib/libaul.so.0.1.0"
150 aul_files += "${sysconfdir}/init.d/launchpad_run"
151 aul_files += "${prefix}/bin/aul_service.sh"
152 aul_files += "${prefix}/bin/aul_service_test.sh"
153 aul_files += "${sysconfdir}/rc.d/rc3.d/S34launchpad_run"
154 aul_files += "${sysconfdir}/rc.d/rc4.d/S80launchpad_run"
155 aul_files += "%attr(0644,root,%{TZ_SYS_USER_GROUP}) %{TZ_SYS_DB}/.mida.db"
156 aul_files += "%attr(0644,root,%{TZ_SYS_USER_GROUP}) %{TZ_SYS_DB}/.mida.db-journal"
157 aul_files += "${prefix}/bin/aul_mime.sh"
158 aul_files += "${prefix}/bin/aul_test"
159 aul_files += "${prefix}/bin/launch_app"
160 aul_files += "${prefix}/bin/open_app"
161 aul_files += "/usr/share/aul/miregex/*"
162 aul_files += "/usr/share/aul/service/*"
163 aul_files += "/usr/share/aul/preload_list.txt"
164 aul_files += "/usr/share/aul/preexec_list.txt"
165 aul_files += "${prefix}/bin/launchpad_preloading_preinitializing_daemon"
166 aul_files += "/usr/lib/systemd/system/graphical.target.wants/launchpad-preload@5000.service"
167 aul_files += "/usr/lib/systemd/system/graphical.target.wants/ac.service"
168 aul_files += "/usr/lib/systemd/system/launchpad-preload@.service"
169 aul_files += "/usr/lib/systemd/system/ac.service"
170 aul_files += "/usr/bin/amd"
171 aul_files += "/usr/bin/daemon-manager-release-agent"
172 aul_files += "/usr/bin/daemon-manager-launch-agent"
173 aul_files += "/usr/share/license/aul"
174
175 aul-dev_files = ""
176 aul-dev_files += "/usr/include/aul/*.h"
177 aul-dev_files += "${prefix}/lib/*.so"
178 aul-dev_files += "${prefix}/lib/pkgconfig/*.pc"
179
180 FILES_${PN} = "${aul_files}"
181 FILES_${PN}-dev = "${aul-dev_files}"
182
183 PKG_aul= "aul"
184 PKG_aul-dev= "aul-dev"
185
186 require aul-1-extraconf.inc
187