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