summaryrefslogtreecommitdiff
path: root/leatherman.spec
blob: e589ba078ad19a0c143f015269494f45ca76677a (plain)
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
Name:                leatherman
Version:             1.12.13
Release:             2
Summary:             Collection of C++ and CMake utility libraries
License:             Apache-2.0 and MIT
URL:                 https://github.com/puppetlabs/leatherman
Source:              https://github.com/puppetlabs/leatherman/archive/%{version}/leatherman-%{version}.tar.gz
Patch0:              shared_nowide.patch
Patch1:              system-catch.patch
Patch2:              leatherman-gcc11.patch
BuildRequires:       cmake >= 3.2.2 make gcc-c++ boost-devel >= 1.73 libcurl-devel gettext catch1-devel
Provides:            bundled(rapidjson) = 1.0.2
%description
%{summary}.

%package        devel
Summary:             Development files for leatherman
Requires:            leatherman%{?_isa} = %{version}-%{release} boost-devel libcurl-devel%{?_isa}
%description    devel
The leatherman-devel package contains libraries and header files for
developing applications that use leatherman.

%prep
%autosetup -p1
sed -i -e "s/\s*-Werror\s*//g" cmake/cflags.cmake

%build
%cmake \
  -DLEATHERMAN_SHARED=ON \
  -DLEATHERMAN_DEBUG=ON \
  -DLEATHERMAN_CATCH_INCLUDE=%{_includedir}/catch \
  %{nil}
%cmake_build

%install
%cmake_install
%find_lang leatherman_logging
%find_lang leatherman_locale

%files -f leatherman_logging.lang  -f leatherman_locale.lang
%license LICENSE
%{_libdir}/leatherman*.so.*

%files devel
%{_includedir}/leatherman
%{_libdir}/leatherman*.so
%{_libdir}/cmake/leatherman

%changelog
* Thu Dec 12 2024 Funda Wang <fundawang@yeah.net> - 1.12.13-2
- adopt to new cmake macro

* Fri May 24 2024 wulei <wu_lei@hoperun.com> - 1.12.13-1
- Upgrade package

* Fri Aug 14 2020 yaokai <yaokai13@huawei.com> - 1.12.0-1
- package init