Update alsa-scenario-0.2 recipe
[scm/bb/meta-tizen.git] / recipes-tizen / alsa-scenario-0.2 / alsa-scenario-0.2.inc
1 DESCRIPTION = "ALSA Scenario pkg"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "Multimedia/Audio"
4 LICENSE = "LGPLv2+"
5
6 SRC_URI = ""
7
8 S = "${WORKDIR}/git"
9
10 inherit autotools-brokensep
11
12 BBCLASSEXTEND = ""
13 PROVIDES = ""
14
15 #PROVIDES by alsa-scenario-dev 
16
17
18 #PROVIDES by alsa-scenario 
19
20
21 RDEPENDS = ""
22 #RDEPENDS of alsa-scenario-dev (alsa-scenario-dev)
23 RDEPENDS_alsa-scenario-dev += "alsa-scenario"
24
25
26 DEPENDS = ""
27 #DEPENDS of alsa-scenario 
28 DEPENDS += "alsa-lib"
29
30 do_prep() {
31  cd ${S}
32  chmod -Rf a+rX,u+w,g-w,o-w ${S}
33  #setup -q
34  cp ${S}/packaging/alsa-scenario.manifest .
35  
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  cp -f /usr/share/libtool/config/config.guess ${WORKDIR}/alsa-scenario-0.2.1/
57  cp -f /usr/share/libtool/config/config.sub ${WORKDIR}/alsa-scenario-0.2.1/
58  
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} --disable-static
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 pkg_postinst_${PN}() {
107     #!/bin/sh -e
108
109     /sbin/ldconfig
110 }
111
112 pkg_postrm_${PN}() {
113     #!/bin/sh -e
114
115     /sbin/ldconfig
116 }
117
118 PACKAGES += " alsa-scenario-dev "
119 PACKAGES += " alsa-scenario "
120
121 alsa-scenario-dev_files = ""
122 alsa-scenario-dev_files += "alsa-scenario.manifest"
123 alsa-scenario-dev_files += "${prefix}/include/alsa/*.h"
124 alsa-scenario-dev_files += "${prefix}/lib/libascenario.so"
125 alsa-scenario-dev_files += "${prefix}/lib/pkgconfig/libascenario.pc"
126
127 alsa-scenario_files = ""
128 alsa-scenario_files += "alsa-scenario.manifest"
129 alsa-scenario_files += "${prefix}/lib/libascenario-0.2.so.*"
130
131 FILES_${PN}-dev = "${alsa-scenario-dev_files}"
132 FILES_${PN} = "${alsa-scenario_files}"
133
134 PKG_alsa-scenario-dev= "alsa-scenario-dev"
135 PKG_alsa-scenario= "alsa-scenario"
136
137 require alsa-scenario-0.2-extraconf.inc
138