7199f87fb014c755e4d6c74861436900fc65846c
[scm/bb/meta-tizen.git] / recipes-tizen / system-info / 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 PROVIDES = ""
13
14 #PROVIDES by capi-system-info-dev 
15
16
17 #PROVIDES by capi-system-info 
18
19
20 RDEPENDS = ""
21 #RDEPENDS of capi-system-info-dev (capi-${PN}-dev)
22 RDEPENDS_capi-${PN}-dev += "capi-system-info"
23
24
25 DEPENDS = ""
26 #DEPENDS of capi-system-info 
27 DEPENDS_append_class-native = " cmake-native"
28 DEPENDS_append_class-target = " cmake-native"
29 DEPENDS += "dlog"
30 DEPENDS += "libxml2"
31 DEPENDS += "iniparser"
32 DEPENDS += "common"
33 DEPENDS += "ecore"
34 DEPENDS += "sound-manager"
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  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
58  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
59  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
60  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
61  
62  MAJORVER=`echo 0.2.0 | awk 'BEGIN {FS="."}{print $1}'`
63  
64    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
65    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
66    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export FFLAGS ; 
67    cmake \
68          -DCMAKE_VERBOSE_MAKEFILE=ON \
69          -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
70          -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
71          -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
72          -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
73          -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
74          -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
75          -DCMAKE_SKIP_RPATH:BOOL=ON \
76          -DBUILD_SHARED_LIBS:BOOL=ON . -DFULLVER=0.2.0 -DMAJORVER=${MAJORVER} -DENABLE_WAYLAND=TRUE
77  
78  make -j16
79  
80  
81  
82 }
83
84 do_install() {
85  echo export RPM_BUILD_ROOT=${D}
86  cd ${S}
87  LANG=C
88  export LANG
89  unset DISPLAY
90  rm -rf ${D} 
91  mkdir -p ${D} 
92  
93  
94    oe_runmake \
95          DESTDIR=${D} \
96          INSTALL_ROOT=${D} \
97          BINDIR=${prefix}/bin \
98    install  
99    rm -f ${D}${infodir}/dir 
100    find ${D} -regex ".*\.la$" | xargs rm -f -- 
101    find ${D} -regex ".*\.a$" | xargs rm -f --
102  mkdir -p ${D}/etc
103  cp -f script/make_info_file.sh ${D}${sysconfdir}/make_info_file.sh
104  
105  
106 }
107
108 PACKAGES += " capi-system-info-dev "
109 PACKAGES += " capi-system-info "
110
111 capi-system-info-dev_files = ""
112 capi-system-info-dev_files += "capi-system-info.manifest"
113 capi-system-info-dev_files += "${prefix}/include/system/system_info.h"
114 capi-system-info-dev_files += "${prefix}/lib/pkgconfig/*.pc"
115 capi-system-info-dev_files += "${prefix}/lib/libcapi-system-info.so"
116
117 capi-system-info_files = ""
118 capi-system-info_files += "capi-system-info.manifest"
119 capi-system-info_files += "${prefix}/lib/libcapi-system-info.so.*"
120 capi-system-info_files += "${sysconfdir}/make_info_file.sh"
121 capi-system-info_files += "system-info.manifest"
122
123 FILES_${PN}-dev = "${capi-system-info-dev_files}"
124 FILES_${PN} = "${capi-system-info_files}"
125
126 PKG_capi-system-info-dev= "capi-system-info-dev"
127 PKG_capi-system-info= "capi-system-info"
128
129 require system-info-extraconf.inc
130