]> git.pld-linux.org Git - packages/libvpx.git/blame_incremental - libvpx.spec
- simplified Source0 URL
[packages/libvpx.git] / libvpx.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without asm # x86 assembler
4%bcond_without doc # don't build doc
5%bcond_with tests # build tests (not useful, creates libgtest.a)
6%bcond_without ssse3 # use SSSE3 instructions (Intel since Core2, Via Nano)
7
8%ifnarch %{ix86} %{x8664} x32
9%undefine with_asm
10%endif
11
12%if "%{pld_release}" == "ac"
13# not supported by compiler
14%undefine with_ssse3
15%endif
16
17Summary: VP8, a high-quality video codec
18Summary(pl.UTF-8): VP8 - kodek obrazu wysokiej jakości
19Name: libvpx
20Version: 1.8.0
21Release: 1
22License: BSD
23Group: Libraries
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
28# Source0-md5: 49cb591325f44a3459b040112e3b82e7
29URL: http://www.webmproject.org/
30BuildRequires: doxygen
31%{?with_tests:BuildRequires: libstdc++-devel}
32BuildRequires: pkgconfig
33BuildRequires: rpmbuild(macros) >= 1.673
34BuildRequires: sed >= 4.0
35%{?with_asm:BuildRequires: yasm >= 0.8}
36%if %{with doc}
37BuildRequires: %{php_name}-pcre
38BuildRequires: %{php_name}-program
39%endif
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
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
57%description
58VP8, a high-quality video codec.
59
60%description -l pl.UTF-8
61VP8 - kodek obrazu wysokiej jakości.
62
63%package devel
64Summary: Header files for libvpx
65Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx
66Group: Development/Libraries
67Requires: %{name} = %{version}-%{release}
68
69%description devel
70Header files for libvpx library.
71
72%description devel -l pl.UTF-8
73Pliki nagłówkowe biblioteki libvpx.
74
75%package static
76Summary: Static libvpx library
77Summary(pl.UTF-8): Statyczna biblioteka libvpx
78Group: Development/Libraries
79Requires: %{name}-devel = %{version}-%{release}
80
81%description static
82Static libvpx library.
83
84%description static -l pl.UTF-8
85Statyczna biblioteka libvpx.
86
87%package tools
88Summary: VPX decoding/encoding tools
89Summary(pl.UTF-8): Narzędzia do kodowania/dekodowania formatu VPX
90Group: Applications/Graphics
91Requires: %{name} = %{version}-%{release}
92
93%description tools
94VPX decoding/encoding tools.
95
96%description tools -l pl.UTF-8
97Narzędzia do kodowania/dekodowania formatu VPX.
98
99%prep
100%setup -q
101
102%build
103install -d obj
104cd obj
105# not autoconf configure
106CC="%{__cc}" \
107CXX="%{__cxx}" \
108CFLAGS="%{rpmcflags} %{rpmcppflags} %{!?with_asm:-DYUV_DISABLE_ASM}" \
109../configure \
110%if %{with asm}
111 --as=yasm \
112%endif
113 --target=%{vpxtarget} \
114 --enable-shared \
115 %{!?with_ssse3:--disable-ssse3} \
116 --disable-optimizations \
117 --%{!?with_tests:dis}%{?with_tests:en}able-unit-tests \
118 --%{!?with_doc:dis}%{?with_doc:en}able-docs \
119 --%{!?with_doc:dis}%{?with_doc:en}able-install-docs \
120 --enable-vp8 \
121 --enable-vp8 \
122 --enable-postproc \
123 --enable-runtime-cpu-detect
124
125%{__make} verbose=true target=libs \
126 HAVE_GNU_STRIP=no \
127 LDFLAGS="%{rpmldflags}"
128
129%{__make} verbose=true target=examples \
130 LDFLAGS="%{rpmldflags} -L."
131
132%if %{with doc}
133%{__make} verbose=true target=docs
134%endif
135
136%install
137rm -rf $RPM_BUILD_ROOT
138install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}}
139
140%{__make} -C obj verbose=true install \
141 LIBSUBDIR=%{_lib} \
142 DIST_DIR=$RPM_BUILD_ROOT%{_prefix}
143
144%{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.6.0
145
146# adjust prefix and libdir
147%{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc
148
149%clean
150rm -rf $RPM_BUILD_ROOT
151
152%post -p /sbin/ldconfig
153%postun -p /sbin/ldconfig
154
155%files
156%defattr(644,root,root,755)
157%doc AUTHORS CHANGELOG LICENSE PATENTS README
158%attr(755,root,root) %{_libdir}/libvpx.so.*.*.*
159%attr(755,root,root) %ghost %{_libdir}/libvpx.so.6
160
161%files devel
162%defattr(644,root,root,755)
163%attr(755,root,root) %{_libdir}/libvpx.so
164%{_includedir}/vpx
165%{_pkgconfigdir}/vpx.pc
166
167%files static
168%defattr(644,root,root,755)
169%{_libdir}/libvpx.a
170
171%files tools
172%defattr(644,root,root,755)
173%attr(755,root,root) %{_bindir}/vpxdec
174%attr(755,root,root) %{_bindir}/vpxenc
This page took 0.281331 seconds and 4 git commands to generate.