]> git.pld-linux.org Git - SPECS.git/blob - pulsard.spec
SPECS updated Sun 1 Aug 11:02:02 CEST 2021
[SPECS.git] / pulsard.spec
1 Summary:        UPS monitoring program for MGE Pulsar UPSes
2 Summary(pl.UTF-8):      Program do monitorowania UPS-ów MGE Pulsar
3 Name:           pulsard
4 Version:        1.0.1
5 Release:        3
6 License:        GPL
7 Group:          Daemons
8 Source0:        http://dl.sourceforge.net/pulsard/%{name}-%{version}.tar.gz
9 # Source0-md5:  4fb74308f9b4c571fb818d349bed5d5c
10 Source1:        %{name}.init
11 Source2:        %{name}.sysconfig
12 Patch0:         %{name}-newinit.patch
13 URL:            http://pulsard.sourceforge.net/
14 BuildRequires:  autoconf
15 BuildRequires:  automake
16 BuildRequires:  libgpio-devel >= 0.0.2
17 BuildRequires:  rpmbuild(macros) >= 1.268
18 Requires(post,preun):   /sbin/chkconfig
19 Requires:       rc-scripts
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 Pulsard is a monitoring software for MGE Pulsar UPSes.
24
25 %description -l pl.UTF-8
26 Pulsard to program monitorujący dla UPS-ów MGE Pulsar.
27
28 %prep
29 %setup -q
30 %patch0 -p1
31
32 %build
33 %{__aclocal}
34 %{__autoconf}
35 %{__automake}
36 %configure
37 %{__make}
38
39 %install
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig}
42
43 %{__make} install \
44         DESTDIR=$RPM_BUILD_ROOT
45
46 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
47 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
48
49 %clean
50 rm -rf $RPM_BUILD_ROOT
51
52 %post
53 /sbin/chkconfig --add %{name}
54 %service %{name} restart "pulsard ups daemon"
55
56 %preun
57 if [ "$1" = "0" ]; then
58         %service %{name} stop
59         /sbin/chkconfig --del %{name}
60 fi
61
62 %files
63 %defattr(644,root,root,755)
64 %doc AUTHORS Protocol README
65 %attr(755,root,root) %{_sbindir}/*
66 %attr(754,root,root) /etc/rc.d/init.d/%{name}
67 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
68 %{_mandir}/man?/*
This page took 0.16414 seconds and 3 git commands to generate.