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