]> git.pld-linux.org Git - packages/libvpx.git/blame - libvpx.spec
compiling tests require g++
[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
2f397753 5%bcond_without tests # build without tests
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
1e757208 20Version: 1.3.0
1c3357c1 21Release: 1
bccc9f86
AM
22License: BSD
23Group: Libraries
1e757208
JB
24#Source0Download: http://code.google.com/p/webm/downloads/list
25#Source0: https://webm.googlecode.com/files/%{name}-v%{version}.tar.bz2
488ced65
JB
26# source, but regenerated on each fetch
27#Source0: https://chromium.googlesource.com/webm/libvpx/+archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
28Source0: %{name}-%{version}.tar.gz
1e757208 29# Source0-md5: dcf436a5dc8b56bdfb4aec63b2fe6729
bccc9f86 30URL: http://www.webmproject.org/
a28e5963 31BuildRequires: doxygen
71ced3dc 32%{?with_tests:BuildRequires: libstdc++-devel}
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
56
bccc9f86
AM
57%description
58VP8, a high-quality video codec.
59
d5d82930
JB
60%description -l pl.UTF-8
61VP8 - kodek obrazu wysokiej jakości.
62
bccc9f86 63%package devel
d5d82930
JB
64Summary: Header files for libvpx
65Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx
bccc9f86 66Group: Development/Libraries
d5d82930 67Requires: %{name} = %{version}-%{release}
bccc9f86
AM
68
69%description devel
d5d82930
JB
70Header files for libvpx library.
71
72%description devel -l pl.UTF-8
73Pliki nagłówkowe biblioteki libvpx.
bccc9f86
AM
74
75%package static
76Summary: Static libvpx library
d5d82930 77Summary(pl.UTF-8): Statyczna biblioteka libvpx
bccc9f86 78Group: Development/Libraries
d5d82930 79Requires: %{name}-devel = %{version}-%{release}
bccc9f86
AM
80
81%description static
82Static libvpx library.
83
d5d82930
JB
84%description static -l pl.UTF-8
85Statyczna biblioteka libvpx.
86
bccc9f86 87%prep
1e757208 88#%setup -q -n %{name}-v%{version}
5f38e725 89%setup -qc
bccc9f86
AM
90
91%build
d5d82930
JB
92install -d obj
93cd obj
bccc9f86 94# not autoconf configure
d5d82930 95CFLAGS="%{rpmcflags} %{rpmcppflags}" \
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
AM
107 --enable-vp8 \
108 --enable-postproc \
109 --enable-runtime-cpu-detect
0257ab6e 110
0257ab6e 111%{__make} verbose=true target=libs \
938aec6f 112 HAVE_GNU_STRIP=no \
6c7c0f8b 113 CC="%{__cc}" \
7fb20346 114 LD="%{__cc}" \
6c7c0f8b 115 LDFLAGS="%{rpmldflags}"
0257ab6e
AM
116
117%{__make} verbose=true target=examples \
6c7c0f8b 118 CC="%{__cc}" \
7fb20346 119 LD="%{__cc}" \
dcde509e 120 LDFLAGS="%{rpmldflags} -L."
a7d444e9
ER
121
122%if %{with doc}
0257ab6e 123%{__make} verbose=true target=docs
a7d444e9 124%endif
0257ab6e 125
bccc9f86
AM
126%install
127rm -rf $RPM_BUILD_ROOT
464fefd2 128install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}}
0257ab6e 129
6c7c0f8b 130%{__make} -C obj verbose=true install \
938aec6f
ER
131 LIBSUBDIR=%{_lib} \
132 DIST_DIR=$RPM_BUILD_ROOT%{_prefix}
0257ab6e 133
1e757208 134%{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.1.3
9026bd8c
JB
135
136# adjust prefix and libdir
3c828a1d 137%{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc
bccc9f86
AM
138
139%clean
140rm -rf $RPM_BUILD_ROOT
141
2f397753 142%post -p /sbin/ldconfig
bccc9f86
AM
143%postun -p /sbin/ldconfig
144
145%files
146%defattr(644,root,root,755)
d5d82930 147%doc AUTHORS CHANGELOG LICENSE PATENTS README
1c3357c1 148%attr(755,root,root) %{_bindir}/vp8_scalable_patterns
1e757208 149%attr(755,root,root) %{_bindir}/vp9_spatial_scalable_encoder
d5d82930
JB
150%attr(755,root,root) %{_bindir}/vpxdec
151%attr(755,root,root) %{_bindir}/vpxenc
47f853c3 152%attr(755,root,root) %{_libdir}/libvpx.so.*.*.*
1c3357c1 153%attr(755,root,root) %ghost %{_libdir}/libvpx.so.1
bccc9f86
AM
154
155%files devel
156%defattr(644,root,root,755)
47f853c3 157%attr(755,root,root) %{_libdir}/libvpx.so
464fefd2 158%{_includedir}/vpx
9026bd8c 159%{_pkgconfigdir}/vpx.pc
bccc9f86
AM
160
161%files static
162%defattr(644,root,root,755)
0257ab6e 163%{_libdir}/libvpx.a
This page took 0.076414 seconds and 4 git commands to generate.