-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlibunfo.spec.in
121 lines (92 loc) · 2.51 KB
/
libunfo.spec.in
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
117
118
119
120
121
%global commit @GITREVLONG@
Name: libunfo
Version: @VERSION@
Release: @libunfo_RELEASE@%{?dist}
Summary: updateinfo XML file manipulation library
Group: Development/Libraries
License: GPLv2+
URL: https://github.com/midnightercz/libunfo/
Source0: https://github.com/midnightercz/libunfo/@SOURCE_URL_PATH@
BuildRequires: libxml2-devel
BuildRequires: check-devel
BuildRequires: expat-devel
BuildRequires: zlib-devel
%if 0%{?rhel} == 6
BuildRequires: cmake28
%else
BuildRequires: cmake
%endif
%description
Libunfo is library for structure-like manipulation with content of
updateinfo xml files. Supports read/write XML(or gziped XML) file,
structure(s) modification.
%package doc
Summary: Documentation files for libunfo library
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
BuildRequires: doxygen
%description doc
Documentation files for libunfo library
%package devel
Summary: Development files for libunfo library
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Development files for libunfo library
%package -n python-libunfo
Summary: Python2 bindings for libunfo library
Group: Development/Libraries
BuildRequires: python-devel
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python-libunfo
Python2 bindings for libunfo library
%package -n python3-libunfo
Summary: Python3 bindings for libunfo library
Group: Development/Libraries
BuildRequires: python3-devel
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python3-libunfo
Python3 bindings for libunfo library
%prep
%setup -qn %{name}-%{commit}
rm -rf py3
mkdir ../py3
cp -a . ../py3/
mv ../py3 ./
%build
%cmake -DPYTHON_DESIRED:STRING=2
make %{?_smp_mflags}
make %{?_smp_mflags} docs
pushd py3
%cmake -DPYTHON_DESIRED:STRING=3
make %{?_smp_mflags}
make %{?_smp_mflags} docs
popd
%check devel
make test
%install
make install DESTDIR=%{buildroot}
pushd py3
make install DESTDIR=%{buildroot}
popd
%clean
rm -rf $buildroot
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%{_libdir}/libunfo.so.*
%doc README.md COPYING
%files devel
%{_libdir}/libunfo.so
%{_includedir}/*
#%files doc
#%doc docs/libunfo-doc/html
%files -n python-libunfo
%{_libdir}/*
%exclude %{_libdir}/libunfo/__pycache__
%files -n python3-libunfo
%{_libdir}/*
%exclude %{_libdir}/libunfo/__pycache__
%changelog
@CHANGELOG@