summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-12-12 15:56:00 +0000
committerCoprDistGit <infra@openeuler.org>2024-12-12 15:56:00 +0000
commit6312f90f493c177c2efb0190716c8557cb5efe43 (patch)
treeeb15be068afffde0b08ea18b969c8862ada38947
parent019d4d2113ca95f70308b0315d8f41497c077192 (diff)
automatic import of facter
-rw-r--r--.gitignore1
-rw-r--r--facter.spec67
-rw-r--r--shared_cpp_hcon.patch11
-rw-r--r--sources1
4 files changed, 80 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..074e8a3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/facter-3.14.24.tar.gz
diff --git a/facter.spec b/facter.spec
new file mode 100644
index 0000000..230d342
--- /dev/null
+++ b/facter.spec
@@ -0,0 +1,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
diff --git a/shared_cpp_hcon.patch b/shared_cpp_hcon.patch
new file mode 100644
index 0000000..29b31fe
--- /dev/null
+++ b/shared_cpp_hcon.patch
@@ -0,0 +1,11 @@
+diff --git a/cmake/FindCPPHOCON.cmake b/cmake/FindCPPHOCON.cmake
+index 00ba8bd..0df0a51 100644
+--- a/cmake/FindCPPHOCON.cmake
++++ b/cmake/FindCPPHOCON.cmake
+@@ -1,5 +1,5 @@
+ include(FindDependency)
+-find_dependency(CPPHOCON DISPLAY "cpp-hocon" HEADERS "hocon/config.hpp" LIBRARIES "libcpp-hocon.a")
++find_dependency(CPPHOCON DISPLAY "cpp-hocon" HEADERS "hocon/config.hpp" LIBRARIES "libcpp-hocon.so")
+
+ include(FeatureSummary)
+ set_package_properties(CPPHOCON PROPERTIES DESCRIPTION "A C++ parser for the HOCON configuration language" URL "https://github.com/puppetlabs/cpp-hocon")
diff --git a/sources b/sources
new file mode 100644
index 0000000..6a44ee5
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+542874f2525c62df2a6ce486b49e14f6 facter-3.14.24.tar.gz