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