summaryrefslogtreecommitdiff
path: root/facter.spec
blob: 230d3428da015364ef62fb02685dfe0c29bdabd1 (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
58
59
60
61
62
63
64
65
66
67
Name:                facter
Version:             3.14.24
Release:             1
Summary:             Command and ruby library for gathering system information
License:             Apache-2.0
URL:                 https://puppetlabs.com/facter
Source0:             https://downloads.puppetlabs.com/facter/facter-%{version}.tar.gz
Patch0:              shared_cpp_hcon.patch
BuildRequires:       cmake make gcc-c++ libcurl-devel leatherman-devel
BuildRequires:       boost-devel ruby-devel >= 1.9 yaml-cpp-devel openssl-devel
BuildRequires:       libblkid-devel cpp-hocon-devel
Requires:            leatherman%{?_isa}

%package devel
Summary:             Development libraries for building against facter
Requires:            facter%{?_isa} = %{version}-%{release}

%package -n ruby-facter
Summary:             Ruby bindings for facter
Requires:            facter%{?_isa} = %{version}-%{release} ruby%{?_isa}
%description
Facter is a lightweight program that gathers basic node information about the
hardware and operating system. Facter is especially useful for retrieving
things like operating system names, hardware characteristics, IP addresses, MAC
addresses, and SSH keys.
Facter is extensible and allows gathering of node information that may be
custom or site specific. It is easy to extend by including your own custom
facts. Facter can also be used to create conditional expressions in Puppet that
key off the values returned by facts.
%description devel
The headers to link against libfacter in other applications.
%description -n ruby-facter
The ruby bindings for libfacter.

%prep
%autosetup -p1

%build
%cmake \
  -DBOOST_INCLUDEDIR=%{_includedir}/boost% \
  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  %{nil}
%cmake_build

%install
%cmake_install

%files
%license LICENSE
%doc README.md
%{_bindir}/facter
%{_libdir}/libfacter.so.*
%{_libdir}/libfacter.so
%{_mandir}/man8/facter*

%files devel
%{_includedir}/facter/

%files -n ruby-facter
%{ruby_vendorlibdir}/facter.rb

%changelog
* Thu Dec 12 2024 Funda Wang <fundawang@yeah.net> - 3.14.24-1
- update to 3.14.24

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