Update according to the actual Q1 tizen common release
[scm/bb/meta-tizen.git] / meta-tizen-common-base / recipes-core / libwbxml2 / libwbxml2.inc
1 DESCRIPTION = "WBXML parser and compiler library"
2 HOMEPAGE = "http://libwbxml.opensync.org/"
3 SECTION = "System/Libraries"
4 LICENSE = "LGPL-2.1+"
5 PV = "0.11.2"
6 PR = "1"
7
8 SRC_URI = ""
9
10 S = "${WORKDIR}/git"
11
12 inherit manifest autotools-brokensep
13
14 BBCLASSEXTEND = ""
15 PROVIDES = ""
16
17 #PROVIDES by libwbxml2
18
19
20 #PROVIDES by wbxml2-tools
21 PROVIDES += "wbxml2-tools"
22
23
24 #PROVIDES by libwbxml2-dev
25 PROVIDES += "libwbxml2-dev"
26
27
28 RDEPENDS = ""
29 #RDEPENDS of wbxml2-tools (wbxml2-tools)
30 RDEPENDS_wbxml2-tools += "libwbxml2"
31 RDEPENDS_wbxml2-tools += "libxml2"
32
33 #RDEPENDS of libwbxml2-dev (${PN}-dev)
34 RDEPENDS_${PN}-dev += "libwbxml2"
35 RDEPENDS_${PN}-dev += "libxml2"
36 RDEPENDS_${PN}-dev += "glibc"
37 RDEPENDS_${PN}-dev += "expat"
38
39
40 DEPENDS = ""
41 #DEPENDS of libwbxml2
42 DEPENDS += "expat"
43 inherit tizen_cmake
44 DEPENDS += "libxml2"
45 DEPENDS += "zlib"
46 inherit pkgconfig
47 DEPENDS += "popt"
48
49 do_prep() {
50  cd ${S}
51  chmod -Rf a+rX,u+w,g-w,o-w ${S}
52  #setup -q -n libwbxml-0.11.2
53  cp ${S}/packaging/libwbxml2.manifest .
54  
55  
56 }
57 do_patch_append() {
58     bb.build.exec_func('do_prep', d)
59 }
60
61 do_configure() {
62 }
63
64 do_compile() {
65  cd ${S}
66  LANG=C
67  export LANG
68  unset DISPLAY
69  LD_AS_NEEDED=1; export LD_AS_NEEDED ;
70  
71  #mkdir -p build
72  #CURDIR=$(pwd)
73  #cd build
74  CFLAGS="$CFLAGS" \
75  CXXFLAGS="$CFLAGS" \
76  
77    cmake \
78          -DCMAKE_VERBOSE_MAKEFILE=ON \
79          -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
80          -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
81          -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
82          -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
83          -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
84          -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
85          -DCMAKE_SKIP_RPATH:BOOL=ON \
86          -DBUILD_SHARED_LIBS:BOOL=ON \
87          -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
88          ${EXTRA_OECMAKE} \
89          -DCMAKE_BUILD_TYPE=None \
90          -DENABLE_INSTALL_DOC:BOOL=OFF
91  oe_runmake ${PARALLEL_MAKE} VERBOSE=1
92  #cd ${CURDIR}
93  
94  
95  
96 }
97
98 do_install() {
99  export RPM_BUILD_ROOT=${D}
100  cd ${S}
101  LANG=C
102  export LANG
103  unset DISPLAY
104  rm -rf ${D}
105  mkdir -p ${D}
106  
107  #CURDIR=$(pwd)
108  #cd build
109  
110    oe_runmake \
111          DESTDIR=${D} \
112          INSTALL_ROOT=${D} \
113          BINDIR=${prefix}/bin \
114    install  
115    rm -f ${D}${infodir}/dir 
116    find ${D} -regex ".*\.la$" | xargs rm -f -- 
117    find ${D} -regex ".*\.a$" | xargs rm -f --
118    mkdir -p ${prefix}/share/cmake-2.8/Modules/
119  #cd ${CURDIR}
120  
121  
122 }
123
124 pkg_postinst_${PN}() {
125     #!/bin/sh -e
126
127     [ "x$D" == "x" ] && ldconfig
128 }
129
130 pkg_postrm_${PN}() {
131     #!/bin/sh -e
132
133     [ "x$D" == "x" ] && ldconfig
134 }
135
136 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
137 PACKAGES += " libwbxml2 "
138 PACKAGES += " wbxml2-tools "
139 PACKAGES += " libwbxml2-dev "
140
141 libwbxml2_files = ""
142 libwbxml2_files += "${prefix}/lib/libwbxml2.so.1*"
143 MANIFESTFILES_${PN} = "libwbxml2.manifest"
144
145 wbxml2-tools_files = ""
146 wbxml2-tools_files += "${prefix}/bin/wbxml2xml"
147 wbxml2-tools_files += "${prefix}/bin/xml2wbxml"
148 MANIFESTFILES_wbxml2-tools = "libwbxml2.manifest"
149
150 libwbxml2-dev_files = ""
151 libwbxml2-dev_files += "${prefix}/lib/pkgconfig/libwbxml2.pc"
152 libwbxml2-dev_files += "${prefix}/lib/libwbxml2.so"
153 libwbxml2-dev_files += "${prefix}/include/libwbxml-1.0/wbxml"
154 libwbxml2-dev_files += "${prefix}/share/cmake-2.8/Modules/FindLibWbxml2.cmake"
155 libwbxml2-dev_files += "${prefix}/include/wbxml_config.h"
156 MANIFESTFILES_${PN}-dev = "libwbxml2.manifest"
157
158 FILES_${PN} = "${libwbxml2_files}"
159 FILES_wbxml2-tools = "${wbxml2-tools_files}"
160 FILES_${PN}-dev = "${libwbxml2-dev_files}"
161
162 PKG_libwbxml2= "libwbxml2"
163 PKG_wbxml2-tools= "wbxml2-tools"
164 PKG_libwbxml2-dev= "libwbxml2-dev"
165
166 require libwbxml2-extraconf.inc
167