]>
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} 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 | ||
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.10.0 | |
21 | Release: 1 | |
22 | License: BSD | |
23 | Group: 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 | |
27 | Source0: https://github.com/webmproject/libvpx/archive/v%{version}/%{name}-%{version}.tar.gz | |
28 | # Source0-md5: cded283be38dc0078c3fbe751722efc5 | |
29 | URL: https://www.webmproject.org/ | |
30 | BuildRequires: doxygen | |
31 | %{?with_tests:BuildRequires: libstdc++-devel} | |
32 | BuildRequires: pkgconfig | |
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 | %ifarch aarch64 | |
57 | %define vpxtarget arm64-linux-gcc | |
58 | %endif | |
59 | ||
60 | %description | |
61 | VP8, a high-quality video codec. | |
62 | ||
63 | %description -l pl.UTF-8 | |
64 | VP8 - kodek obrazu wysokiej jakości. | |
65 | ||
66 | %package devel | |
67 | Summary: Header files for libvpx | |
68 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libvpx | |
69 | Group: Development/Libraries | |
70 | Requires: %{name} = %{version}-%{release} | |
71 | ||
72 | %description devel | |
73 | Header files for libvpx library. | |
74 | ||
75 | %description devel -l pl.UTF-8 | |
76 | Pliki nagłówkowe biblioteki libvpx. | |
77 | ||
78 | %package static | |
79 | Summary: Static libvpx library | |
80 | Summary(pl.UTF-8): Statyczna biblioteka libvpx | |
81 | Group: Development/Libraries | |
82 | Requires: %{name}-devel = %{version}-%{release} | |
83 | ||
84 | %description static | |
85 | Static libvpx library. | |
86 | ||
87 | %description static -l pl.UTF-8 | |
88 | Statyczna biblioteka libvpx. | |
89 | ||
90 | %package tools | |
91 | Summary: VPX decoding/encoding tools | |
92 | Summary(pl.UTF-8): Narzędzia do kodowania/dekodowania formatu VPX | |
93 | Group: Applications/Graphics | |
94 | Requires: %{name} = %{version}-%{release} | |
95 | ||
96 | %description tools | |
97 | VPX decoding/encoding tools. | |
98 | ||
99 | %description tools -l pl.UTF-8 | |
100 | Narzędzia do kodowania/dekodowania formatu VPX. | |
101 | ||
102 | %prep | |
103 | %setup -q | |
104 | ||
105 | %build | |
106 | install -d obj | |
107 | cd obj | |
108 | # not autoconf configure | |
109 | CC="%{__cc}" \ | |
110 | CXX="%{__cxx}" \ | |
111 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ | |
112 | ../configure \ | |
113 | %if %{with asm} | |
114 | --as=yasm \ | |
115 | %endif | |
116 | --target=%{vpxtarget} \ | |
117 | --enable-shared \ | |
118 | %{!?with_ssse3:--disable-ssse3} \ | |
119 | --disable-optimizations \ | |
120 | --%{!?with_tests:dis}%{?with_tests:en}able-unit-tests \ | |
121 | --%{!?with_doc:dis}%{?with_doc:en}able-docs \ | |
122 | --%{!?with_doc:dis}%{?with_doc:en}able-install-docs \ | |
123 | --enable-vp8 \ | |
124 | --enable-vp8 \ | |
125 | --enable-postproc \ | |
126 | --enable-runtime-cpu-detect | |
127 | ||
128 | %{__make} verbose=true target=libs \ | |
129 | HAVE_GNU_STRIP=no \ | |
130 | LDFLAGS="%{rpmldflags}" | |
131 | ||
132 | %{__make} verbose=true target=examples \ | |
133 | LDFLAGS="%{rpmldflags} -L." | |
134 | ||
135 | %if %{with doc} | |
136 | %{__make} verbose=true target=docs | |
137 | %endif | |
138 | ||
139 | %install | |
140 | rm -rf $RPM_BUILD_ROOT | |
141 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}} | |
142 | ||
143 | %{__make} -C obj verbose=true install \ | |
144 | LIBSUBDIR=%{_lib} \ | |
145 | DIST_DIR=$RPM_BUILD_ROOT%{_prefix} | |
146 | ||
147 | # redundant minor version symlink (not SONAME) | |
148 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.6.4 | |
149 | ||
150 | # adjust prefix and libdir | |
151 | %{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc | |
152 | ||
153 | %clean | |
154 | rm -rf $RPM_BUILD_ROOT | |
155 | ||
156 | %post -p /sbin/ldconfig | |
157 | %postun -p /sbin/ldconfig | |
158 | ||
159 | %files | |
160 | %defattr(644,root,root,755) | |
161 | %doc AUTHORS CHANGELOG LICENSE PATENTS README | |
162 | %attr(755,root,root) %{_libdir}/libvpx.so.*.*.* | |
163 | %attr(755,root,root) %ghost %{_libdir}/libvpx.so.6 | |
164 | ||
165 | %files devel | |
166 | %defattr(644,root,root,755) | |
167 | %attr(755,root,root) %{_libdir}/libvpx.so | |
168 | %{_includedir}/vpx | |
169 | %{_pkgconfigdir}/vpx.pc | |
170 | ||
171 | %files static | |
172 | %defattr(644,root,root,755) | |
173 | %{_libdir}/libvpx.a | |
174 | ||
175 | %files tools | |
176 | %defattr(644,root,root,755) | |
177 | %attr(755,root,root) %{_bindir}/vpxdec | |
178 | %attr(755,root,root) %{_bindir}/vpxenc |