]> git.pld-linux.org Git - packages/libvpx.git/blame - libvpx.spec
be clear that php is required for docs build
[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
5f38e725
ER
5%bcond_without ssse3 # use SSSE3 instructions (Intel since Core2, Via Nano)
6
7%if "%{pld_release}" == "ac"
8# not supported by compiler
9%undefine with_ssse3
10%endif
3c828a1d 11
bccc9f86 12Summary: VP8, a high-quality video codec
d5d82930 13Summary(pl.UTF-8): VP8 - kodek obrazu wysokiej jakości
bccc9f86 14Name: libvpx
1e757208 15Version: 1.3.0
1c3357c1 16Release: 1
bccc9f86
AM
17License: BSD
18Group: Libraries
1e757208
JB
19#Source0Download: http://code.google.com/p/webm/downloads/list
20#Source0: https://webm.googlecode.com/files/%{name}-v%{version}.tar.bz2
488ced65
JB
21# source, but regenerated on each fetch
22#Source0: https://chromium.googlesource.com/webm/libvpx/+archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
23Source0: %{name}-%{version}.tar.gz
1e757208 24# Source0-md5: dcf436a5dc8b56bdfb4aec63b2fe6729
bccc9f86 25URL: http://www.webmproject.org/
a28e5963 26BuildRequires: doxygen
a7d444e9 27BuildRequires: rpmbuild(macros) >= 1.673
9026bd8c 28BuildRequires: sed >= 4.0
d5d82930 29%ifarch %{ix86} %{x8664}
3c828a1d 30%{?with_asm:BuildRequires: yasm >= 0.8}
d5d82930 31%endif
a7d444e9
ER
32%if %{with doc}
33BuildRequires: %{php_name}-pcre
34BuildRequires: %{php_name}-program
35%endif
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
52
bccc9f86
AM
53%description
54VP8, a high-quality video codec.
55
d5d82930
JB
56%description -l pl.UTF-8
57VP8 - kodek obrazu wysokiej jakości.
58
bccc9f86 59%package devel
d5d82930
JB
60Summary: Header files for libvpx
61Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx
bccc9f86 62Group: Development/Libraries
d5d82930 63Requires: %{name} = %{version}-%{release}
bccc9f86
AM
64
65%description devel
d5d82930
JB
66Header files for libvpx library.
67
68%description devel -l pl.UTF-8
69Pliki nagłówkowe biblioteki libvpx.
bccc9f86
AM
70
71%package static
72Summary: Static libvpx library
d5d82930 73Summary(pl.UTF-8): Statyczna biblioteka libvpx
bccc9f86 74Group: Development/Libraries
d5d82930 75Requires: %{name}-devel = %{version}-%{release}
bccc9f86
AM
76
77%description static
78Static libvpx library.
79
d5d82930
JB
80%description static -l pl.UTF-8
81Statyczna biblioteka libvpx.
82
bccc9f86 83%prep
1e757208 84#%setup -q -n %{name}-v%{version}
5f38e725 85%setup -qc
bccc9f86
AM
86
87%build
d5d82930
JB
88install -d obj
89cd obj
bccc9f86 90# not autoconf configure
d5d82930 91CFLAGS="%{rpmcflags} %{rpmcppflags}" \
bccc9f86 92../configure \
7b991969 93%if %{with asm}
dcde509e 94 --as=yasm \
61956466 95%endif
e1331b3a
ER
96 --target=%{vpxtarget} \
97%if "%{vpxtarget}" != "%{generic_target}"
6c7c0f8b 98 --enable-shared \
e1331b3a 99%endif
5f38e725 100 %{!?with_ssse3:--disable-ssse3} \
0257ab6e 101 --disable-optimizations \
bccc9f86
AM
102 --enable-vp8 \
103 --enable-postproc \
104 --enable-runtime-cpu-detect
0257ab6e 105
0257ab6e 106%{__make} verbose=true target=libs \
938aec6f 107 HAVE_GNU_STRIP=no \
6c7c0f8b 108 CC="%{__cc}" \
7fb20346 109 LD="%{__cc}" \
6c7c0f8b 110 LDFLAGS="%{rpmldflags}"
0257ab6e
AM
111
112%{__make} verbose=true target=examples \
6c7c0f8b 113 CC="%{__cc}" \
7fb20346 114 LD="%{__cc}" \
dcde509e 115 LDFLAGS="%{rpmldflags} -L."
a7d444e9
ER
116
117%if %{with doc}
0257ab6e 118%{__make} verbose=true target=docs
a7d444e9 119%endif
0257ab6e 120
bccc9f86
AM
121%install
122rm -rf $RPM_BUILD_ROOT
464fefd2 123install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}}
0257ab6e 124
6c7c0f8b 125%{__make} -C obj verbose=true install \
938aec6f
ER
126 LIBSUBDIR=%{_lib} \
127 DIST_DIR=$RPM_BUILD_ROOT%{_prefix}
0257ab6e 128
1e757208 129%{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.1.3
9026bd8c
JB
130
131# adjust prefix and libdir
3c828a1d 132%{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc
bccc9f86
AM
133
134%clean
135rm -rf $RPM_BUILD_ROOT
136
137%post -p /sbin/ldconfig
138%postun -p /sbin/ldconfig
139
140%files
141%defattr(644,root,root,755)
d5d82930 142%doc AUTHORS CHANGELOG LICENSE PATENTS README
1c3357c1 143%attr(755,root,root) %{_bindir}/vp8_scalable_patterns
1e757208 144%attr(755,root,root) %{_bindir}/vp9_spatial_scalable_encoder
d5d82930
JB
145%attr(755,root,root) %{_bindir}/vpxdec
146%attr(755,root,root) %{_bindir}/vpxenc
47f853c3 147%attr(755,root,root) %{_libdir}/libvpx.so.*.*.*
1c3357c1 148%attr(755,root,root) %ghost %{_libdir}/libvpx.so.1
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.073257 seconds and 4 git commands to generate.