87 lines
2.6 KiB
RPMSpec
87 lines
2.6 KiB
RPMSpec
Name: watchdog
|
|
Summary: A powerful software and/or Hardware watchdog daemon and/or device
|
|
Version: 5.16
|
|
Release: 1
|
|
License: GPLv2
|
|
|
|
URL: http://sourceforge.net/projects/watchdog/
|
|
Source0: http://downloads.sourceforge.net/watchdog/watchdog-%{version}.tar.gz
|
|
Source1: watchdog.init
|
|
Source2: watchdog.service
|
|
Source3: watchdog-ping.service
|
|
|
|
BuildRequires: gcc libtirpc-devel
|
|
BuildRequires: autoconf automake
|
|
BuildRequires: systemd-units
|
|
|
|
Requires(post): systemd
|
|
Requires(preun): systemd
|
|
Requires(postun): systemd
|
|
|
|
%description
|
|
The watchdog program can be used as a powerful software watchdog daemon or
|
|
a hardware watchdog device.
|
|
|
|
%prep
|
|
%autosetup -n watchdog-%{version}
|
|
autoreconf -i
|
|
|
|
%build
|
|
%configure CFLAGS="%{__global_cflags} -I/usr/include/tirpc" \
|
|
LDFLAGS="%{__global_ldflags} -ltirpc"
|
|
%make_build
|
|
|
|
%install
|
|
install -d -m0755 %{buildroot}%{_sysconfdir}
|
|
install -d -m0755 %{buildroot}%{_sysconfdir}/watchdog.d
|
|
|
|
%make_install
|
|
install -Dp -m0644 watchdog.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/watchdog
|
|
install -Dp -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/watchdog.service
|
|
install -Dp -m0644 %{SOURCE3} %{buildroot}%{_unitdir}/watchdog-ping.service
|
|
install -Dd -m0755 %{buildroot}%{_libexecdir}/watchdog/scripts
|
|
|
|
%post
|
|
%systemd_post watchdog.service
|
|
|
|
%preun
|
|
%systemd_preun watchdog.service
|
|
%systemd_preun watchdog-ping.service
|
|
|
|
%postun
|
|
%systemd_postun_with_restart watchdog.service
|
|
%systemd_postun_with_restart watchdog-ping.service
|
|
|
|
%triggerun -- watchdog < 5.9-4
|
|
/usr/bin/systemd-sysv-convert --save watchdog >/dev/null 2>&1 ||:
|
|
/sbin/chkconfig --del watchdog >/dev/null 2>&1 || :
|
|
/bin/systemctl try-restart watchdog.service >/dev/null 2>&1 || :
|
|
/bin/systemctl try-restart watchdog-ping.service >/dev/null 2>&1 || :
|
|
|
|
%files
|
|
%doc AUTHORS ChangeLog COPYING examples/ IAFA-PACKAGE NEWS README TODO README.watchdog.ipmi
|
|
%config(noreplace) %{_sysconfdir}/watchdog.conf
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/watchdog
|
|
%{_sysconfdir}/watchdog.d
|
|
%{_sbindir}/watchdog
|
|
%{_sbindir}/wd_identify
|
|
%{_sbindir}/wd_keepalive
|
|
%{_mandir}/man5/watchdog.conf.5*
|
|
%{_mandir}/man8/watchdog.8*
|
|
%{_mandir}/man8/wd_identify.8*
|
|
%{_mandir}/man8/wd_keepalive.8*
|
|
%{_unitdir}/watchdog.service
|
|
%{_unitdir}/watchdog-ping.service
|
|
%{_libexecdir}/watchdog/scripts
|
|
|
|
%changelog
|
|
* Mon Mar 22 2021 Xiangyang Yu <yuxiangyang4@huawei.com> - 5.16-1
|
|
- update to 5.16
|
|
- add ipmi service sequential dependency
|
|
|
|
* Sat Sep 19 2020 Guoshuai Sun <sunguoshuai@huawei.com> - 5.15-5
|
|
- scripts when uninstall in %preun and %postun should watchdog-ping.service but not watchdog.ping.service
|
|
|
|
* Mon Apr 27 2020 chengzihan <chengzihan2@huawei.com> - 5.15-4
|
|
- Package init
|