Update recipes generation.
[scm/bb/meta-tizen.git] / recipes-tizen / avsystem / avsystem.inc
1 DESCRIPTION = "Audio Video System"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "System/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 avsystem 
16
17
18 #PROVIDES by avsystem-dev 
19
20
21 #PROVIDES by libavsysaudio 
22
23
24 RDEPENDS = ""
25 #RDEPENDS of avsystem (${PN})
26 RDEPENDS_${PN} += "eglibc"
27 RDEPENDS_${PN} += "systemd"
28
29 #RDEPENDS of avsystem-dev (${PN}-dev)
30 RDEPENDS_${PN}-dev += "avsystem"
31
32
33 DEPENDS = ""
34 #DEPENDS of avsystem 
35 DEPENDS += "alsa-lib"
36 DEPENDS += "libmm-log"
37 DEPENDS += "pulseaudio"
38 DEPENDS += "iniparser"
39 DEPENDS += "libexif"
40 DEPENDS += "alsa-state"
41 DEPENDS += "libmm-ta"
42
43 do_prep() {
44  cd ${S}
45  chmod -Rf a+rX,u+w,g-w,o-w ${S}
46  #setup -q -n avsystem-0.5.5
47  cp ${S}/packaging/avsystem.manifest .
48  
49  
50  
51 }
52 do_patch_append() {
53     bb.build.exec_func('do_prep', d)
54 }
55
56 do_configure() {
57 }
58
59 do_compile() {
60  cd ${S}
61  LANG=C
62  export LANG
63  unset DISPLAY
64  CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
65  CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
66  FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
67  LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
68  
69  
70    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
71    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
72    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
73    ./autogen.sh --build=${TARGET_SYS} --host=${HOST_SYS} \
74          --target=x86_64-tizen-linux \
75          --program-prefix= \
76          --prefix=${prefix} \
77          --exec-prefix=${prefix} \
78          --bindir=${prefix}/bin \
79          --sbindir=${prefix}/sbin \
80          --sysconfdir=${sysconfdir} \
81          --datadir=${prefix}/share \
82          --includedir=${prefix}/include \
83          --libdir=${prefix}/lib \
84          --libexecdir=${prefix}/libexec \
85          --localstatedir=${localstatedir} \
86          --sharedstatedir=${prefix}/com \
87          --mandir=${mandir} \
88          --infodir=${infodir}
89  
90    CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
91    CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
92    FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
93    autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
94          --target=x86_64-tizen-linux \
95          --program-prefix= \
96          --prefix=${prefix} \
97          --exec-prefix=${prefix} \
98          --bindir=${prefix}/bin \
99          --sbindir=${prefix}/sbin \
100          --sysconfdir=${sysconfdir} \
101          --datadir=${prefix}/share \
102          --includedir=${prefix}/include \
103          --libdir=${prefix}/lib \
104          --libexecdir=${prefix}/libexec \
105          --localstatedir=${localstatedir} \
106          --sharedstatedir=${prefix}/com \
107          --mandir=${mandir} \
108          --infodir=${infodir} \
109         --enable-audiotest
110  
111  make -j16
112  
113  
114  
115 }
116
117 do_install() {
118  echo export RPM_BUILD_ROOT=${D}
119  cd ${S}
120  LANG=C
121  export LANG
122  unset DISPLAY
123  rm -rf ${D} 
124  mkdir -p ${D} 
125  
126  
127    oe_runmake \
128          DESTDIR=${D} \
129          INSTALL_ROOT=${D} \
130          BINDIR=${prefix}/bin \
131    install  
132    rm -f ${D}${infodir}/dir 
133    find ${D} -regex ".*\.la$" | xargs rm -f -- 
134    find ${D} -regex ".*\.a$" | xargs rm -f --
135  
136  mkdir -m 755 -p ${D}/${sysconfdir}/rc.d/rc3.d/
137  ln -s ../init.d/snd_init ${D}/${sysconfdir}/rc.d/rc3.d/S15snd_init
138  mkdir -m 755 -p ${D}/${sysconfdir}/rc.d/rc4.d/
139  ln -s ../init.d/snd_init ${D}/${sysconfdir}/rc.d/rc4.d/S15snd_init
140  
141  mkdir -m 755 -p ${D}/usr/lib/systemd/system/multi-user.target.wants
142  install -m 0644 ${S}/packaging/avsystem.service ${D}/usr/lib/systemd/system/avsystem.service
143  ln -s ../avsystem.service ${D}/usr/lib/systemd/system/multi-user.target.wants/avsystem.service
144  
145  
146 }
147
148 PACKAGES += " libavsysaudio "
149
150 avsystem_files = ""
151 avsystem_files += "avsystem.manifest"
152 avsystem_files += "${sysconfdir}/rc.d/init.d/snd_init"
153 avsystem_files += "${sysconfdir}/rc.d/rc3.d/S15snd_init"
154 avsystem_files += "${sysconfdir}/rc.d/rc4.d/S15snd_init"
155 avsystem_files += "${prefix}/bin/*"
156 avsystem_files += "/usr/lib/systemd/system/avsystem.service"
157 avsystem_files += "/usr/lib/systemd/system/multi-user.target.wants/avsystem.service"
158
159 avsystem-dev_files = ""
160 avsystem-dev_files += "avsystem.manifest"
161 avsystem-dev_files += "${prefix}/lib/pkgconfig/*.pc"
162 avsystem-dev_files += "${prefix}/lib/*.so"
163 avsystem-dev_files += "${prefix}/include/avsystem/*.h"
164
165 libavsysaudio_files = ""
166 libavsysaudio_files += "avsystem.manifest"
167 libavsysaudio_files += "${prefix}/lib/lib*.so.*"
168
169 FILES_${PN} = "${avsystem_files}"
170 FILES_${PN}-dev = "${avsystem-dev_files}"
171 FILES_libavsysaudio = "${libavsysaudio_files}"
172
173 PKG_avsystem= "avsystem"
174 PKG_avsystem-dev= "avsystem-dev"
175 PKG_libavsysaudio= "libavsysaudio"
176
177 require avsystem-extraconf.inc
178