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