]> git.pld-linux.org Git - packages/libvpx.git/blob - libvpx.spec
32d6320195f8b17b21dcd994921e825a8d6f41ad
[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} x32
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.5.0
21 Release:        1
22 License:        BSD
23 Group:          Libraries
24 Source0:        https://storage.googleapis.com/downloads.webmproject.org/releases/webm/%{name}-%{version}.tar.bz2
25 # Source0-md5:  49e59dd184caa255886683facea56fca
26 URL:            http://www.webmproject.org/
27 BuildRequires:  doxygen
28 %{?with_tests:BuildRequires:    libstdc++-devel}
29 BuildRequires:  pkgconfig
30 BuildRequires:  rpmbuild(macros) >= 1.673
31 BuildRequires:  sed >= 4.0
32 %{?with_asm:BuildRequires:      yasm >= 0.8}
33 %if %{with doc}
34 BuildRequires:  %{php_name}-pcre
35 BuildRequires:  %{php_name}-program
36 %endif
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %define generic_target  generic-gnu
40 %define vpxtarget       %{generic_target}
41 %ifarch %{x8664}
42 %define vpxtarget       x86_64-linux-gcc
43 %endif
44 %ifarch %{ix86}
45 %define vpxtarget       x86-linux-gcc
46 %endif
47 %ifarch ppc
48 %define vpxtarget       ppc32-linux-gcc
49 %endif
50 %ifarch ppc64
51 %define vpxtarget       ppc64-linux-gcc
52 %endif
53
54 %description
55 VP8, a high-quality video codec.
56
57 %description -l pl.UTF-8
58 VP8 - kodek obrazu wysokiej jakości.
59
60 %package devel
61 Summary:        Header files for libvpx
62 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libvpx
63 Group:          Development/Libraries
64 Requires:       %{name} = %{version}-%{release}
65
66 %description devel
67 Header files for libvpx library.
68
69 %description devel -l pl.UTF-8
70 Pliki nagłówkowe biblioteki libvpx.
71
72 %package static
73 Summary:        Static libvpx library
74 Summary(pl.UTF-8):      Statyczna biblioteka libvpx
75 Group:          Development/Libraries
76 Requires:       %{name}-devel = %{version}-%{release}
77
78 %description static
79 Static libvpx library.
80
81 %description static -l pl.UTF-8
82 Statyczna biblioteka libvpx.
83
84 %prep
85 %setup -q
86
87 %build
88 install -d obj
89 cd obj
90 # not autoconf configure
91 CC="%{__cc}" \
92 CXX="%{__cxx}" \
93 CFLAGS="%{rpmcflags} %{rpmcppflags} %{!?with_asm:-DYUV_DISABLE_ASM}" \
94 ../configure \
95 %if %{with asm}
96         --as=yasm \
97 %endif
98         --target=%{vpxtarget} \
99         --enable-shared \
100         %{!?with_ssse3:--disable-ssse3} \
101         --disable-optimizations \
102         --%{!?with_tests:dis}%{?with_tests:en}able-unit-tests \
103         --%{!?with_doc:dis}%{?with_doc:en}able-docs \
104         --%{!?with_doc:dis}%{?with_doc:en}able-install-docs \
105         --enable-vp8 \
106         --enable-vp8 \
107         --enable-postproc \
108         --enable-runtime-cpu-detect
109
110 %{__make} verbose=true target=libs \
111         HAVE_GNU_STRIP=no \
112         LDFLAGS="%{rpmldflags}"
113
114 %{__make} verbose=true target=examples \
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.3.0
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}/vpxdec
144 %attr(755,root,root) %{_bindir}/vpxenc
145 %attr(755,root,root) %{_libdir}/libvpx.so.*.*.*
146 %attr(755,root,root) %ghost %{_libdir}/libvpx.so.3
147
148 %files devel
149 %defattr(644,root,root,755)
150 %attr(755,root,root) %{_libdir}/libvpx.so
151 %{_includedir}/vpx
152 %{_pkgconfigdir}/vpx.pc
153
154 %files static
155 %defattr(644,root,root,755)
156 %{_libdir}/libvpx.a
This page took 0.104458 seconds and 2 git commands to generate.