]>
Commit | Line | Data |
---|---|---|
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} | |
9 | %undefine with_asm | |
10 | %endif | |
11 | ||
12 | %if "%{pld_release}" == "ac" | |
13 | # not supported by compiler | |
14 | %undefine with_ssse3 | |
15 | %endif | |
16 | ||
17 | Summary: VP8, a high-quality video codec | |
18 | Summary(pl.UTF-8): VP8 - kodek obrazu wysokiej jakości | |
19 | Name: libvpx | |
20 | Version: 1.3.0 | |
21 | Release: 1 | |
22 | License: BSD | |
23 | Group: Libraries | |
24 | #Source0Download: http://code.google.com/p/webm/downloads/list | |
25 | #Source0: https://webm.googlecode.com/files/%{name}-v%{version}.tar.bz2 | |
26 | # source, but regenerated on each fetch | |
27 | #Source0: https://chromium.googlesource.com/webm/libvpx/+archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz | |
28 | Source0: %{name}-%{version}.tar.gz | |
29 | # Source0-md5: dcf436a5dc8b56bdfb4aec63b2fe6729 | |
30 | URL: http://www.webmproject.org/ | |
31 | BuildRequires: doxygen | |
32 | %{?with_tests:BuildRequires: libstdc++-devel} | |
33 | BuildRequires: rpmbuild(macros) >= 1.673 | |
34 | BuildRequires: sed >= 4.0 | |
35 | %{?with_asm:BuildRequires: yasm >= 0.8} | |
36 | %if %{with doc} | |
37 | BuildRequires: %{php_name}-pcre | |
38 | BuildRequires: %{php_name}-program | |
39 | %endif | |
40 | BuildRoot: %{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 | |
58 | VP8, a high-quality video codec. | |
59 | ||
60 | %description -l pl.UTF-8 | |
61 | VP8 - kodek obrazu wysokiej jakości. | |
62 | ||
63 | %package devel | |
64 | Summary: Header files for libvpx | |
65 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx | |
66 | Group: Development/Libraries | |
67 | Requires: %{name} = %{version}-%{release} | |
68 | ||
69 | %description devel | |
70 | Header files for libvpx library. | |
71 | ||
72 | %description devel -l pl.UTF-8 | |
73 | Pliki nagłówkowe biblioteki libvpx. | |
74 | ||
75 | %package static | |
76 | Summary: Static libvpx library | |
77 | Summary(pl.UTF-8): Statyczna biblioteka libvpx | |
78 | Group: Development/Libraries | |
79 | Requires: %{name}-devel = %{version}-%{release} | |
80 | ||
81 | %description static | |
82 | Static libvpx library. | |
83 | ||
84 | %description static -l pl.UTF-8 | |
85 | Statyczna biblioteka libvpx. | |
86 | ||
87 | %prep | |
88 | #%setup -q -n %{name}-v%{version} | |
89 | %setup -qc | |
90 | ||
91 | %build | |
92 | install -d obj | |
93 | cd obj | |
94 | # not autoconf configure | |
95 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ | |
96 | ../configure \ | |
97 | %if %{with asm} | |
98 | --as=yasm \ | |
99 | %endif | |
100 | --target=%{vpxtarget} \ | |
101 | --enable-shared \ | |
102 | %{!?with_ssse3:--disable-ssse3} \ | |
103 | --disable-optimizations \ | |
104 | --%{!?with_tests:dis}%{?with_tests:en}able-unit-tests \ | |
105 | --%{!?with_doc:dis}%{?with_doc:en}able-docs \ | |
106 | --%{!?with_doc:dis}%{?with_doc:en}able-install-docs \ | |
107 | --enable-vp8 \ | |
108 | --enable-postproc \ | |
109 | --enable-runtime-cpu-detect | |
110 | ||
111 | %{__make} verbose=true target=libs \ | |
112 | HAVE_GNU_STRIP=no \ | |
113 | CC="%{__cc}" \ | |
114 | LD="%{__cc}" \ | |
115 | LDFLAGS="%{rpmldflags}" | |
116 | ||
117 | %{__make} verbose=true target=examples \ | |
118 | CC="%{__cc}" \ | |
119 | LD="%{__cc}" \ | |
120 | LDFLAGS="%{rpmldflags} -L." | |
121 | ||
122 | %if %{with doc} | |
123 | %{__make} verbose=true target=docs | |
124 | %endif | |
125 | ||
126 | %install | |
127 | rm -rf $RPM_BUILD_ROOT | |
128 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}} | |
129 | ||
130 | %{__make} -C obj verbose=true install \ | |
131 | LIBSUBDIR=%{_lib} \ | |
132 | DIST_DIR=$RPM_BUILD_ROOT%{_prefix} | |
133 | ||
134 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.1.3 | |
135 | ||
136 | # adjust prefix and libdir | |
137 | %{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc | |
138 | ||
139 | %clean | |
140 | rm -rf $RPM_BUILD_ROOT | |
141 | ||
142 | %post -p /sbin/ldconfig | |
143 | %postun -p /sbin/ldconfig | |
144 | ||
145 | %files | |
146 | %defattr(644,root,root,755) | |
147 | %doc AUTHORS CHANGELOG LICENSE PATENTS README | |
148 | %attr(755,root,root) %{_bindir}/vp8_scalable_patterns | |
149 | %attr(755,root,root) %{_bindir}/vp9_spatial_scalable_encoder | |
150 | %attr(755,root,root) %{_bindir}/vpxdec | |
151 | %attr(755,root,root) %{_bindir}/vpxenc | |
152 | %attr(755,root,root) %{_libdir}/libvpx.so.*.*.* | |
153 | %attr(755,root,root) %ghost %{_libdir}/libvpx.so.1 | |
154 | ||
155 | %files devel | |
156 | %defattr(644,root,root,755) | |
157 | %attr(755,root,root) %{_libdir}/libvpx.so | |
158 | %{_includedir}/vpx | |
159 | %{_pkgconfigdir}/vpx.pc | |
160 | ||
161 | %files static | |
162 | %defattr(644,root,root,755) | |
163 | %{_libdir}/libvpx.a |