]> git.pld-linux.org Git - packages/daemontools.git/blob - daemontools.spec
- package /etc/supervise dir for mis supervise scripts; rel 5
[packages/daemontools.git] / daemontools.spec
1 Summary:        D. J. Bernstein daemontools
2 Summary(pl):    daemontools D. J. Bernsteina
3 Name:           daemontools
4 Version:        0.76
5 Release:        5
6 License:        DJB (http://cr.yp.to/distributors.html)
7 Group:          Networking/Admin
8 Source0:        http://cr.yp.to/daemontools/%{name}-%{version}.tar.gz
9 # Source0-md5:  1871af2453d6e464034968a0fbcb2bfc
10 Source1:        http://smarden.org/pape/djb/manpages/%{name}-%{version}-man.tar.gz
11 # Source1-md5:  2d3858a48f293c87202f76cd883438ee
12 Source2:        %{name}.sysconfig
13 Source3:        %{name}.init
14 Source4:        %{name}-tcprules
15 Patch0:         %{name}-glibc.patch
16 URL:            http://cr.yp.to/daemontools.html
17 BuildRequires:  rpmbuild(macros) >= 1.268
18 Requires(post,preun):   /sbin/chkconfig
19 Requires:       /sbin/chkconfig
20 Requires:       rc-scripts
21 # make and stat from coreutils are for building tcprules
22 Requires:       coreutils
23 Requires:       make
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 # /etc/service or /var/lib/service? (also in .sysconfig)
27 %define         servicedir      /service
28 %define         tcprules        /etc/tcprules.d
29
30 %description
31 daemontools is a collection of tools for managing UNIX services.
32
33 supervise monitors a service. It starts the service and restarts the
34 service if it dies. Setting up a new service is easy: all supervise
35 needs is a directory with a run script that runs the service.
36
37 multilog saves error messages to one or more logs. It optionally
38 timestamps each line and, for each log, includes or excludes lines
39 matching specified patterns. It automatically rotates logs to limit
40 the amount of disk space used. If the disk fills up, it pauses and
41 tries again, without losing any data.
42
43 %description -l pl
44 daemontools to zestaw narzêdzi do zarz±dzania us³ugami uniksowymi.
45
46 supervise monitoruje us³ugi. Startuje us³ugi i restartuje je, gdy
47 umr±. Ustawienie nowej us³ugi jest proste: wszystko czego supervise
48 potrzebuje to katalog ze skryptami startowymi, które startuj± us³ugi.
49
50 multilog zapisuje komunikaty o b³êdach do jednego lub wiêkszej liczby
51 plików logów. Opcjonalnie oznacza ka¿d± liniê dat± oraz, w ka¿dym
52 logu, do³±cza lub pomija linie pasuj±ce do okre¶lonych wzorców.
53 Automatycznie wykonuje rotacjê logów do limitu miejsca na dysku.
54 Je¿eli dysk jest zape³niony, pauzuje i próbuje ponownie, bez strat
55 danych.
56
57 %prep
58 %setup -q -n admin -a1
59 cd %{name}-%{version}/src
60 %patch0 -p0
61
62 %build
63 cd %{name}-%{version}
64 echo "%{__cc} %{rpmcflags} -Wall" >src/conf-cc
65 echo "%{__cc} %{rpmldflags}" >src/conf-ld
66
67 package/compile
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
72         $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
73         $RPM_BUILD_ROOT%{_sysconfdir}/supervise \
74         $RPM_BUILD_ROOT{/var/lib/service,%{servicedir},%{tcprules}}
75
76 # install manuals
77 install %{name}-man/*.8* $RPM_BUILD_ROOT%{_mandir}/man8
78
79 # install binaries
80 cd %{name}-%{version}/command
81 install envdir envuidgid fghack multilog pgrphack \
82         readproctitle setlock setuidgid softlimit \
83         supervise svc svok svscan svscanboot svstat tai64n tai64nlocal \
84         $RPM_BUILD_ROOT%{_sbindir}
85
86 # install rc & sysconfig files
87 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/svscan
88 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/svscan
89
90 install %{SOURCE4} $RPM_BUILD_ROOT%{tcprules}/Makefile
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %post
96 /sbin/chkconfig --add svscan
97 %service svscan restart
98
99 %preun
100 if [ "$1" = "0" ]; then
101         %service svscan stop
102         /sbin/chkconfig --del svscan
103 fi
104
105 %files
106 %defattr(644,root,root,755)
107 %doc %{name}-%{version}/{package/README,src/{CHANGES,TODO}}
108 %attr(755,root,root) %{_sbindir}/*
109 %attr(700,root,root) %{servicedir}
110 %dir %{_sysconfdir}/supervise
111 %{tcprules}
112 %attr(700,root,root) /var/lib/service
113 %attr(754,root,root) /etc/rc.d/init.d/svscan
114 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/svscan
115 %{_mandir}/man8/*
This page took 0.032813 seconds and 3 git commands to generate.