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