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