forked from rpm-software-management/libcomps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libcomps.spec
116 lines (90 loc) · 2.54 KB
/
libcomps.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
%define __cmake_in_source_build 1
Name: libcomps
Version: 0.1.18
Release: 1%{?dist}
Summary: Comps XML file manipulation library
License: GPLv2+
URL: https://github.com/rpm-software-management/libcomps
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: libxml2-devel
BuildRequires: check-devel
BuildRequires: expat-devel
BuildRequires: zlib-devel
%description
Libcomps is library for structure-like manipulation with content of
comps XML files. Supports read/write XML file, structure(s) modification.
%package devel
Summary: Development files for libcomps library
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Development files for libcomps library.
%package doc
Summary: Documentation files for libcomps library
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
BuildRequires: doxygen
%description doc
Documentation files for libcomps library.
%package -n python-%{name}-doc
Summary: Documentation files for python bindings libcomps library
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
BuildRequires: python3-sphinx
%description -n python-%{name}-doc
Documentation files for python bindings libcomps library.
%package -n python3-%{name}
Summary: Python 3 bindings for libcomps library
BuildRequires: python3-devel
%{?python_provide:%python_provide python3-%{name}}
Requires: %{name}%{?_isa} = %{version}-%{release}
Obsoletes: platform-python-%{name} < %{version}-%{release}
%description -n python3-%{name}
Python3 bindings for libcomps library.
%prep
%autosetup -n %{name}-%{version}
mkdir build-py3
mkdir build-doc
%build
pushd build-py3
%cmake ../libcomps/
%make_build
popd
pushd build-doc
%cmake ../libcomps/
make %{?_smp_mflags} docs
make %{?_smp_mflags} pydocs
popd
%install
pushd build-py3
%make_install
popd
%check
pushd build-py3
make test
make pytest
popd
%if %{undefined ldconfig_scriptlets}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%else
%ldconfig_scriptlets
%endif
%files
%license COPYING
%doc README.md
%{_libdir}/%{name}.so.*
%files devel
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_includedir}/%{name}/
%files doc
%doc build-doc/docs/libcomps-doc/html
%files -n python-%{name}-doc
%doc build-doc/src/python/docs/html
%files -n python3-%{name}
%{python3_sitearch}/%{name}/
%{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info
%changelog