-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibpkgmanifest.spec
91 lines (73 loc) · 2.27 KB
/
libpkgmanifest.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
%global version_major 0
%global version_minor 5
%global version_patch 0
Name: libpkgmanifest
Version: %{version_major}.%{version_minor}.%{version_patch}
Release: 1%{?dist}
Summary: Library for working with RPM manifests
License: GPL-2.0-or-later
URL: https://github.com/rpm-software-management/libpkgmanifest
Source0: %{url}/archive/%{version}/libpkgmanifest-%{version}.tar.gz
%bcond_with clang
%bcond_without docs
%bcond_without python
%bcond_without tests
%if %{with clang}
%global toolchain clang
BuildRequires: clang
%else
BuildRequires: gcc-c++ >= 10.1
%endif
BuildRequires: cmake
BuildRequires: pkgconfig(yaml-cpp)
%if %{with tests}
BuildRequires: pkgconfig(gmock)
BuildRequires: pkgconfig(gtest)
%endif
%if %{with python}
BuildRequires: python3-devel
BuildRequires: swig >= 4.2.0
%endif
%description
libpkgmanifest is a library for parsing and creating RPM manifests.
It provides a native C++ API and Python bindings.
%files -n libpkgmanifest
%{_libdir}/libpkgmanifest.so
%package -n libpkgmanifest-devel
Summary: Development files for libpkgmanifest
License: LGPL-2.1-or-later
Requires: libpkgmanifest%{?_isa} = %{version}-%{release}
%description -n libpkgmanifest-devel
Development files for libpkgmanifest.
%files -n libpkgmanifest-devel
%{_includedir}/libpkgmanifest/
%{_libdir}/libpkgmanifest.so
%{_libdir}/pkgconfig/libpkgmanifest.pc
%if %{with python}
%package -n python3-libpkgmanifest
%{?python_provide:%python_provide python3-libpkgmanifest}
Summary: Python 3 bindings for the libpkgmanifest library
License: LGPL-2.1-or-later
Requires: libpkgmanifest%{?_isa} = %{version}-%{release}
%description -n python3-libpkgmanifest
Python 3 bindings for the libpkgmanifest library.
%files -n python3-libpkgmanifest
%{python3_sitearch}/libpkgmanifest
%{python3_sitearch}/libpkgmanifest-*.dist-info
%endif
%prep
%autosetup -p1 -n libpkgmanifest-%{version}
%build
%cmake \
-DWITH_DOCS=%{?with_docs:ON}%{!?with_docs:OFF} \
-DWITH_PYTHON=%{?with_python:ON}%{!?with_python:OFF} \
-DWITH_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \
\
-DVERSION_MAJOR=%{version_major} \
-DVERSION_MINOR=%{version_minor} \
-DVERSION_PATCH=%{version_patch}
%cmake_build
%install
%cmake_install
%changelog
%autochangelog