%define name facter %define version 1.5.0 %define release %mkrel 1 Name: %{name} Version: %{version} Release: %{release} Summary: Ruby module for collecting simple facts about a host operating system License: LGPLv2 Group: System/Libraries URL: http://reductivelabs.com/projects/facter Source0: http://reductivelabs.com/downloads/facter/%{name}-%{version}.tgz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: ruby Requires: ruby >= 1.8.1 Requires: dmidecode Requires: lsb-release %description Ruby module for collecting simple facts about a host Operating system. Some of the facts are preconfigured, such as the hostname and the operating system. Additional facts can be added through simple Ruby scripts %prep %setup -q %build # Use /usr/bin/ruby directly instead of /usr/bin/env ruby in #+ executables. Otherwise, initscripts break since pidof can't #+ find the right process %{__sed} -i -e 's@^#!.*$@#! /usr/bin/ruby@' bin/facter %install %{__rm} -rf %{buildroot} %{__install} -d -m0755 %{buildroot}%{ruby_sitelibdir} %{__install} -d -m0755 %{buildroot}%{ruby_sitelibdir}/facter %{__install} -d -m0755 %{buildroot}%{ruby_sitelibdir}/facter/util %{__install} -d -m0755 %{buildroot}%{ruby_sitelibdir}/facter/util/plist %{__install} -d -m0755 %{buildroot}%{_bindir} %{__install} -d -m0755 %{buildroot}%{_defaultdocdir}/%{name} %{__install} -p -m0644 lib/*.rb %{buildroot}%{ruby_sitelibdir} %{__install} -p -m0644 lib/facter/*.rb %{buildroot}%{ruby_sitelibdir}/facter %{__install} -p -m0644 lib/facter/util/*.rb %{buildroot}%{ruby_sitelibdir}/facter/util %{__install} -p -m0644 lib/facter/util/plist/*.rb %{buildroot}%{ruby_sitelibdir}/facter/util/plist %{__install} -p -m0755 bin/facter %{buildroot}%{_bindir} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{_bindir}/facter %{ruby_sitelibdir}/facter.rb %{ruby_sitelibdir}/facter %doc CHANGELOG COPYING INSTALL LICENSE README %changelog * Thu Jul 24 2008 roudoud0u 1.5.0-1mdv2009.0 - New upstream release - drop Patch100: Mandriva detection fixed upstream * Tue Oct 30 2007 Funda Wang 1.3.8-1mdv2008.1 + Revision: 103817 - BR ruby - import facter * Thu Oct 30 2007 roudoud0u - 1.3.8-1 - Initial Mandriva rpm package (based on David Lutterkort spec file) * Thu Mar 29 2007 David Lutterkort - 1.3.7-1 - New version * Fri Jan 19 2007 David Lutterkort - 1.3.6-1 - New version * Thu Jan 18 2007 David Lutterkort - 1.3.5-3 - require which; facter is very unhappy without it * Mon Nov 20 2006 David Lutterkort - 1.3.5-2 - Make require ruby(abi) and buildarch: noarch conditional for fedora 5 or later to allow building on older fedora releases * Tue Oct 10 2006 David Lutterkort - 1.3.5-1 - New version * Tue Sep 26 2006 David Lutterkort - 1.3.4-1 - New version * Wed Sep 13 2006 David Lutterkort - 1.3.3-2 - Rebuilt for FC6 * Wed Jun 28 2006 David Lutterkort - 1.3.3-1 - Rebuilt * Fri Jun 19 2006 Luke Kanies - 1.3.0-1 - Fixed spec file to work again with the extra memory and processor files. - Require ruby(abi). Build as noarch * Fri Jun 9 2006 Luke Kanies - 1.3.0-1 - Added memory.rb and processor.rb * Mon Apr 17 2006 David Lutterkort - 1.1.4-4 - Rebuilt with changed upstream tarball * Tue Mar 21 2006 David Lutterkort - 1.1.4-3 - Do not rely on install.rb, it will be deleted upstream * Mon Mar 13 2006 David Lutterkort - 1.1.4-2 - Commented out noarch; requires fix for bz184199 * Mon Mar 6 2006 David Lutterkort - 1.1.4-1 - Removed unused macros * Mon Feb 6 2006 David Lutterkort - 1.1.1-2 - Fix BuildRoot. Add dist to release tag * Wed Jan 11 2006 David Lutterkort - 1.1.1-1 - Initial build.