3 %bcond_without static_libs # don't build static libraries
4 %bcond_without opencl # OpenCL features
6 Summary: Open-source decoder of AVS2-P2/IEEE1857.4 video coding standard
7 Summary(pl.UTF-8): Dekoder standardu kodowania obrazu AVS2-P2/IEEE1857.4 o otwartych źródłach
13 #Source0Download: https://github.com/pkuvcl/davs2/releases
14 Source0: https://github.com/pkuvcl/davs2/archive/%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5: c8861c1220c05a172b9ce472cbf929af
16 Patch0: %{name}-extern.patch
17 Patch1: %{name}-gcc8-fix.patch
18 URL: https://github.com/pkuvcl/davs2
19 %{?with_opencl:BuildRequires: OpenCL-devel}
20 BuildRequires: libstdc++-devel >= 6:4.7
21 BuildRequires: pkgconfig
22 BuildRequires: rpmbuild(macros) >= 1.674
23 BuildRequires: sed >= 4.0
24 BuildRequires: yasm >= 1.2.0
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 Open-source decoder of AVS2-P2/IEEE1857.4 video coding standard.
30 %description -l pl.UTF-8
31 Dekoder standardu kodowania obrazu AVS2-P2/IEEE1857.4 o otwartych
35 Summary: Header files for davs2 library
36 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki davs2
37 Group: Development/Libraries
38 Requires: %{name} = %{version}-%{release}
41 Header files for davs2 library.
43 %description devel -l pl.UTF-8
44 Pliki nagłówkowe biblioteki davs2.
47 Summary: Static davs2 library
48 Summary(pl.UTF-8): Statyczna biblioteka davs2
49 Group: Development/Libraries
50 Requires: %{name}-devel = %{version}-%{release}
55 %description static -l pl.UTF-8
56 Statyczna biblioteka davs2.
62 %undos source/common/vec/intrinsic_{deblock_avx2,idct_avx2,inter_pred,inter_pred_avx2,intra-pred_avx2,pixel_avx,sao_avx2}.cc
67 # not autoconf configure
70 CFLAGS="%{rpmcflags}" \
71 CXXFLAGS="%{rpmcxxflags}" \
72 CPPFLAGS="%{rpmcppflags}" \
73 LDFLAGS="%{rpmldflags} -Wl,-z,noexecstack" \
77 --includedir=%{_includedir} \
79 %{!?with_opencl:--disable-opencl} \
82 %{!?with_static_libs:--disable-static}
86 rm -rf $RPM_BUILD_ROOT
88 %{__make} -C build/linux install \
89 DESTDIR=$RPM_BUILD_ROOT
92 rm -rf $RPM_BUILD_ROOT
94 %post -p /sbin/ldconfig
95 %postun -p /sbin/ldconfig
98 %defattr(644,root,root,755)
100 %lang(zh) %doc README.zh.md
101 %attr(755,root,root) %{_bindir}/davs2
102 %attr(755,root,root) %{_libdir}/libdavs2.so.16
105 %defattr(644,root,root,755)
106 %attr(755,root,root) %{_libdir}/libdavs2.so
107 %{_includedir}/davs2.h
108 %{_includedir}/davs2_config.h
109 %{_pkgconfigdir}/davs2.pc
111 %if %{with static_libs}
113 %defattr(644,root,root,755)
114 %{_libdir}/libdavs2.a