- Use autosetup
- Remove conditional blocks for deprecated versions OBS-URL: https://build.opensuse.org/package/show/Base:System/watchdog?expand=0&rev=4
This commit is contained in:
parent
cd1fe8ec63
commit
6b9404a290
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat May 18 19:24:20 UTC 2024 - Jonas Kvinge <jonaski@opensuse.org>
|
||||||
|
|
||||||
|
- Use autosetup
|
||||||
|
- Remove conditional blocks for deprecated versions
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jun 24 09:51:53 UTC 2022 - Marcus Meissner <meissner@suse.com>
|
Fri Jun 24 09:51:53 UTC 2022 - Marcus Meissner <meissner@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package watchdog
|
# spec file for package watchdog
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,18 +16,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?suse_version} >= 1220
|
|
||||||
%define with_systemd 1
|
|
||||||
%else
|
|
||||||
%define with_systemd 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?suse_version} >= 1500
|
|
||||||
%define with_tirpc 1
|
|
||||||
%else
|
|
||||||
%define with_tirpc 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Summary: Software and/or Hardware watchdog daemon
|
Summary: Software and/or Hardware watchdog daemon
|
||||||
License: GPL-2.0-only
|
License: GPL-2.0-only
|
||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
@ -43,15 +31,11 @@ Source5: watchdog-ping.service
|
|||||||
Patch0: watchdog-sysconfdir.diff
|
Patch0: watchdog-sysconfdir.diff
|
||||||
Patch1: watchdog-initscript.diff
|
Patch1: watchdog-initscript.diff
|
||||||
|
|
||||||
%if %{with_tirpc}
|
|
||||||
BuildRequires: libtirpc-devel
|
BuildRequires: libtirpc-devel
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with_systemd}
|
|
||||||
Requires(post): systemd
|
Requires(post): systemd
|
||||||
Requires(preun): systemd
|
Requires(preun): systemd
|
||||||
Requires(postun): systemd
|
Requires(postun): systemd
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The watchdog program can be used as a powerful software watchdog daemon
|
The watchdog program can be used as a powerful software watchdog daemon
|
||||||
@ -70,71 +54,44 @@ reset (or whatever action was configured to be taken upon watchdog timer
|
|||||||
expiration) initiated by the BMC.
|
expiration) initiated by the BMC.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%autosetup -p1
|
||||||
mv README README.orig
|
mv README README.orig
|
||||||
iconv -f ISO-8859-1 -t UTF-8 < README.orig > README
|
iconv -f ISO-8859-1 -t UTF-8 < README.orig > README
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure \
|
%configure \
|
||||||
%if %{with_tirpc}
|
|
||||||
CFLAGS="$CFLAGS -I/usr/include/tirpc" \
|
CFLAGS="$CFLAGS -I/usr/include/tirpc" \
|
||||||
LIBS="$LIBS -ltirpc"
|
LIBS="$LIBS -ltirpc"
|
||||||
%endif
|
|
||||||
|
|
||||||
%__make %{?_smp_mflags}
|
%__make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -d -m0755 %{buildroot}%{_sysconfdir}
|
install -d -m0755 %{buildroot}%{_sysconfdir}
|
||||||
make DESTDIR=%{buildroot} install
|
make DESTDIR=%{buildroot} install
|
||||||
%if %{with_systemd}
|
|
||||||
install -Dp -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/watchdog.service
|
install -Dp -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/watchdog.service
|
||||||
install -Dp -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/watchdog-ping.service
|
install -Dp -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/watchdog-ping.service
|
||||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcwatchdog
|
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcwatchdog
|
||||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcwatchdog-ping
|
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcwatchdog-ping
|
||||||
%else
|
|
||||||
install -d -m0755 %{buildroot}%{_sysconfdir}/init.d
|
|
||||||
install -m0755 suse/rc.watchdog.suse %{buildroot}%{_sysconfdir}/init.d/watchdog
|
|
||||||
ln -sf ../../%{_sysconfdir}/init.d/watchdog %{buildroot}/%{_sbindir}/rcwatchdog
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
%if %{with_systemd}
|
|
||||||
%service_add_pre %{name}.service watchdog-ping.service
|
%service_add_pre %{name}.service watchdog-ping.service
|
||||||
%endif
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%if %{with_systemd}
|
|
||||||
%service_add_post %{name}.service watchdog-ping.service
|
%service_add_post %{name}.service watchdog-ping.service
|
||||||
%endif
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%if %{with_systemd}
|
|
||||||
%service_del_preun %{name}.service watchdog-ping.service
|
%service_del_preun %{name}.service watchdog-ping.service
|
||||||
%else
|
|
||||||
%{stop_on_removal %{name}}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%if %{with_systemd}
|
|
||||||
%service_del_postun %{name}.service watchdog-ping.service
|
%service_del_postun %{name}.service watchdog-ping.service
|
||||||
%else
|
|
||||||
%{restart_on_update %{name}}
|
|
||||||
%{insserv_cleanup}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-, root, root, -)
|
%defattr(-, root, root, -)
|
||||||
%doc AUTHORS ChangeLog COPYING examples/ IAFA-PACKAGE NEWS README TODO README.watchdog.ipmi
|
%doc AUTHORS ChangeLog COPYING examples/ IAFA-PACKAGE NEWS README TODO README.watchdog.ipmi
|
||||||
%config(noreplace) %{_sysconfdir}/watchdog.conf
|
%config(noreplace) %{_sysconfdir}/watchdog.conf
|
||||||
%if %{with_systemd}
|
|
||||||
%{_unitdir}/watchdog.service
|
%{_unitdir}/watchdog.service
|
||||||
%{_unitdir}/watchdog-ping.service
|
%{_unitdir}/watchdog-ping.service
|
||||||
%{_sbindir}/rcwatchdog-ping
|
%{_sbindir}/rcwatchdog-ping
|
||||||
%else
|
|
||||||
%{_sysconfdir}/init.d/watchdog
|
|
||||||
%endif
|
|
||||||
%{_sbindir}/rcwatchdog
|
%{_sbindir}/rcwatchdog
|
||||||
%{_sbindir}/watchdog
|
%{_sbindir}/watchdog
|
||||||
%{_sbindir}/wd_keepalive
|
%{_sbindir}/wd_keepalive
|
||||||
|
Loading…
Reference in New Issue
Block a user