Add build option for security
[platform/upstream/libvpx.git] / packaging / libvpx.spec
1 Name:           libvpx
2 Version:        1.12.0
3 Release:        2
4 License:        BSD-3-Clause
5 Summary:        VP8 codec library
6 Url:            http://www.webmproject.org/
7 #X-Vc-Url:      https://chromium.googlesource.com/webm/libvpx
8 Group:          Multimedia/Libraries
9 Source0:        http://webm.googlecode.com/files/%{name}-v%{version}.tar.bz2
10 Source1001:     libvpx.manifest
11 BuildRequires:  yasm
12
13 %description
14 WebM is an open, royalty-free, media file format designed for the web.
15
16 WebM defines the file container structure, video and audio formats.
17 WebM files consist of video streams compressed with the VP8 video codec
18 and audio streams compressed with the Vorbis audio codec.
19 The WebM file structure is based on the Matroska container.
20
21 %package -n vpx-tools
22 Summary:        VP8 codec library - Utilities
23
24 %description -n vpx-tools
25 This package contains utilities around the vp8 codec sdk.
26
27 WebM is an open, royalty-free, media file format designed for the web.
28
29 WebM defines the file container structure, video and audio formats.
30 WebM files consist of video streams compressed with the VP8 video codec
31 and audio streams compressed with the Vorbis audio codec.
32 The WebM file structure is based on the Matroska container.
33 %package devel
34 Summary:        VP8 codec library - Development headers
35 Requires:       %{name} = %{version}-%{release}
36
37 %description devel
38 Development headers and library
39
40 WebM is an open, royalty-free, media file format designed for the web.
41
42 WebM defines the file container structure, video and audio formats.
43 WebM files consist of video streams compressed with the VP8 video codec
44 and audio streams compressed with the Vorbis audio codec.
45 The WebM file structure is based on the Matroska container.
46
47 %prep
48 %setup -q -n %name-v%version
49 cp %{SOURCE1001} .
50
51 %build
52 cd build
53 export CFLAGS="%{optflags}"
54 export LDFLAGS+=" -Wl,-z,relro"
55 %if "%{asan}" == "1"
56 export LDFLAGS+=" -lasan"
57 %endif
58 # It is only an emulation of autotools configure; the macro does not work
59
60 # libvpx default enable NEON support on ARMv7, unfortunately some ARMv7
61 # CPU doesn't have NEON, e.g. NVIDIA Tegra 2.
62 # So, we still set -mfpu=neon when build libvpx rpm, but also enable
63 # runtime-cpu-detect for runtime detect NEON.
64 ../configure \
65     --prefix=%{_prefix} \
66     --libdir=%{_libdir} \
67     --enable-debug \
68     --enable-shared \
69 %ifarch armv7l armv7hl
70     --target=armv7-linux-gcc \
71     --enable-runtime-cpu-detect \
72 %endif
73     --enable-pic
74
75 %__make %{?_smp_mflags}
76
77 %install
78 cd build
79 %make_install
80
81 %post -n %{name} -p /sbin/ldconfig
82
83 %postun -n %{name} -p /sbin/ldconfig
84
85 %files -n vpx-tools
86 %manifest %{name}.manifest
87 %defattr(-,root,root)
88 %{_bindir}/*
89
90 %files
91 %manifest %{name}.manifest
92 %defattr(-, root, root)
93 %license LICENSE
94 %{_libdir}/libvpx.so.*
95
96 %files devel
97 %manifest %{name}.manifest
98 %defattr(-,root,root)
99 %{_includedir}/vpx/
100 %{_libdir}/pkgconfig/vpx.pc
101 %{_libdir}/libvpx.so