]> git.pld-linux.org Git - packages/libvpx.git/blob - libvpx.spec
278f7a913fe7bbccd014d966a9e7123c162847b2
[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.11.0
21 Release:        1
22 License:        BSD
23 Group:          Libraries
24 # original download URL: http://downloads.webmproject.org/releases/webm/index.html
25 # ...but use github mirror to get consistent tarballs
26 #Source0Download: https://github.com/webmproject/libvpx/releases
27 Source0:        https://github.com/webmproject/libvpx/archive/v%{version}/%{name}-%{version}.tar.gz
28 # Source0-md5:  82e5e527336b41281a582204db1f3457
29 URL:            https://www.webmproject.org/
30 BuildRequires:  doxygen
31 %{?with_tests:BuildRequires:    libstdc++-devel}
32 BuildRequires:  pkgconfig
33 BuildRequires:  rpmbuild(macros) >= 1.673
34 BuildRequires:  sed >= 4.0
35 %{?with_asm:BuildRequires:      yasm >= 0.8}
36 %if %{with doc}
37 BuildRequires:  %{php_name}-pcre
38 BuildRequires:  %{php_name}-program
39 %endif
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %define generic_target  generic-gnu
43 %define vpxtarget       %{generic_target}
44 %ifarch %{x8664}
45 %define vpxtarget       x86_64-linux-gcc
46 %endif
47 %ifarch %{ix86}
48 %define vpxtarget       x86-linux-gcc
49 %endif
50 %ifarch ppc
51 %define vpxtarget       ppc32-linux-gcc
52 %endif
53 %ifarch ppc64
54 %define vpxtarget       ppc64-linux-gcc
55 %endif
56 %ifarch aarch64
57 %define vpxtarget       arm64-linux-gcc
58 %endif
59 %ifarch armv7hnl
60 %define vpxtarget       armv7-linux-gcc
61 %endif
62
63 %description
64 VP8, a high-quality video codec.
65
66 %description -l pl.UTF-8
67 VP8 - kodek obrazu wysokiej jakości.
68
69 %package devel
70 Summary:        Header files for libvpx
71 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libvpx
72 Group:          Development/Libraries
73 Requires:       %{name} = %{version}-%{release}
74
75 %description devel
76 Header files for libvpx library.
77
78 %description devel -l pl.UTF-8
79 Pliki nagłówkowe biblioteki libvpx.
80
81 %package static
82 Summary:        Static libvpx library
83 Summary(pl.UTF-8):      Statyczna biblioteka libvpx
84 Group:          Development/Libraries
85 Requires:       %{name}-devel = %{version}-%{release}
86
87 %description static
88 Static libvpx library.
89
90 %description static -l pl.UTF-8
91 Statyczna biblioteka libvpx.
92
93 %package tools
94 Summary:        VPX decoding/encoding tools
95 Summary(pl.UTF-8):      Narzędzia do kodowania/dekodowania formatu VPX
96 Group:          Applications/Graphics
97 Requires:       %{name} = %{version}-%{release}
98
99 %description tools
100 VPX decoding/encoding tools.
101
102 %description tools -l pl.UTF-8
103 Narzędzia do kodowania/dekodowania formatu VPX.
104
105 %prep
106 %setup -q
107
108 %build
109 install -d obj
110 cd obj
111 # not autoconf configure
112 CC="%{__cc}" \
113 CXX="%{__cxx}" \
114 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
115 ../configure \
116 %if %{with asm}
117         --as=yasm \
118 %endif
119         --target=%{vpxtarget} \
120         --enable-shared \
121         %{!?with_ssse3:--disable-ssse3} \
122         --disable-optimizations \
123         --%{!?with_tests:dis}%{?with_tests:en}able-unit-tests \
124         --%{!?with_doc:dis}%{?with_doc:en}able-docs \
125         --%{!?with_doc:dis}%{?with_doc:en}able-install-docs \
126         --enable-vp8 \
127         --enable-vp8 \
128         --enable-postproc \
129         --enable-runtime-cpu-detect
130
131 %{__make} verbose=true target=libs \
132         HAVE_GNU_STRIP=no \
133         LDFLAGS="%{rpmldflags}"
134
135 %{__make} verbose=true target=examples \
136         LDFLAGS="%{rpmldflags} -L."
137
138 %if %{with doc}
139 %{__make} verbose=true target=docs
140 %endif
141
142 %install
143 rm -rf $RPM_BUILD_ROOT
144 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}}
145
146 %{__make} -C obj verbose=true install \
147         LIBSUBDIR=%{_lib} \
148         DIST_DIR=$RPM_BUILD_ROOT%{_prefix}
149
150 # redundant minor version symlink (not SONAME)
151 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libvpx.so.7.0
152
153 # adjust prefix and libdir
154 %{__sed} -i -e 's,^prefix=.*,prefix=%{_prefix},;s,^libdir=.*,libdir=%{_libdir},' $RPM_BUILD_ROOT%{_pkgconfigdir}/vpx.pc
155
156 %clean
157 rm -rf $RPM_BUILD_ROOT
158
159 %post   -p /sbin/ldconfig
160 %postun -p /sbin/ldconfig
161
162 %files
163 %defattr(644,root,root,755)
164 %doc AUTHORS CHANGELOG LICENSE PATENTS README
165 %attr(755,root,root) %{_libdir}/libvpx.so.*.*.*
166 %attr(755,root,root) %ghost %{_libdir}/libvpx.so.7
167
168 %files devel
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/libvpx.so
171 %{_includedir}/vpx
172 %{_pkgconfigdir}/vpx.pc
173
174 %files static
175 %defattr(644,root,root,755)
176 %{_libdir}/libvpx.a
177
178 %files tools
179 %defattr(644,root,root,755)
180 %attr(755,root,root) %{_bindir}/vpxdec
181 %attr(755,root,root) %{_bindir}/vpxenc
This page took 0.077479 seconds and 2 git commands to generate.