]> git.pld-linux.org Git - packages/davs2.git/blob - davs2.spec
- updated to 1.7
[packages/davs2.git] / davs2.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
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.7
10 Release:        1
11 License:        GPL v2+
12 Group:          Libraries
13 #Source0Download: https://github.com/pkuvcl/davs2/tags
14 Source0:        https://github.com/pkuvcl/davs2/archive/%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  d1558a5413b6691ad9c867cbd5c765aa
16 Patch0:         %{name}-extern.patch
17 Patch1:         %{name}-x86.patch
18 Patch2:         %{name}-opt.patch
19 URL:            https://github.com/pkuvcl/davs2
20 %{?with_opencl:BuildRequires:   OpenCL-devel}
21 BuildRequires:  libstdc++-devel >= 6:4.7
22 BuildRequires:  pkgconfig
23 BuildRequires:  rpmbuild(macros) >= 1.674
24 BuildRequires:  sed >= 4.0
25 %ifarch %{ix86} %{x8664}
26 BuildRequires:  yasm >= 1.2.0
27 %endif
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 Open-source decoder of AVS2-P2/IEEE1857.4 video coding standard.
32
33 %description -l pl.UTF-8
34 Dekoder standardu kodowania obrazu AVS2-P2/IEEE1857.4 o otwartych
35 źródłach.
36
37 %package devel
38 Summary:        Header files for davs2 library
39 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki davs2
40 Group:          Development/Libraries
41 Requires:       %{name} = %{version}-%{release}
42
43 %description devel
44 Header files for davs2 library.
45
46 %description devel -l pl.UTF-8
47 Pliki nagłówkowe biblioteki davs2.
48
49 %package static
50 Summary:        Static davs2 library
51 Summary(pl.UTF-8):      Statyczna biblioteka davs2
52 Group:          Development/Libraries
53 Requires:       %{name}-devel = %{version}-%{release}
54
55 %description static
56 Static davs2 library.
57
58 %description static -l pl.UTF-8
59 Statyczna biblioteka davs2.
60
61 %prep
62 %setup -q
63 %patch0 -p1
64 %patch1 -p1
65 %patch2 -p1
66
67 %build
68 cd build/linux
69 # not autoconf configure
70 CC="%{__cc}" \
71 CXX="%{__cxx}" \
72 CFLAGS="%{rpmcflags}" \
73 CXXFLAGS="%{rpmcxxflags}" \
74 CPPFLAGS="%{rpmcppflags}" \
75 LDFLAGS="%{rpmldflags} -Wl,-z,noexecstack" \
76 ./configure \
77         --prefix=%{_prefix} \
78         --bindir=%{_bindir} \
79         --includedir=%{_includedir} \
80         --libdir=%{_libdir} \
81 %ifarch x32
82         --disable-asm \
83 %endif
84         %{!?with_opencl:--disable-opencl} \
85         --enable-pic \
86         --enable-shared \
87         %{!?with_static_libs:--disable-static}
88 %{__make}
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92
93 %{__make} -C build/linux install \
94         DESTDIR=$RPM_BUILD_ROOT
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %post   -p /sbin/ldconfig
100 %postun -p /sbin/ldconfig
101
102 %files
103 %defattr(644,root,root,755)
104 %doc README.md
105 %lang(zh) %doc README.zh.md
106 %attr(755,root,root) %{_bindir}/davs2
107 %attr(755,root,root) %{_libdir}/libdavs2.so.16
108
109 %files devel
110 %defattr(644,root,root,755)
111 %attr(755,root,root) %{_libdir}/libdavs2.so
112 %{_includedir}/davs2.h
113 %{_includedir}/davs2_config.h
114 %{_pkgconfigdir}/davs2.pc
115
116 %if %{with static_libs}
117 %files static
118 %defattr(644,root,root,755)
119 %{_libdir}/libdavs2.a
120 %endif
This page took 0.12322 seconds and 4 git commands to generate.