]> git.pld-linux.org Git - packages/cancd.git/blob - cancd.spec
8f2577baba32417b02533687f919532ed3101b90
[packages/cancd.git] / cancd.spec
1 # TODO:
2 # - fix alpha build:
3 #  alpha-pld-linux-gcc -Wall -O2 -mieee  -DVERSION="\"0.1.0\""   -c -o cancd.o cancd.c
4 #  cancd.c: In function `setup_signals':
5 #  cancd.c:95: error: structure has no member named `sa_restorer'
6 #  make: *** [cancd.o] Error 1
7
8 Summary:        The CA NetConsole Daemon
9 Summary(pl.UTF-8):      Demon CA NetConsole
10 Name:           cancd
11 Version:        0.1.0
12 Release:        2
13 License:        GPL
14 Group:          Applications/File
15 Source0:        http://oss.oracle.com/projects/cancd/dist/files/source/%{name}-%{version}.tar.gz
16 # Source0-md5:  3eb4a75cfa4d1a860ea547fdc76c6d4d
17 Source1:        %{name}.init
18 Source2:        %{name}.sysconfig
19 Patch0:         %{name}-make.patch
20 Patch1:         %{name}-nullterminate.patch
21 Patch2:         %{name}-c_cleanup.patch
22 Patch3:         %{name}-limits.patch
23 URL:            http://oss.oracle.com/projects/cancd/
24 BuildRequires:  rpmbuild(macros) >= 1.228
25 Requires(post,preun):   /sbin/chkconfig
26 Requires(postun):       /usr/sbin/groupdel
27 Requires(postun):       /usr/sbin/userdel
28 Requires(pre):  /bin/id
29 Requires(pre):  /usr/bin/getgid
30 Requires(pre):  /usr/sbin/groupadd
31 Requires(pre):  /usr/sbin/useradd
32 Requires:       /sbin/chkconfig
33 Requires:       rc-scripts >= 0.4.0.17
34 Provides:       group(cancd)
35 Provides:       user(cancd)
36 ExcludeArch:    alpha
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 This is the CA NetConsole Daemon, a daemon to receive output from the
41 Linux netconsole driver.
42
43 %description -l pl.UTF-8
44 To jest demon CA NetConsole - demon odbierający wyjście z linuksowego
45 sterownika netconsole (konsoli sieciowej).
46
47 %prep
48 %setup -q
49 %patch0 -p1
50 %patch1 -p1
51 %patch2 -p1
52 %patch3 -p0
53
54 %build
55 %{__make} \
56         CC="%{__cc}" \
57         OPTFLAGS="%{rpmcflags}"
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/var/log/cancd}
62 %{__make} install \
63         DESTDIR=$RPM_BUILD_ROOT
64
65 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/cancd
66 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cancd
67
68 %clean
69 rm -rf "$RPM_BUILD_ROOT"
70
71 %pre
72 %groupadd -g 162 cancd
73 %useradd -u 162 -c "CA NetConsole Daemon" -g cancd cancd
74
75 %post
76 /sbin/chkconfig --add cancd
77 %service cancd restart
78
79 %preun
80 if [ "$1" = "0" ]; then
81         %service cancd stop
82         /sbin/chkconfig --del cancd
83 fi
84
85 %postun
86 if [ "$1" = "0" ]; then
87         %userremove cancd
88         %groupremove cancd
89 fi
90
91 %files
92 %defattr(644,root,root,755)
93 %attr(755,root,root) %{_sbindir}/cancd
94 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cancd
95 %attr(754,root,root) /etc/rc.d/init.d/cancd
96 %attr(770,root,cancd) %dir /var/log/cancd
This page took 0.043572 seconds and 2 git commands to generate.