]> git.pld-linux.org Git - packages/davs2.git/blob - davs2.spec
3076c4a14f10aeb097354fa0aa7ade0c775764b4
[packages/davs2.git] / davs2.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # don't build static libraries
4 %bcond_without  opencl          # OpenCL features
5 #
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
8 Name:           davs2
9 Version:        1.6
10 Release:        1
11 License:        GPL v2+
12 Group:          Libraries
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)
26
27 %description
28 Open-source decoder of AVS2-P2/IEEE1857.4 video coding standard.
29
30 %description -l pl.UTF-8
31 Dekoder standardu kodowania obrazu AVS2-P2/IEEE1857.4 o otwartych
32 źródłach.
33
34 %package devel
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}
39
40 %description devel
41 Header files for davs2 library.
42
43 %description devel -l pl.UTF-8
44 Pliki nagłówkowe biblioteki davs2.
45
46 %package static
47 Summary:        Static davs2 library
48 Summary(pl.UTF-8):      Statyczna biblioteka davs2
49 Group:          Development/Libraries
50 Requires:       %{name}-devel = %{version}-%{release}
51
52 %description static
53 Static davs2 library.
54
55 %description static -l pl.UTF-8
56 Statyczna biblioteka davs2.
57
58 %prep
59 %setup -q
60 %patch0 -p1
61
62 %undos source/common/vec/intrinsic_{deblock_avx2,idct_avx2,inter_pred,inter_pred_avx2,intra-pred_avx2,pixel_avx,sao_avx2}.cc
63 %patch1 -p1
64
65 %build
66 cd build/linux
67 # not autoconf configure
68 CC="%{__cc}" \
69 CXX="%{__cxx}" \
70 CFLAGS="%{rpmcflags}" \
71 CXXFLAGS="%{rpmcxxflags}" \
72 CPPFLAGS="%{rpmcppflags}" \
73 LDFLAGS="%{rpmldflags} -Wl,-z,noexecstack" \
74 ./configure \
75         --prefix=%{_prefix} \
76         --bindir=%{_bindir} \
77         --includedir=%{_includedir} \
78         --libdir=%{_libdir} \
79         %{!?with_opencl:--disable-opencl} \
80         --enable-pic \
81         --enable-shared \
82         %{!?with_static_libs:--disable-static}
83 %{__make}
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87
88 %{__make} -C build/linux install \
89         DESTDIR=$RPM_BUILD_ROOT
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94 %post   -p /sbin/ldconfig
95 %postun -p /sbin/ldconfig
96
97 %files
98 %defattr(644,root,root,755)
99 %doc README.md
100 %lang(zh) %doc README.zh.md
101 %attr(755,root,root) %{_bindir}/davs2
102 %attr(755,root,root) %{_libdir}/libdavs2.so.16
103
104 %files devel
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
110
111 %if %{with static_libs}
112 %files static
113 %defattr(644,root,root,755)
114 %{_libdir}/libdavs2.a
115 %endif
This page took 0.073974 seconds and 2 git commands to generate.