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