Update recipes generation.
[scm/bb/meta-tizen.git] / recipes-tizen / libmm-common / libmm-common.inc
1 DESCRIPTION = "Multimedia Framework Common Library"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "Multimedia Framework/Libraries"
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 libmm-common-dev 
16
17
18 #PROVIDES by libmm-common 
19
20
21 RDEPENDS = ""
22 #RDEPENDS of libmm-common-dev (${PN}-dev)
23 RDEPENDS_${PN}-dev += "libmm-common"
24
25
26 DEPENDS = ""
27 #DEPENDS of libmm-common 
28 DEPENDS += "libmm-log"
29 DEPENDS += "glib-2.0"
30
31 do_prep() {
32  cd ${S}
33  chmod -Rf a+rX,u+w,g-w,o-w ${S}
34  #setup -q
35  cp ${S}/packaging/libmm-common.manifest .
36  
37  
38 }
39 do_patch_append() {
40     bb.build.exec_func('do_prep', d)
41 }
42
43 do_configure() {
44 }
45
46 do_compile() {
47  cd ${S}
48  LANG=C
49  export LANG
50  unset DISPLAY
51  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
52  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
53  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
54  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
55  
56  
57  ./autogen.sh
58  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" " 
59    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
60    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
61    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
62    autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
63          --target=x86_64-tizen-linux \
64          --program-prefix= \
65          --prefix=${prefix} \
66          --exec-prefix=${prefix} \
67          --bindir=${prefix}/bin \
68          --sbindir=${prefix}/sbin \
69          --sysconfdir=${sysconfdir} \
70          --datadir=${prefix}/share \
71          --includedir=${prefix}/include \
72          --libdir=${prefix}/lib \
73          --libexecdir=${prefix}/libexec \
74          --localstatedir=${localstatedir} \
75          --sharedstatedir=${prefix}/com \
76          --mandir=${mandir} \
77          --infodir=${infodir}
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  
103  
104  
105 }
106
107
108 libmm-common-dev_files = ""
109 libmm-common-dev_files += "libmm-common.manifest"
110 libmm-common-dev_files += "${prefix}/include/mmf/SLP_MultimediaFW_PG.h"
111 libmm-common-dev_files += "${prefix}/include/mmf/mm_types.h"
112 libmm-common-dev_files += "${prefix}/include/mmf/mm_error.h"
113 libmm-common-dev_files += "${prefix}/include/mmf/mm_message.h"
114 libmm-common-dev_files += "${prefix}/include/mmf/mm_attrs.h"
115 libmm-common-dev_files += "${prefix}/include/mmf/mm_attrs_private.h"
116 libmm-common-dev_files += "${prefix}/include/mmf/mm_debug.h"
117 libmm-common-dev_files += "${prefix}/include/mmf/mm.h"
118 libmm-common-dev_files += "${prefix}/lib/pkgconfig/mm-common.pc"
119 libmm-common-dev_files += "${prefix}/lib/libmmfcommon.so"
120
121 libmm-common_files = ""
122 libmm-common_files += "libmm-common.manifest"
123 libmm-common_files += "${prefix}/lib/libmmfcommon.so.*"
124
125 FILES_${PN}-dev = "${libmm-common-dev_files}"
126 FILES_${PN} = "${libmm-common_files}"
127
128 PKG_libmm-common-dev= "libmm-common-dev"
129 PKG_libmm-common= "libmm-common"
130
131 require libmm-common-extraconf.inc
132