]>
Commit | Line | Data |
---|---|---|
7c741336 | 1 | %define pkgname facter |
7c741336 ER |
2 | Summary: Ruby module for collecting simple facts about a host operating system |
3 | Name: ruby-%{pkgname} | |
a42b13d9 | 4 | Version: 2.4.4 |
5bea4e8f | 5 | Release: 2 |
879f7798 | 6 | License: GPL v2+ |
dd539fcd | 7 | Group: Development/Languages |
a42b13d9 ER |
8 | Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem |
9 | # Source0-md5: 0e8806dbfaa5b9b0b7b7f19c725aab1d | |
10 | URL: https://puppetlabs.com/facter | |
879f7798 | 11 | BuildRequires: docutils |
dd539fcd ER |
12 | BuildRequires: rpm-rubyprov |
13 | BuildRequires: rpmbuild(macros) >= 1.656 | |
58ca4720 | 14 | Requires: lsb-release |
f01a134f ER |
15 | Requires: net-tools |
16 | Requires: which | |
17 | # dmidecode and pciutils are not available on all arches | |
18 | %ifarch %{ix86} %{x8664} ia64 | |
19 | Requires: dmidecode | |
20 | Requires: pciutils | |
21 | %endif | |
dd539fcd ER |
22 | Obsoletes: facter < 1.5.9 |
23 | # due arch specific dependencies | |
24 | #BuildArch: noarch | |
879f7798 BZ |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
6bfcb6ee ER |
27 | # nothing to be placed there. we're not noarch only because of arch dependant requires |
28 | %define _enable_debug_packages 0 | |
29 | ||
7c741336 | 30 | %description |
f01a134f ER |
31 | Facter is a lightweight program that gathers basic node information |
32 | about the hardware and operating system. Facter is especially useful | |
33 | for retrieving things like operating system names, hardware | |
34 | characteristics, IP addresses, MAC addresses, and SSH keys. | |
879f7798 | 35 | |
f01a134f ER |
36 | Facter is extensible and allows gathering of node information that may |
37 | be custom or site specific. It is easy to extend by including your own | |
38 | custom facts. Facter can also be used to create conditional | |
39 | expressions in Puppet that key off the values returned by facts. | |
879f7798 | 40 | |
f01a134f ER |
41 | %prep |
42 | %setup -q -n %{pkgname}-%{version} | |
879f7798 | 43 | |
a42b13d9 ER |
44 | %build |
45 | # write .gemspec | |
46 | %__gem_helper spec | |
47 | ||
879f7798 BZ |
48 | %install |
49 | rm -rf $RPM_BUILD_ROOT | |
a42b13d9 ER |
50 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir}} |
51 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} | |
52 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} | |
53 | cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir} | |
879f7798 BZ |
54 | |
55 | %clean | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %files | |
59 | %defattr(644,root,root,755) | |
50d7f27b | 60 | %doc README.md etc/facter.conf |
879f7798 | 61 | %attr(755,root,root) %{_bindir}/facter |
a42b13d9 ER |
62 | %{ruby_vendorlibdir}/%{pkgname} |
63 | %{ruby_vendorlibdir}/%{pkgname}.rb | |
64 | %{ruby_specdir}/%{pkgname}-%{version}.gemspec |