first commit
[scm/bb/meta-tizen.git] / recipes-tizen / opencore-amr / opencore-amr.inc
1 DESCRIPTION = "opencore AMRNB dev package"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "libdevel"
4 LICENSE = "Apache-2.0"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 PROVIDES = ""
11
12 #PROVIDES by opencore-amr-devel 
13 PROVIDES += "opencore-amr-devel"
14 RPROVIDES_opencore-amr-devel += "opencore-amr-devel"
15 RPROVIDES_opencore-amr-devel += "opencore-amr-dev"
16
17 #PROVIDES by opencore-amr 
18 PROVIDES += "opencore-amr"
19 RPROVIDES_opencore-amr += "opencore-amr"
20
21 RDEPENDS = ""
22 #RDEPENDS of opencore-amr-devel (${PN}-devel)
23 RDEPENDS_${PN}-devel += "opencore-amr"
24
25
26 DEPENDS = ""
27
28 do_patch() {
29  chmod -Rf a+rX,u+w,g-w,o-w ${S}
30  #setup -q
31  cp ${S}/packaging/opencore-amr.manifest .
32  
33  
34 }
35
36 do_configure() {
37 }
38
39 do_compile() {
40  LANG=C
41  export LANG
42  unset DISPLAY
43  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
44  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
45  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
46  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
47  
48  ./autogen.sh
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=/usr \
57          --exec-prefix=/usr \
58          --bindir=/usr/bin \
59          --sbindir=/usr/sbin \
60          --sysconfdir=/etc \
61          --datadir=/usr/share \
62          --includedir=/usr/include \
63          --libdir=/usr/lib \
64          --libexecdir=/usr/libexec \
65          --localstatedir=/var \
66          --sharedstatedir=/usr/com \
67          --mandir=/usr/share/man \
68          --infodir=/usr/share/info
69  make -j16
70  
71  
72  
73 }
74
75 do_install() {
76  echo export RPM_BUILD_ROOT=${D}
77  LANG=C
78  export LANG
79  unset DISPLAY
80  rm -rf ${D} 
81  mkdir -p ${D} 
82  
83  rm -rf ${D}
84  mkdir -p ${D}/usr/share/license
85  cp LICENSE ${D}/usr/share/license/opencore-amr
86  
87    oe_runmake \
88          DESTDIR=${D} \
89          INSTALL_ROOT=${D} \
90          BINDIR=/usr/bin \
91    install  
92    rm -f ${D}/usr/share/info/dir 
93    find ${D} -regex ".*\.la$" | xargs rm -f -- 
94    find ${D} -regex ".*\.a$" | xargs rm -f --
95  
96  
97 }
98
99 PACKAGES = ""
100 PACKAGES += "opencore-amr-devel"
101 PACKAGES += "opencore-amr"
102
103 opencore-amr-devel_files = ""
104 opencore-amr-devel_files += "opencore-amr.manifest"
105 opencore-amr-devel_files += "/usr/include/opencore-amrnb/*.h"
106 opencore-amr-devel_files += "/usr/include/opencore-amrwb/*.h"
107 opencore-amr-devel_files += "/usr/lib/libopencore-amrnb.so"
108 opencore-amr-devel_files += "/usr/lib/libopencore-amrwb.so"
109 opencore-amr-devel_files += "/usr/lib/pkgconfig/opencore-amrnb.pc"
110 opencore-amr-devel_files += "/usr/lib/pkgconfig/opencore-amrwb.pc"
111
112 opencore-amr_files = ""
113 opencore-amr_files += "opencore-amr.manifest"
114 opencore-amr_files += "/usr/lib/libopencore-amrnb.so.0"
115 opencore-amr_files += "/usr/lib/libopencore-amrnb.so.0.0.2"
116 opencore-amr_files += "/usr/lib/libopencore-amrwb.so.0"
117 opencore-amr_files += "/usr/lib/libopencore-amrwb.so.0.0.2"
118 opencore-amr_files += "/usr/share/license/opencore-amr"
119
120 FILES_${PN}-devel = "${opencore-amr-devel_files}"
121 FILES_${PN} = "${opencore-amr_files}"
122
123 PKG_opencore-amr-devel= "opencore-amr-devel"
124 PKG_opencore-amr= "opencore-amr"
125
126 require opencore-amr-extraconf.inc