-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpython-phacter.spec
60 lines (41 loc) · 1.45 KB
/
python-phacter.spec
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
# sitelib for noarch packages
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name: python-phacter
Version: 0.2.0
Release: 2%{?dist}
Summary: System fact look up tool
Group: Applications/System
License: GPLv2
URL: https://github.com/radez/phacter
# source tarball can also be generated with ./setup.py rpm
Source0: http://radez.fedorapeople.org/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-devel, python-setuptools, python-netifaces
Requires: python, python-netifaces
%description
A python tool to report system facts
%prep
%setup -q -n %{name}-%{version}
%build
%{__python} setup.py build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_sharedstatedir}/phacter/
mkdir -p %{buildroot}%{_mandir}/man1/
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
cp phacter.1 %{buildroot}%{_mandir}/man1/phacter.1
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING LICENSE
%doc %{_mandir}/man1/phacter.1.gz
%{_bindir}/phacter
%{python_sitelib}/*
%dir %{_sharedstatedir}/phacter
%changelog
* Mon Nov 28 2011 Dan Radez <[email protected]> - 0.2.0-2
- rpmlint reports no errors or warnings
* Fri Nov 18 2011 Dan Radez <[email protected]> - 0.2.0-1
- Initial spec