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