]> git.pld-linux.org Git - packages/libvpx.git/blame - libvpx.spec
- release 2
[packages/libvpx.git] / libvpx.spec
CommitLineData
c9ee805b
ER
1#
2# Conditional build:
d5d82930 3%bcond_without asm # x86 assembler
a7d444e9 4%bcond_without doc # don't build doc
ecadc52c 5%bcond_with tests # build tests (not useful, creates libgtest.a)
5f38e725
ER
6%bcond_without ssse3 # use SSSE3 instructions (Intel since Core2, Via Nano)
7
30fcd8a5 8%ifnarch %{ix86} %{x8664} x32
f2369026
ER
9%undefine with_asm
10%endif
11
5f38e725
ER
12%if "%{pld_release}" == "ac"
13# not supported by compiler
14%undefine with_ssse3
15%endif
3c828a1d 16
bccc9f86 17Summary: VP8, a high-quality video codec
d5d82930 18Summary(pl.UTF-8): VP8 - kodek obrazu wysokiej jakości
bccc9f86 19Name: libvpx
6aeba968 20Version: 1.12.0
63366158 21Release: 2
bccc9f86
AM
22License: BSD
23Group: Libraries
5d57f493
JB
24# original download URL: http://downloads.webmproject.org/releases/webm/index.html
25# ...but use github mirror to get consistent tarballs
6aeba968 26#Source0Download: https://github.com/webmproject/libvpx/tags
5d57f493 27Source0: https://github.com/webmproject/libvpx/archive/v%{version}/%{name}-%{version}.tar.gz
6aeba968 28# Source0-md5: 10cf85debdd07be719a35ca3bfb8ea64
a0961f7e 29URL: https://www.webmproject.org/
a28e5963 30BuildRequires: doxygen
71ced3dc 31%{?with_tests:BuildRequires: libstdc++-devel}
efdc9f5e 32BuildRequires: pkgconfig
a7d444e9 33BuildRequires: rpmbuild(macros) >= 1.673
9026bd8c 34BuildRequires: sed >= 4.0
3c828a1d 35%{?with_asm:BuildRequires: yasm >= 0.8}
bccc9f86
AM
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
e1331b3a
ER
38%define generic_target generic-gnu
39%define vpxtarget %{generic_target}
40%ifarch %{x8664}
41%define vpxtarget x86_64-linux-gcc
42%endif
43%ifarch %{ix86}
44%define vpxtarget x86-linux-gcc
45%endif
46%ifarch ppc
47%define vpxtarget ppc32-linux-gcc
48%endif
49%ifarch ppc64
50%define vpxtarget ppc64-linux-gcc
51%endif
5ae03088
JP
52%ifarch aarch64
53%define vpxtarget arm64-linux-gcc
54%endif
978085cf
JP
55%ifarch armv7hnl
56%define vpxtarget armv7-linux-gcc
57%endif
e1331b3a 58
bccc9f86
AM
59%description
60VP8, a high-quality video codec.
61
d5d82930
JB
62%description -l pl.UTF-8
63VP8 - kodek obrazu wysokiej jakości.
64
bccc9f86 65%package devel
d5d82930
JB
66Summary: Header files for libvpx
67Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx
bccc9f86 68Group: Development/Libraries
d5d82930 69Requires: %{name} = %{version}-%{release}
bccc9f86
AM
70
71%description devel
d5d82930
JB
72Header files for libvpx library.
73
74%description devel -l pl.UTF-8
75Pliki nagłówkowe biblioteki libvpx.
bccc9f86
AM
76
77%package static
78Summary: Static libvpx library
d5d82930 79Summary(pl.UTF-8): Statyczna biblioteka libvpx
bccc9f86 80Group: Development/Libraries
d5d82930 81Requires: %{name}-devel = %{version}-%{release}
bccc9f86
AM
82
83%description static
84Static libvpx library.
85
d5d82930
JB
86%description static -l pl.UTF-8
87Statyczna biblioteka libvpx.
88
59ff1590
JB
89%package tools
90Summary: VPX decoding/encoding tools
91Summary(pl.UTF-8): Narzędzia do kodowania/dekodowania formatu VPX
92Group: Applications/Graphics
93Requires: %{name} = %{version}-%{release}
94
95%description tools
96VPX decoding/encoding tools.
97
98%description tools -l pl.UTF-8
99Narzędzia do kodowania/dekodowania formatu VPX.
100
bccc9f86 101%prep
5df4ed4b 102%setup -q
bccc9f86
AM
103
104%build
d5d82930
JB
105install -d obj
106cd obj
bccc9f86 107# not autoconf configure
2f02a711
JB
108CC="%{__cc}" \
109CXX="%{__cxx}" \
28316222 110CFLAGS="%{rpmcflags} %{rpmcppflags}" \
bccc9f86 111../configure \
7b991969 112%if %{with asm}
dcde509e 113 --as=yasm \
61956466 114%endif
e1331b3a 115 --target=%{vpxtarget} \
6c7c0f8b 116 --enable-shared \
5f38e725 117 %{!?with_ssse3:--disable-ssse3} \
0257ab6e 118 --disable-optimizations \
2f397753 119 --%{!?with_tests:dis}%{?with_tests:en}able-unit-tests \
f0a288d6
ER
120 --%{!?with_doc:dis}%{?with_doc:en}able-docs \
121 --%{!?with_doc:dis}%{?with_doc:en}able-install-docs \
bccc9f86 122 --enable-vp8 \
2f02a711 123 --enable-vp8 \
bccc9f86
AM
124 --enable-postproc \
125 --enable-runtime-cpu-detect
0257ab6e 126
0257ab6e 127%{__make} verbose=true target=libs \
938aec6f 128 HAVE_GNU_STRIP=no \
6c7c0f8b 129 LDFLAGS="%{rpmldflags}"
0257ab6e
AM
130
131%{__make} verbose=true target=examples \
dcde509e 132 LDFLAGS="%{rpmldflags} -L."
a7d444e9
ER
133
134%if %{with doc}
0257ab6e 135%{__make} verbose=true target=docs
a7d444e9 136%endif
0257ab6e 137
bccc9f86
AM
138%install
139rm -rf $RPM_BUILD_ROOT
464fefd2 140install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}}
0257ab6e 141
6c7c0f8b 142%{__make} -C obj verbose=true install \
938aec6f
ER
143 LIBSUBDIR=%{_lib} \
144 DIST_DIR=$RPM_BUILD_ROOT%{_prefix}
0257ab6e 145
61c9fbe7 146# redundant minor version symlink (not SONAME)
6aeba968 147%{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.7.1
9026bd8c
JB
148
149# adjust prefix and libdir
3c828a1d 150%{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc
bccc9f86
AM
151
152%clean
153rm -rf $RPM_BUILD_ROOT
154
2f397753 155%post -p /sbin/ldconfig
bccc9f86
AM
156%postun -p /sbin/ldconfig
157
158%files
159%defattr(644,root,root,755)
d5d82930 160%doc AUTHORS CHANGELOG LICENSE PATENTS README
47f853c3 161%attr(755,root,root) %{_libdir}/libvpx.so.*.*.*
b5845f90 162%attr(755,root,root) %ghost %{_libdir}/libvpx.so.7
bccc9f86
AM
163
164%files devel
165%defattr(644,root,root,755)
47f853c3 166%attr(755,root,root) %{_libdir}/libvpx.so
464fefd2 167%{_includedir}/vpx
9026bd8c 168%{_pkgconfigdir}/vpx.pc
bccc9f86
AM
169
170%files static
171%defattr(644,root,root,755)
0257ab6e 172%{_libdir}/libvpx.a
59ff1590
JB
173
174%files tools
175%defattr(644,root,root,755)
176%attr(755,root,root) %{_bindir}/vpxdec
177%attr(755,root,root) %{_bindir}/vpxenc
This page took 0.092734 seconds and 4 git commands to generate.