]> git.pld-linux.org Git - packages/libvpx.git/blame - libvpx.spec
- release 1 (by relup.sh)
[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
f2369026
ER
8%ifnarch %{ix86} %{x8664}
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
aa7aed28 20Version: 1.4.0
68afcbed 21Release: 1
bccc9f86
AM
22License: BSD
23Group: Libraries
aa7aed28 24# Source in git web, but regenerated on each fetch, so use gentoo tarball instead
488ced65 25#Source0: https://chromium.googlesource.com/webm/libvpx/+archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
aa7aed28
ER
26Source0: http://distfiles.gentoo.org/distfiles/%{name}-%{version}.tar.bz2
27# Source0-md5: 63b1d7f59636a42eeeee9225cc14e7de
bccc9f86 28URL: http://www.webmproject.org/
a28e5963 29BuildRequires: doxygen
71ced3dc 30%{?with_tests:BuildRequires: libstdc++-devel}
efdc9f5e 31BuildRequires: pkgconfig
a7d444e9 32BuildRequires: rpmbuild(macros) >= 1.673
9026bd8c 33BuildRequires: sed >= 4.0
3c828a1d 34%{?with_asm:BuildRequires: yasm >= 0.8}
a7d444e9
ER
35%if %{with doc}
36BuildRequires: %{php_name}-pcre
37BuildRequires: %{php_name}-program
38%endif
bccc9f86
AM
39BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
e1331b3a
ER
41%define generic_target generic-gnu
42%define vpxtarget %{generic_target}
43%ifarch %{x8664}
44%define vpxtarget x86_64-linux-gcc
45%endif
46%ifarch %{ix86}
47%define vpxtarget x86-linux-gcc
48%endif
49%ifarch ppc
50%define vpxtarget ppc32-linux-gcc
51%endif
52%ifarch ppc64
53%define vpxtarget ppc64-linux-gcc
54%endif
55
bccc9f86
AM
56%description
57VP8, a high-quality video codec.
58
d5d82930
JB
59%description -l pl.UTF-8
60VP8 - kodek obrazu wysokiej jakości.
61
bccc9f86 62%package devel
d5d82930
JB
63Summary: Header files for libvpx
64Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx
bccc9f86 65Group: Development/Libraries
d5d82930 66Requires: %{name} = %{version}-%{release}
bccc9f86
AM
67
68%description devel
d5d82930
JB
69Header files for libvpx library.
70
71%description devel -l pl.UTF-8
72Pliki nagłówkowe biblioteki libvpx.
bccc9f86
AM
73
74%package static
75Summary: Static libvpx library
d5d82930 76Summary(pl.UTF-8): Statyczna biblioteka libvpx
bccc9f86 77Group: Development/Libraries
d5d82930 78Requires: %{name}-devel = %{version}-%{release}
bccc9f86
AM
79
80%description static
81Static libvpx library.
82
d5d82930
JB
83%description static -l pl.UTF-8
84Statyczna biblioteka libvpx.
85
bccc9f86 86%prep
aa7aed28 87%setup -q
bccc9f86
AM
88
89%build
d5d82930
JB
90install -d obj
91cd obj
bccc9f86 92# not autoconf configure
2f02a711
JB
93CC="%{__cc}" \
94CXX="%{__cxx}" \
16ab9c5e 95CFLAGS="%{rpmcflags} %{rpmcppflags} %{!?with_asm:-DYUV_DISABLE_ASM}" \
bccc9f86 96../configure \
7b991969 97%if %{with asm}
dcde509e 98 --as=yasm \
61956466 99%endif
e1331b3a 100 --target=%{vpxtarget} \
6c7c0f8b 101 --enable-shared \
5f38e725 102 %{!?with_ssse3:--disable-ssse3} \
0257ab6e 103 --disable-optimizations \
2f397753 104 --%{!?with_tests:dis}%{?with_tests:en}able-unit-tests \
f0a288d6
ER
105 --%{!?with_doc:dis}%{?with_doc:en}able-docs \
106 --%{!?with_doc:dis}%{?with_doc:en}able-install-docs \
bccc9f86 107 --enable-vp8 \
2f02a711 108 --enable-vp8 \
bccc9f86
AM
109 --enable-postproc \
110 --enable-runtime-cpu-detect
0257ab6e 111
0257ab6e 112%{__make} verbose=true target=libs \
938aec6f 113 HAVE_GNU_STRIP=no \
6c7c0f8b 114 LDFLAGS="%{rpmldflags}"
0257ab6e
AM
115
116%{__make} verbose=true target=examples \
dcde509e 117 LDFLAGS="%{rpmldflags} -L."
a7d444e9
ER
118
119%if %{with doc}
0257ab6e 120%{__make} verbose=true target=docs
a7d444e9 121%endif
0257ab6e 122
bccc9f86
AM
123%install
124rm -rf $RPM_BUILD_ROOT
464fefd2 125install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}}
0257ab6e 126
6c7c0f8b 127%{__make} -C obj verbose=true install \
938aec6f
ER
128 LIBSUBDIR=%{_lib} \
129 DIST_DIR=$RPM_BUILD_ROOT%{_prefix}
0257ab6e 130
2f02a711 131%{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.2.0
9026bd8c
JB
132
133# adjust prefix and libdir
3c828a1d 134%{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc
bccc9f86
AM
135
136%clean
137rm -rf $RPM_BUILD_ROOT
138
2f397753 139%post -p /sbin/ldconfig
bccc9f86
AM
140%postun -p /sbin/ldconfig
141
142%files
143%defattr(644,root,root,755)
d5d82930
JB
144%doc AUTHORS CHANGELOG LICENSE PATENTS README
145%attr(755,root,root) %{_bindir}/vpxdec
146%attr(755,root,root) %{_bindir}/vpxenc
47f853c3 147%attr(755,root,root) %{_libdir}/libvpx.so.*.*.*
2f02a711 148%attr(755,root,root) %ghost %{_libdir}/libvpx.so.2
bccc9f86
AM
149
150%files devel
151%defattr(644,root,root,755)
47f853c3 152%attr(755,root,root) %{_libdir}/libvpx.so
464fefd2 153%{_includedir}/vpx
9026bd8c 154%{_pkgconfigdir}/vpx.pc
bccc9f86
AM
155
156%files static
157%defattr(644,root,root,755)
0257ab6e 158%{_libdir}/libvpx.a
This page took 0.109811 seconds and 4 git commands to generate.