]> git.pld-linux.org Git - packages/cancd.git/blob - cancd.spec
- added user and logdir
[packages/cancd.git] / cancd.spec
1 Summary:        The CA NetConsole Daemon
2 Name:           cancd
3 Version:        0.1.0
4 Release:        0.4
5 License:        GPL
6 Group:          Applications/File
7 Source0:        http://oss.oracle.com/projects/cancd/dist/files/source/%{name}-%{version}.tar.gz
8 # Source0-md5:  3eb4a75cfa4d1a860ea547fdc76c6d4d
9 Source1:        %{name}.init
10 Source2:        %{name}.sysconfig
11 Patch0:         %{name}-make.patch
12 URL:            http://oss.oracle.com/projects/cancd/
13 BuildRequires:  rpmbuild(macros) >= 1.228
14 Requires(post,preun):   /sbin/chkconfig
15 Requires(postun):       /usr/sbin/groupdel
16 Requires(postun):       /usr/sbin/userdel
17 Requires(pre):  /bin/id
18 Requires(pre):  /usr/bin/getgid
19 Requires(pre):  /usr/sbin/groupadd
20 Requires(pre):  /usr/sbin/useradd
21 Requires:       /sbin/chkconfig
22 Requires:       rc-scripts
23 Provides:       group(cancd)
24 Provides:       user(cancd)
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 This is the CA NetConsole Daemon, a daemon to receive output from the
29 Linux netconsole driver.
30
31 %prep
32 %setup -q
33 %patch0 -p1
34
35 %build
36 %{__make} \
37         CC="%{__cc}" \
38         OPTFLAGS="%{rpmcflags}"
39
40 %install
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/var/log/cancd}
43 %{__make} install \
44         DESTDIR=$RPM_BUILD_ROOT
45
46 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/cancd
47 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cancd
48
49 %clean
50 rm -rf "$RPM_BUILD_ROOT"
51
52 %pre
53 %groupadd -g 162 cancd
54 %useradd -u 162 -c "CA NetConsole Daemon" -g cancd cancd
55
56 %post
57 /sbin/chkconfig --add cancd
58 %service cancd restart
59
60 %preun
61 if [ "$1" = "0" ]; then
62         %service cancd stop
63         /sbin/chkconfig --del cancd
64 fi
65
66 %postun
67 if [ "$1" = "0" ]; then
68         %userremove cancd
69         %groupremove cancd
70 fi
71
72 %files
73 %defattr(644,root,root,755)
74 %attr(755,root,root) %{_sbindir}/cancd
75 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cancd
76 %attr(754,root,root) %config /etc/rc.d/init.d/cancd
77 %attr(770,root,cancd) %dir /var/log/cancd
This page took 0.075393 seconds and 3 git commands to generate.