]> git.pld-linux.org Git - packages/libvpx.git/blame - libvpx.spec
add target for armv7hnl
[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
b5845f90 20Version: 1.11.0
05641fc7 21Release: 1
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
26#Source0Download: https://github.com/webmproject/libvpx/releases
27Source0: https://github.com/webmproject/libvpx/archive/v%{version}/%{name}-%{version}.tar.gz
b5845f90 28# Source0-md5: 82e5e527336b41281a582204db1f3457
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}
a7d444e9
ER
36%if %{with doc}
37BuildRequires: %{php_name}-pcre
38BuildRequires: %{php_name}-program
39%endif
bccc9f86
AM
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
e1331b3a
ER
42%define generic_target generic-gnu
43%define vpxtarget %{generic_target}
44%ifarch %{x8664}
45%define vpxtarget x86_64-linux-gcc
46%endif
47%ifarch %{ix86}
48%define vpxtarget x86-linux-gcc
49%endif
50%ifarch ppc
51%define vpxtarget ppc32-linux-gcc
52%endif
53%ifarch ppc64
54%define vpxtarget ppc64-linux-gcc
55%endif
5ae03088
JP
56%ifarch aarch64
57%define vpxtarget arm64-linux-gcc
58%endif
978085cf
JP
59%ifarch armv7hnl
60%define vpxtarget armv7-linux-gcc
61%endif
e1331b3a 62
bccc9f86
AM
63%description
64VP8, a high-quality video codec.
65
d5d82930
JB
66%description -l pl.UTF-8
67VP8 - kodek obrazu wysokiej jakości.
68
bccc9f86 69%package devel
d5d82930
JB
70Summary: Header files for libvpx
71Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx
bccc9f86 72Group: Development/Libraries
d5d82930 73Requires: %{name} = %{version}-%{release}
bccc9f86
AM
74
75%description devel
d5d82930
JB
76Header files for libvpx library.
77
78%description devel -l pl.UTF-8
79Pliki nagłówkowe biblioteki libvpx.
bccc9f86
AM
80
81%package static
82Summary: Static libvpx library
d5d82930 83Summary(pl.UTF-8): Statyczna biblioteka libvpx
bccc9f86 84Group: Development/Libraries
d5d82930 85Requires: %{name}-devel = %{version}-%{release}
bccc9f86
AM
86
87%description static
88Static libvpx library.
89
d5d82930
JB
90%description static -l pl.UTF-8
91Statyczna biblioteka libvpx.
92
59ff1590
JB
93%package tools
94Summary: VPX decoding/encoding tools
95Summary(pl.UTF-8): Narzędzia do kodowania/dekodowania formatu VPX
96Group: Applications/Graphics
97Requires: %{name} = %{version}-%{release}
98
99%description tools
100VPX decoding/encoding tools.
101
102%description tools -l pl.UTF-8
103Narzędzia do kodowania/dekodowania formatu VPX.
104
bccc9f86 105%prep
5df4ed4b 106%setup -q
bccc9f86
AM
107
108%build
d5d82930
JB
109install -d obj
110cd obj
bccc9f86 111# not autoconf configure
2f02a711
JB
112CC="%{__cc}" \
113CXX="%{__cxx}" \
28316222 114CFLAGS="%{rpmcflags} %{rpmcppflags}" \
bccc9f86 115../configure \
7b991969 116%if %{with asm}
dcde509e 117 --as=yasm \
61956466 118%endif
e1331b3a 119 --target=%{vpxtarget} \
6c7c0f8b 120 --enable-shared \
5f38e725 121 %{!?with_ssse3:--disable-ssse3} \
0257ab6e 122 --disable-optimizations \
2f397753 123 --%{!?with_tests:dis}%{?with_tests:en}able-unit-tests \
f0a288d6
ER
124 --%{!?with_doc:dis}%{?with_doc:en}able-docs \
125 --%{!?with_doc:dis}%{?with_doc:en}able-install-docs \
bccc9f86 126 --enable-vp8 \
2f02a711 127 --enable-vp8 \
bccc9f86
AM
128 --enable-postproc \
129 --enable-runtime-cpu-detect
0257ab6e 130
0257ab6e 131%{__make} verbose=true target=libs \
938aec6f 132 HAVE_GNU_STRIP=no \
6c7c0f8b 133 LDFLAGS="%{rpmldflags}"
0257ab6e
AM
134
135%{__make} verbose=true target=examples \
dcde509e 136 LDFLAGS="%{rpmldflags} -L."
a7d444e9
ER
137
138%if %{with doc}
0257ab6e 139%{__make} verbose=true target=docs
a7d444e9 140%endif
0257ab6e 141
bccc9f86
AM
142%install
143rm -rf $RPM_BUILD_ROOT
464fefd2 144install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}}
0257ab6e 145
6c7c0f8b 146%{__make} -C obj verbose=true install \
938aec6f
ER
147 LIBSUBDIR=%{_lib} \
148 DIST_DIR=$RPM_BUILD_ROOT%{_prefix}
0257ab6e 149
61c9fbe7 150# redundant minor version symlink (not SONAME)
b5845f90 151%{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.7.0
9026bd8c
JB
152
153# adjust prefix and libdir
3c828a1d 154%{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc
bccc9f86
AM
155
156%clean
157rm -rf $RPM_BUILD_ROOT
158
2f397753 159%post -p /sbin/ldconfig
bccc9f86
AM
160%postun -p /sbin/ldconfig
161
162%files
163%defattr(644,root,root,755)
d5d82930 164%doc AUTHORS CHANGELOG LICENSE PATENTS README
47f853c3 165%attr(755,root,root) %{_libdir}/libvpx.so.*.*.*
b5845f90 166%attr(755,root,root) %ghost %{_libdir}/libvpx.so.7
bccc9f86
AM
167
168%files devel
169%defattr(644,root,root,755)
47f853c3 170%attr(755,root,root) %{_libdir}/libvpx.so
464fefd2 171%{_includedir}/vpx
9026bd8c 172%{_pkgconfigdir}/vpx.pc
bccc9f86
AM
173
174%files static
175%defattr(644,root,root,755)
0257ab6e 176%{_libdir}/libvpx.a
59ff1590
JB
177
178%files tools
179%defattr(644,root,root,755)
180%attr(755,root,root) %{_bindir}/vpxdec
181%attr(755,root,root) %{_bindir}/vpxenc
This page took 0.062864 seconds and 4 git commands to generate.