]>
Commit | Line | Data |
---|---|---|
47c479b8 PG |
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 | ||
f6248631 | 8 | Summary: The CA NetConsole Daemon |
35a90b73 | 9 | Summary(pl.UTF-8): Demon CA NetConsole |
f6248631 ER |
10 | Name: cancd |
11 | Version: 0.1.0 | |
2191d80d | 12 | Release: 2 |
f6248631 ER |
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 | |
3ac4b4c9 ER |
17 | Source1: %{name}.init |
18 | Source2: %{name}.sysconfig | |
f6248631 | 19 | Patch0: %{name}-make.patch |
2c30b8fe | 20 | Patch1: %{name}-nullterminate.patch |
2191d80d PG |
21 | Patch2: %{name}-c_cleanup.patch |
22 | Patch3: %{name}-limits.patch | |
f6248631 ER |
23 | URL: http://oss.oracle.com/projects/cancd/ |
24 | BuildRequires: rpmbuild(macros) >= 1.228 | |
25 | Requires(post,preun): /sbin/chkconfig | |
3ac4b4c9 ER |
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 | |
f6248631 | 32 | Requires: /sbin/chkconfig |
2f5fde48 | 33 | Requires: rc-scripts >= 0.4.0.17 |
3ac4b4c9 ER |
34 | Provides: group(cancd) |
35 | Provides: user(cancd) | |
d7aa8fea | 36 | ExcludeArch: alpha |
f6248631 ER |
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 | ||
746be506 JR |
43 | %description -l pl.UTF-8 |
44 | To jest demon CA NetConsole - demon odbierający wyjście z linuksowego | |
909f7ebd JB |
45 | sterownika netconsole (konsoli sieciowej). |
46 | ||
f6248631 ER |
47 | %prep |
48 | %setup -q | |
49 | %patch0 -p1 | |
2c30b8fe | 50 | %patch1 -p1 |
2191d80d PG |
51 | %patch2 -p1 |
52 | %patch3 -p0 | |
f6248631 ER |
53 | |
54 | %build | |
55 | %{__make} \ | |
56 | CC="%{__cc}" \ | |
57 | OPTFLAGS="%{rpmcflags}" | |
58 | ||
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
3ac4b4c9 | 61 | install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/var/log/cancd} |
f6248631 ER |
62 | %{__make} install \ |
63 | DESTDIR=$RPM_BUILD_ROOT | |
64 | ||
3ac4b4c9 ER |
65 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/cancd |
66 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cancd | |
f6248631 ER |
67 | |
68 | %clean | |
dfeb5f8b | 69 | rm -rf $RPM_BUILD_ROOT |
f6248631 | 70 | |
3ac4b4c9 ER |
71 | %pre |
72 | %groupadd -g 162 cancd | |
73 | %useradd -u 162 -c "CA NetConsole Daemon" -g cancd cancd | |
74 | ||
f6248631 ER |
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 | ||
3ac4b4c9 ER |
85 | %postun |
86 | if [ "$1" = "0" ]; then | |
87 | %userremove cancd | |
88 | %groupremove cancd | |
89 | fi | |
90 | ||
f6248631 ER |
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 | |
3da882d7 | 95 | %attr(754,root,root) /etc/rc.d/init.d/cancd |
3ac4b4c9 | 96 | %attr(770,root,cancd) %dir /var/log/cancd |