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