c2020b80c1827d916038d1f37f0058c033605bb8
[scm/bb/meta-tizen.git] / recipes-tizen / tizen-platform-wrapper / tizen-platform-wrapper.inc
1 DESCRIPTION = "A toolkit to generate the libtizen-platform-config library"
2 HOMEPAGE = "http://www.tizen.org"
3 SECTION = "Development/Tools"
4 LICENSE = "LGPL-2.0"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 inherit autotools-brokensep
11
12 PROVIDES = ""
13
14 #PROVIDES by tizen-platform-wrapper 
15
16
17 RDEPENDS = ""
18 #RDEPENDS of tizen-platform-wrapper (${PN})
19 RDEPENDS_${PN} += "gperf"
20
21
22 DEPENDS = ""
23
24 do_prep() {
25  cd ${S}
26  chmod -Rf a+rX,u+w,g-w,o-w ${S}
27  #setup -q
28  cp ${S}/packaging/tizen-platform-wrapper.manifest .
29  
30  
31 }
32 do_patch_append() {
33     bb.build.exec_func('do_prep', d)
34 }
35
36 do_configure() {
37 }
38
39 do_compile() {
40  cd ${S}
41  LANG=C
42  export LANG
43  unset DISPLAY
44  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
45  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
46  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
47  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
48  
49  
50    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
51    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
52    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
53    autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
54          --target=x86_64-tizen-linux \
55          --program-prefix= \
56          --prefix=${prefix} \
57          --exec-prefix=${prefix} \
58          --bindir=${prefix}/bin \
59          --sbindir=${prefix}/sbin \
60          --sysconfdir=${sysconfdir} \
61          --datadir=${prefix}/share \
62          --includedir=${prefix}/include \
63          --libdir=${prefix}/lib \
64          --libexecdir=${prefix}/libexec \
65          --localstatedir=${localstatedir} \
66          --sharedstatedir=${prefix}/com \
67          --mandir=${mandir} \
68          --infodir=${infodir}
69  oe_runmake -j16
70  
71  
72  
73 }
74
75 do_install() {
76  echo export RPM_BUILD_ROOT=${D}
77  cd ${S}
78  LANG=C
79  export LANG
80  unset DISPLAY
81  rm -rf ${D} 
82  mkdir -p ${D} 
83  
84  
85    oe_runmake \
86          DESTDIR=${D} \
87          INSTALL_ROOT=${D} \
88          BINDIR=${prefix}/bin \
89    install  
90    rm -f ${D}${infodir}/dir 
91    find ${D} -regex ".*\.la$" | xargs rm -f -- 
92    find ${D} -regex ".*\.a$" | xargs rm -f --
93  
94  
95 }
96
97
98 tizen-platform-wrapper_files = ""
99 tizen-platform-wrapper_files += "tizen-platform-wrapper.manifest"
100 tizen-platform-wrapper_files += "${prefix}/bin/*"
101 tizen-platform-wrapper_files += "${prefix}/share/tizen-platform-wrapper/*"
102 tizen-platform-wrapper_files += "${prefix}/lib/pkgconfig/tizen-platform-wrapper.pc"
103
104 FILES_${PN} = "${tizen-platform-wrapper_files}"
105
106 PKG_tizen-platform-wrapper= "tizen-platform-wrapper"
107
108 require tizen-platform-wrapper-extraconf.inc
109