blob: 4eba5be806a948f157886cb46c12292bab329205 (
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
%define name bcfg2
%define version 0.8.3pre6
%define release 1
%define pythonversion 2.3
Summary: Bcfg2 Client
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}-%{version}.tar.gz
License: BSD-like
Group: System Tools
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArchitectures: noarch
Vendor: Narayan Desai <desai@mcs.anl.gov>
PreReq: lsb >= 3.0
Requires: lxml, python
%description
Bcfg2 is a configuration management tool.
%package -n bcfg2-server
Version: %{version}
Summary: Bcfg2 Server
Group: System Tools
Requires: lxml, pyOpenSSL
%description -n bcfg2-server
Bcfg2 client
%prep
%setup -q
%build
python%{pythonversion} setup.py build
%install
python%{pythonversion} setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
mkdir -p ${RPM_BUILD_ROOT}/usr/sbin
mkdir -p ${RPM_BUILD_ROOT}/etc/init.d/
mkdir -p ${RPM_BUILD_ROOT}/etc/default
mkdir -p ${RPM_BUILD_ROOT}/etc/cron.daily/
mkdir -p ${RPM_BUILD_ROOT}/etc/cron.hourly/
mkdir -p ${RPM_BUILD_ROOT}/usr/lib/bcfg2/
mv ${RPM_BUILD_ROOT}/usr/bin/bcfg2* ${RPM_BUILD_ROOT}/usr/sbin
mv ${RPM_BUILD_ROOT}/usr/bin/StatReports ${RPM_BUILD_ROOT}/usr/sbin
install -m 755 debian/buildsys/common/bcfg2.init ${RPM_BUILD_ROOT}/etc/init.d/bcfg2
install -m 755 debian/buildsys/common/bcfg2-server.init ${RPM_BUILD_ROOT}/etc/init.d/bcfg2-server
install -m 755 debian/bcfg2.default ${RPM_BUILD_ROOT}/etc/default/bcfg2
install -m 755 debian/bcfg2.cron.daily ${RPM_BUILD_ROOT}/etc/cron.daily/bcfg2
install -m 755 debian/bcfg2.cron.hourly ${RPM_BUILD_ROOT}/etc/cron.hourly/bcfg2
install -m 755 tools/bcfg2-cron ${RPM_BUILD_ROOT}/usr/lib/bcfg2/bcfg2-cron
%clean
rm -rf $RPM_BUILD_ROOT
%files -n bcfg2-server
%defattr(-,root,root)
/usr/sbin/bcfg2-server
/usr/sbin/bcfg2-repo-validate
/usr/sbin/bcfg2-info
/usr/sbin/StatReports
/usr/bin/GenerateHostInfo
/usr/lib*/python%{pythonversion}/site-packages/Bcfg2/Server/*
/usr/share/bcfg2/schemas/*
/usr/share/bcfg2/xsl-transforms/*
/usr/share/man/man8/*
/etc/init.d/bcfg2-server
%files -n bcfg2
%defattr(-,root,root)
/usr/sbin/bcfg2
/usr/lib*/python%{pythonversion}/site-packages/Bcfg2/*.py*
/usr/lib*/python%{pythonversion}/site-packages/Bcfg2/Client/*
/usr/share/man/man1/*
/usr/share/man/man5/*
/etc/init.d/bcfg2
/etc/default/bcfg2
/etc/cron.hourly/bcfg2
/etc/cron.daily/bcfg2
/usr/lib/bcfg2/bcfg2-cron
%post -n bcfg2-server
chkconfig --add bcfg2-server
|