Enable VP8 & VP9 decoder and add patch related with VP8 & VP9
[platform/upstream/libav.git] / packaging / libav.spec
1 Name:       libav
2 Summary:    AV codec lib
3 Version:    11.4
4 Release:    0
5 Group:      Multimedia/Libraries
6 URL:        http://libav.org
7 License:    LGPL-2.1+
8 Source0:    %{name}-%{version}.tar.gz
9
10
11 %description
12 AV codec library
13
14 %package -n libavtools
15 Summary:    AV tools
16 Group:      Multimedia/Libraries
17
18 %description -n libavtools
19 AV tools binary
20
21 %package -n libavcodec
22 Summary:    AV codec lib
23 Group:      Multimedia/Libraries
24
25 %description -n libavcodec
26 AV codec library
27
28 %package -n libavcodec-devel
29 Summary:    AV codec lib (devel)
30 Group:      Multimedia/Libraries
31 Requires:   libavcodec = %{version}-%{release}
32
33 %description -n libavcodec-devel
34 AV codec library (devel)
35
36 %package -n libavformat
37 Summary:    AV format lib
38 Group:      Multimedia/Libraries
39
40 %description -n libavformat
41 AV format library
42
43 %package -n libavformat-devel
44 Summary:    AV format lib (devel)
45 Group:      Multimedia/Libraries
46 Requires:   libavformat = %{version}-%{release}
47
48 %description -n libavformat-devel
49 AV format library (devel)
50
51 %package -n libavutil
52 Summary:    AV util lib
53 Group:      Multimedia/Libraries
54
55 %description -n libavutil
56 AV util library
57
58 %package -n libavutil-devel
59 Summary:    AV util lib (devel)
60 Group:      Multimedia/Libraries
61 Requires:   libavutil = %{version}-%{release}
62
63 %description -n libavutil-devel
64 AV util library (devel)
65
66 %package -n libavfilter
67 Summary:    AV util lib
68 Group:      Multimedia/Libraries
69
70 %description -n libavfilter
71 AV filter library
72
73 %package -n libavfilter-devel
74 Summary:    AV util lib (devel)
75 Group:      Multimedia/Libraries
76 Requires:   libavfilter = %{version}-%{release}
77
78 %description -n libavfilter-devel
79 AV filter library (devel)
80
81 %package -n libswscale
82 Summary:    SW scale lib
83 Group:      Multimedia/Libraries
84
85 %description -n libswscale
86 development files for libswsacle
87
88 %package -n libswscale-devel
89 Summary:    SW scale lib (devel)
90 Group:      Multimedia/Libraries
91 Requires:   libswscale = %{version}-%{release}
92
93 %description -n libswscale-devel
94 development files for libswsacle
95
96
97 %prep
98 %setup -q
99
100 export CONFIGURE_OPTIONS="--enable-shared    --disable-static   \
101 --disable-version3  --disable-devices   --disable-nonfree --disable-gpl --disable-doc \
102 --disable-zlib    --disable-network \
103 --disable-avdevice \
104 --disable-bsfs      --disable-filters \
105 --enable-filter=buffer  --enable-filter=buffersink      --enable-filter=crop \
106 --enable-filter=hflip   --enable-filter=lut     --enable-filter=lutyuv \
107 --enable-filter=lutrgb  --enable-filter=overlay --enable-filter=scale \
108 --enable-filter=transpose       --enable-filter=unsharp --enable-filter=vflip \
109 --disable-protocols \
110 --disable-avresample \
111 --enable-protocol=file \
112 --disable-encoders \
113 --disable-muxers \
114 --disable-parsers \
115 --enable-parser=aac     --enable-parser=h264            --enable-parser=mpegaudio \
116 --enable-parser=h263    --enable-parser=mpeg4video      --enable-parser=mpegvideo \
117 --enable-parser=hevc \
118 --disable-demuxers \
119 --enable-demuxer=aac    --enable-demuxer=h264   --enable-demuxer=mpegts \
120 --enable-demuxer=amr    --enable-demuxer=m4v    --enable-demuxer=mpegtsraw \
121 --enable-demuxer=asf    --enable-demuxer=mmf    --enable-demuxer=mpegvideo \
122 --enable-demuxer=avi    --enable-demuxer=mov    --enable-demuxer=ogg \
123 --enable-demuxer=flac   --enable-demuxer=mp3    --enable-demuxer=wav \
124 --enable-demuxer=h263   --enable-demuxer=mpegps --enable-demuxer=matroska \
125 --enable-demuxer=dv             --enable-demuxer=flv    --enable-demuxer=rm \
126 --enable-demuxer=aiff   --enable-muxer=mpeg1video       --enable-muxer=mpeg2video       --enable-demuxer=hevc \
127 --disable-decoders \
128 --enable-decoder=alac   --enable-decoder=h264           --enable-decoder=wmv1 \
129 --enable-decoder=flac   --enable-decoder=mpeg4          --enable-decoder=wmv2 \
130 --enable-decoder=h263   --enable-decoder=mpegvideo      --enable-decoder=wmv3 \
131 --enable-decoder=vc1    --enable-decoder=flv            --enable-decoder=rv40 \
132 --enable-decoder=h263i  --enable-decoder=theora         --enable-decoder=mpeg1video     --enable-decoder=mpeg2video \
133 --enable-decoder=pcm_alaw  --enable-decoder=pcm_mulaw \
134 --enable-decoder=msmpeg4v3      --enable-decoder=hevc   --enable-encoder=libx265 \
135 --enable-encoder=h263   --enable-encoder=h263p  --enable-encoder=mpeg4 \
136 --enable-decoder=bmp    --enable-encoder=bmp    --enable-encoder=mpeg1video     --enable-encoder=mpeg2video \
137 --enable-decoder=tiff \
138 --enable-decoder=mp3  --enable-decoder=amrnb    \
139 --enable-encoder=aac  --enable-decoder=aac      \
140 --enable-swscale        --disable-yasm   \
141 --enable-fft    --enable-rdft   --enable-mdct   --enable-neon \
142 %{?asan:--disable-inline-asm} \
143 "
144
145 %if 0%{?TIZEN_PRODUCT_TV}
146 export CONFIGURE_OPTIONS+="--enable-parser=vp8   --enable-decoder=vp8           --enable-decoder=vp9 "
147 %else
148 %endif
149
150 %ifarch %{arm} aarch64
151 export CONFIGURE_OPTIONS+="--disable-mmx "
152 %else
153 %endif
154
155 CFLAGS="%{optflags} -fPIC -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" "; export CFLAGS
156
157 %ifarch %{arm}
158 export CONFIGURE_OPTIONS+="--extra-cflags=-mfpu=neon"
159 %endif
160
161 ./configure \
162     --prefix=%{_prefix} \
163     --libdir=%_libdir \
164     --shlibdir=%_libdir \
165     $CONFIGURE_OPTIONS
166
167 %build
168
169
170 %__make %{?_smp_mflags}
171
172 %install
173 rm -rf %{buildroot}
174 %make_install
175
176 %post -p /sbin/ldconfig
177
178 %postun -p /sbin/ldconfig
179
180 %files -n libavtools
181 %manifest libavtools.manifest
182 %defattr(-,root,root,-)
183 %{_bindir}/av*
184 %{_datadir}/avconv/*.avpreset
185
186 %files -n libavcodec
187 %manifest libavcodec.manifest
188 %defattr(-,root,root,-)
189 %{_libdir}/libavcodec.so.*
190 %license COPYING.LGPLv2.1
191 %post -n libavcodec -p /sbin/ldconfig
192 %postun -n libavcodec -p /sbin/ldconfig
193
194 %files -n libavformat
195 %manifest libavformat.manifest
196 %defattr(-,root,root,-)
197 %{_libdir}/libavformat.so.*
198 %license COPYING.LGPLv2.1
199 %post -n libavformat -p /sbin/ldconfig
200 %postun -n libavformat -p /sbin/ldconfig
201
202 %files -n libavutil
203 %manifest libavutil.manifest
204 %defattr(-,root,root,-)
205 %{_libdir}/libavutil.so.*
206 %license COPYING.LGPLv2.1
207 %post -n libavutil -p /sbin/ldconfig
208 %postun -n libavutil -p /sbin/ldconfig
209
210 %files -n libavfilter
211 %manifest libavfilter.manifest
212 %defattr(-,root,root,-)
213 %{_libdir}/libavfilter.so.*
214 %license COPYING.LGPLv2.1
215 %post -n libavfilter -p /sbin/ldconfig
216 %postun -n libavfilter -p /sbin/ldconfig
217
218 %files -n libswscale
219 %manifest libswscale.manifest
220 %defattr(-,root,root,-)
221 %{_libdir}/libswscale.so.*
222 %license COPYING.LGPLv2.1
223 %post -n libswscale -p /sbin/ldconfig
224 %postun -n libswscale -p /sbin/ldconfig
225
226 %files -n libavcodec-devel
227 %defattr(-,root,root,-)
228 %_includedir/libavcodec/*
229 %_libdir/libavcodec.so
230 %_libdir/pkgconfig/libavcodec.pc
231
232 %files -n libavformat-devel
233 %defattr(-,root,root,-)
234 %_includedir/libavformat/*
235 %_libdir/libavformat.so
236 %_libdir/pkgconfig/libavformat.pc
237
238 %files -n libavutil-devel
239 %defattr(-,root,root,-)
240 %_includedir/libavutil/*
241 %_libdir/libavutil.so
242 %_libdir/pkgconfig/libavutil.pc
243
244 %files -n libavfilter-devel
245 %defattr(-,root,root,-)
246 %_includedir/libavfilter/*
247 %_libdir/libavfilter.so
248 %_libdir/pkgconfig/libavfilter.pc
249
250 %files -n libswscale-devel
251 %defattr(-,root,root,-)
252 %_includedir/libswscale/*
253 %_libdir/libswscale.so
254 %_libdir/pkgconfig/libswscale.pc