3 %bcond_without static_libs # don't build static libraries
4 %bcond_without lsmash # l-smash support in CLI
5 %bcond_without opencl # OpenCL features
7 Summary: Open-source encoder of AVS2-P2/IEEE1857.4 video coding standard
8 Summary(pl.UTF-8): Koder standardu kodowania obrazu AVS2-P2/IEEE1857.4 o otwartych źródłach
14 #Source0Download: https://github.com/pkuvcl/xavs2/tags
15 Source0: https://github.com/pkuvcl/xavs2/archive/%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5: b776941aad474fed23da1d1eb0c0b720
17 Patch0: %{name}-asm-arch.patch
18 Patch1: %{name}-opt.patch
19 Patch2: %{name}-x86.patch
20 URL: https://github.com/pkuvcl/xavs2
21 %{?with_opencl:BuildRequires: OpenCL-devel}
22 %{?with_lsmash:BuildRequires: l-smash-devel >= 1.5}
23 BuildRequires: libstdc++-devel >= 6:4.7
24 BuildRequires: pkgconfig
25 %ifarch %{ix86} %{x8664}
26 BuildRequires: yasm >= 1.2.0
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 Open-source encoder of AVS2-P2/IEEE1857.4 video coding standard.
33 %description -l pl.UTF-8
34 Koder standardu kodowania obrazu AVS2-P2/IEEE1857.4 o otwartych
38 Summary: Header files for xavs2 library
39 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki xavs2
40 Group: Development/Libraries
41 Requires: %{name} = %{version}-%{release}
44 Header files for xavs2 library.
46 %description devel -l pl.UTF-8
47 Pliki nagłówkowe biblioteki xavs2.
50 Summary: Static xavs2 library
51 Summary(pl.UTF-8): Statyczna biblioteka xavs2
52 Group: Development/Libraries
53 Requires: %{name}-devel = %{version}-%{release}
58 %description static -l pl.UTF-8
59 Statyczna biblioteka xavs2.
69 # not autoconf configure
72 CFLAGS="%{rpmcflags}" \
73 CXXFLAGS="%{rpmcxxflags}" \
74 CPPFLAGS="%{rpmcppflags}" \
75 LDFLAGS="%{rpmldflags} -Wl,-z,noexecstack" \
79 --includedir=%{_includedir} \
85 %{!?with_lsmash:--disable-lsmash} \
86 %{!?with_opencl:--disable-opencl} \
89 %{!?with_static_libs:--disable-static}
93 rm -rf $RPM_BUILD_ROOT
95 %{__make} -C build/linux install \
96 DESTDIR=$RPM_BUILD_ROOT
99 rm -rf $RPM_BUILD_ROOT
101 %post -p /sbin/ldconfig
102 %postun -p /sbin/ldconfig
105 %defattr(644,root,root,755)
107 %lang(zh) %doc README.zh.md
108 %attr(755,root,root) %{_bindir}/xavs2
109 %attr(755,root,root) %{_libdir}/libxavs2.so.13
112 %defattr(644,root,root,755)
113 %attr(755,root,root) %{_libdir}/libxavs2.so
114 %{_includedir}/xavs2.h
115 %{_includedir}/xavs2_config.h
116 %{_pkgconfigdir}/xavs2.pc
118 %if %{with static_libs}
120 %defattr(644,root,root,755)
121 %{_libdir}/libxavs2.a