Update recipes
[scm/bb/meta-tizen.git] / recipes-tizen / capi-system-power / capi-system-power.inc
1 DESCRIPTION = "A power 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-power
16
17
18 #PROVIDES by capi-system-power-dev
19 PROVIDES += "capi-system-power-dev"
20
21
22 RDEPENDS = ""
23 #RDEPENDS of capi-system-power-dev (${PN}-dev)
24 RDEPENDS_${PN}-dev += "capi-system-power"
25
26
27 DEPENDS = ""
28 #DEPENDS of capi-system-power
29 inherit tizen_cmake
30 inherit pkgconfig
31 DEPENDS += "dlog"
32 DEPENDS += "glib-2.0"
33 DEPENDS += "system-server"
34 DEPENDS += "capi-base-common"
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  
42  
43 }
44 do_patch_append() {
45     bb.build.exec_func('do_prep', d)
46 }
47
48 do_configure() {
49 }
50
51 do_compile() {
52  cd ${S}
53  LANG=C
54  export LANG
55  unset DISPLAY
56  LD_AS_NEEDED=1; export LD_AS_NEEDED ;
57  
58  cp ${S}/packaging/capi-system-power.manifest .
59  MAJORVER=`echo 0.1.1 | 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.1.1 -DMAJORVER=${MAJORVER}
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  
98  
99 }
100
101 pkg_postinst_${PN}() {
102     #!/bin/sh -e
103
104     [ "x$D" == "x" ] && ldconfig
105 }
106
107 pkg_postrm_${PN}() {
108     #!/bin/sh -e
109
110     [ "x$D" == "x" ] && ldconfig
111 }
112
113 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
114 PACKAGES += " capi-system-power "
115 PACKAGES += " capi-system-power-dev "
116
117 capi-system-power_files = ""
118 capi-system-power_files += "${prefix}/lib/libcapi-system-power.so.*"
119 MANIFESTFILES_${PN} = "capi-system-power.manifest"
120
121 capi-system-power-dev_files = ""
122 capi-system-power-dev_files += "${prefix}/include/system/power.h"
123 capi-system-power-dev_files += "${prefix}/lib/pkgconfig/*.pc"
124 capi-system-power-dev_files += "${prefix}/lib/libcapi-system-power.so"
125 MANIFESTFILES_${PN}-dev = "capi-system-power.manifest"
126
127 FILES_${PN} = "${capi-system-power_files}"
128 FILES_${PN}-dev = "${capi-system-power-dev_files}"
129
130 PKG_capi-system-power= "capi-system-power"
131 PKG_capi-system-power-dev= "capi-system-power-dev"
132
133 require capi-system-power-extraconf.inc
134