Tizen recipes : Fix tizen common build and get little more closer to current Tizen...
[scm/bb/meta-tizen.git] / meta-tizen-ivi / meta-tizen-common-base / recipes-application-framework / capi-system-system-settings / capi-system-system-settings.inc
1 DESCRIPTION = "A System Settings library in Tizen Native API"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "System/API"
4 LICENSE = "Apache-2.0"
5 PV = "0.0.2"
6
7 SRC_URI = ""
8
9 S = "${WORKDIR}/git"
10
11 inherit manifest autotools-brokensep
12
13 BBCLASSEXTEND = ""
14 PROVIDES = ""
15
16 #PROVIDES by capi-system-system-settings-dev
17 PROVIDES += "capi-system-system-settings-dev"
18
19
20 #PROVIDES by capi-system-system-settings
21
22
23 RDEPENDS = ""
24 #RDEPENDS of capi-system-system-settings-dev (${PN}-dev)
25 RDEPENDS_${PN}-dev += "capi-base-common"
26 RDEPENDS_${PN}-dev += "capi-system-system-settings"
27
28
29 DEPENDS = ""
30 #DEPENDS of capi-system-system-settings
31 inherit tizen_cmake
32 DEPENDS += "fontconfig"
33 DEPENDS += "tizen-platform-config"
34 inherit pkgconfig
35 DEPENDS += "dlog"
36 DEPENDS += "app-core"
37 DEPENDS += "capi-base-common"
38 DEPENDS += "libxml2"
39 DEPENDS += "elementary"
40 DEPENDS += "ecore"
41 DEPENDS += "glib-2.0"
42 DEPENDS += "vconf"
43
44 do_prep() {
45  cd ${S}
46  chmod -Rf a+rX,u+w,g-w,o-w ${S}
47  #setup -q
48  cp ${S}/packaging/capi-system-system-settings.manifest ${S}/packaging/capi-system-system-settings-devel.manifest .
49  
50  
51  
52 }
53 do_patch_append() {
54     bb.build.exec_func('do_prep', d)
55 }
56
57 do_configure() {
58 }
59
60 do_compile() {
61  cd ${S}
62  LANG=C
63  export LANG
64  unset DISPLAY
65  LD_AS_NEEDED=1; export LD_AS_NEEDED ;
66  
67  MAJORVER=`echo 0.0.2 | awk 'BEGIN {FS="."}{print $1}'`
68  
69    cmake \
70          -DCMAKE_VERBOSE_MAKEFILE=ON \
71          -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
72          -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
73          -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
74          -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
75          -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
76          -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
77          -DCMAKE_SKIP_RPATH:BOOL=ON \
78          -DBUILD_SHARED_LIBS:BOOL=ON \
79          -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
80          ${EXTRA_OECMAKE} . -DFULLVER=0.0.2 -DMAJORVER=${MAJORVER} \
81          -DX11_SUPPORT=Off \
82          -DWAYLAND_SUPPORT=On
83  
84  make -j16
85  
86  
87  
88 }
89
90 do_install() {
91  export RPM_BUILD_ROOT=${D}
92  cd ${S}
93  LANG=C
94  export LANG
95  unset DISPLAY
96  rm -rf ${D}
97  mkdir -p ${D}
98  
99  
100    oe_runmake \
101          DESTDIR=${D} \
102          INSTALL_ROOT=${D} \
103          BINDIR=${prefix}/bin \
104    install  
105    rm -f ${D}${infodir}/dir 
106    find ${D} -regex ".*\.la$" | xargs rm -f -- 
107    find ${D} -regex ".*\.a$" | xargs rm -f --
108  
109  
110 }
111
112 pkg_postinst_${PN}() {
113     #!/bin/sh -e
114
115     [ "x$D" == "x" ] && ldconfig
116 }
117
118 pkg_postrm_${PN}() {
119     #!/bin/sh -e
120
121     [ "x$D" == "x" ] && ldconfig
122 }
123
124 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
125 PACKAGES += " capi-system-system-settings-dev "
126 PACKAGES += " capi-system-system-settings "
127
128 capi-system-system-settings-dev_files = ""
129 capi-system-system-settings-dev_files += "${prefix}/include/system/*.h"
130 capi-system-system-settings-dev_files += "${prefix}/lib/pkgconfig/*.pc"
131 capi-system-system-settings-dev_files += "${prefix}/lib/lib*.so"
132 MANIFESTFILES_${PN}-dev = "capi-system-system-settings-devel.manifest"
133
134 capi-system-system-settings_files = ""
135 capi-system-system-settings_files += "${prefix}/lib/lib*.so.*"
136 capi-system-system-settings_files += "/usr/bin/test_system_settings_gui"
137 MANIFESTFILES_${PN} = "capi-system-system-settings.manifest"
138
139 FILES_${PN}-dev = "${capi-system-system-settings-dev_files}"
140 FILES_${PN} = "${capi-system-system-settings_files}"
141
142 PKG_capi-system-system-settings-dev= "capi-system-system-settings-dev"
143 PKG_capi-system-system-settings= "capi-system-system-settings"
144
145 require capi-system-system-settings-extraconf.inc
146