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