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