summaryrefslogtreecommitdiffstats
path: root/genome-firstboot/genome-firstboot.spec
blob: 49b389c7930191b531af902c58d9e9607238b4c5 (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
Summary: Genome bootstrapping service
Name: genome-firstboot
Source: genome-firstboot.tar.gz
Version: 1.0.0
Release: 1
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Group: RHWWW/Development
Vendor: Red Hat
URL: http://clearspace.knowledge.str.redhat.com/docs/DOC-1456
License: GPL
BuildArch: noarch

%description
Genome firstboot-like bootstrapping service

%prep

%setup -c

%build

%install
# Cleaning up the build root
rm -rf $RPM_BUILD_ROOT

# Create the directory structure required to lay down our files
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig $RPM_BUILD_ROOT/etc/init.d $RPM_BUILD_ROOT/usr/sbin

cp etc/init.d/genome-firstboot $RPM_BUILD_ROOT/etc/init.d
cp usr/sbin/genome-firstboot $RPM_BUILD_ROOT/usr/sbin

# This gets set to yes by another genome tool
echo "RUN_BOOTSTRAP=NO" > $RPM_BUILD_ROOT/etc/sysconfig/genome-firstboot

%clean
rm -rf $RPM_BUILD_ROOT

%preun
if [ "$1" = "0" ] ; then # last uninstall
    /sbin/chkconfig genome-firstboot off
fi

%post
if [ "$1" = "1" ] ; then  # first install
  /sbin/chkconfig genome-firstboot on
fi

%files
%defattr(-,root,root,-)
%config /etc/sysconfig/genome-firstboot

%defattr(744,root,root,-)
/etc/init.d/genome-firstboot
/usr/sbin/genome-firstboot