Modernize and clean spec file

- Unify spaces/tabs to spaces
- Use autosetup/autopatch, get rid of explicit patch numbers
This commit is contained in:
Jan Staněk 2021-04-16 13:12:31 +02:00
parent 0b0cc322e5
commit 888e351a6c
No known key found for this signature in database
GPG Key ID: 2972F2037B243B6D

137
at.spec
View File

@ -1,37 +1,37 @@
%bcond_without pam
Summary: Job spooling tools
Name: at
Version: 3.1.23
Release: 7%{?dist}
Summary: Job spooling tools
Name: at
Version: 3.1.23
Release: 7%{?dist}
# http://packages.debian.org/changelogs/pool/main/a/at/current/copyright
# + install-sh is MIT license with changes under Public Domain
License: GPLv3+ and GPLv2+ and ISC and MIT and Public Domain
URL: http://ftp.debian.org/debian/pool/main/a/at
License: GPLv3+ and GPLv2+ and ISC and MIT and Public Domain
URL: http://ftp.debian.org/debian/pool/main/a/at
Source: http://ftp.debian.org/debian/pool/main/a/at/at_%{version}.orig.tar.gz
Source: http://ftp.debian.org/debian/pool/main/a/at/at_%{version}.orig.tar.gz
# git upstream source git://git.debian.org/git/collab-maint/at.git
Source1: pam_atd
Source3: atd.sysconf
Source5: atd.systemd
Source1: pam_atd
Source3: atd.sysconf
Source5: atd.systemd
Patch0: at-aarch64.patch
Patch1: at-3.1.18-make.patch
Patch2: at-3.1.20-pam.patch
Patch4: at-3.1.14-opt_V.patch
Patch5: at-3.1.20-shell.patch
Patch6: at-3.1.18-nitpicks.patch
Patch8: at-3.1.14-fix_no_export.patch
Patch9: at-3.1.14-mailwithhostname.patch
Patch10: at-3.1.14-usePOSIXtimers.patch
Patch12: at-3.1.20-aborted-jobs.patch
Patch13: at-3.1.18-noabort.patch
Patch14: at-3.1.16-fclose-error.patch
Patch15: at-3.1.16-clear-nonjobs.patch
Patch16: at-3.1.18-utc-dst.patch
Patch17: at-3.1.20-lock-locks.patch
Patch18: at-3.1.23-document-n.patch
Patch19: at-3.1.20-log-jobs.patch
Patch: at-aarch64.patch
Patch: at-3.1.18-make.patch
Patch: at-3.1.20-pam.patch
Patch: at-3.1.14-opt_V.patch
Patch: at-3.1.20-shell.patch
Patch: at-3.1.18-nitpicks.patch
Patch: at-3.1.14-fix_no_export.patch
Patch: at-3.1.14-mailwithhostname.patch
Patch: at-3.1.14-usePOSIXtimers.patch
Patch: at-3.1.20-aborted-jobs.patch
Patch: at-3.1.18-noabort.patch
Patch: at-3.1.16-fclose-error.patch
Patch: at-3.1.16-clear-nonjobs.patch
Patch: at-3.1.18-utc-dst.patch
Patch: at-3.1.20-lock-locks.patch
Patch: at-3.1.23-document-n.patch
Patch: at-3.1.20-log-jobs.patch
BuildRequires: gcc
BuildRequires: flex flex-static bison autoconf
@ -66,58 +66,41 @@ need to be repeated at the same time every day/week, etc. you should
use crontab instead.
%prep
%setup -q
%autosetup -N
cp %{SOURCE1} .
%patch0 -p1 -b .arm
%patch1 -p1 -b .make
%patch2 -p1 -b .pam
%patch4 -p1 -b .opt_V
%patch5 -p1 -b .shell
%patch6 -p1 -b .nit
%patch8 -p1 -b .export
%patch9 -p1 -b .mail
%patch10 -p1 -b .posix
%patch12 -p1 -b .aborted
%patch13 -p1 -b .noabort
%patch14 -p1 -b .fclose
%patch15 -p1 -b .clear-nojobs
%patch16 -p1 -b .dst
%patch17 -p1 -b .lock-locks
%patch18 -p1 -b .document-n
%patch19 -p1 -b .log-jobs
%autopatch -p1
%build
# patch9 touches configure.in
# at-3.1.14-usePOSIXtimers.patch touches configure.in
autoconf
# uselles files
rm -f lex.yy.* y.tab.*
%configure --with-atspool=%{_localstatedir}/spool/at/spool \
--with-jobdir=%{_localstatedir}/spool/at \
--with-daemon_username=root \
--with-daemon_groupname=root \
--with-selinux \
%if %{with pam}
--with-pam
%endif
--with-jobdir=%{_localstatedir}/spool/at \
--with-daemon_username=root \
--with-daemon_groupname=root \
--with-selinux \
%{?with_pam:--with-pam}
make
%install
make install \
DAEMON_USERNAME=`id -nu`\
DAEMON_GROUPNAME=`id -ng` \
DESTDIR=%{buildroot}\
sbindir=%{buildroot}%{_prefix}/sbin\
bindir=%{buildroot}%{_bindir}\
prefix=%{buildroot}%{_prefix}\
exec_prefix=%{buildroot}%{_prefix}\
docdir=%{buildroot}/usr/doc\
mandir=%{buildroot}%{_mandir}\
etcdir=%{buildroot}%{_sysconfdir} \
ATJOB_DIR=%{buildroot}%{_localstatedir}/spool/at \
ATSPOOL_DIR=%{buildroot}%{_localstatedir}/spool/at/spool \
INSTALL_ROOT_USER=`id -nu` \
INSTALL_ROOT_GROUP=`id -nu`;
DAEMON_USERNAME=`id -nu`\
DAEMON_GROUPNAME=`id -ng` \
DESTDIR=%{buildroot}\
sbindir=%{buildroot}%{_prefix}/sbin\
bindir=%{buildroot}%{_bindir}\
prefix=%{buildroot}%{_prefix}\
exec_prefix=%{buildroot}%{_prefix}\
docdir=%{buildroot}/usr/doc\
mandir=%{buildroot}%{_mandir}\
etcdir=%{buildroot}%{_sysconfdir} \
ATJOB_DIR=%{buildroot}%{_localstatedir}/spool/at \
ATSPOOL_DIR=%{buildroot}%{_localstatedir}/spool/at/spool \
INSTALL_ROOT_USER=`id -nu` \
INSTALL_ROOT_GROUP=`id -nu`;
echo > %{buildroot}%{_sysconfdir}/at.deny
mkdir docs
@ -167,20 +150,20 @@ chown root:root %{_localstatedir}/spool/at/.SEQ
%files
%license Copyright COPYING
%doc README timespec ChangeLog
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/at.deny
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/atd
%attr(0700,root,root) %dir %{_localstatedir}/spool/at
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %{_localstatedir}/spool/at/.SEQ
%attr(0700,root,root) %dir %{_localstatedir}/spool/at/spool
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/atd
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/at.deny
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/atd
%attr(0700,root,root) %dir %{_localstatedir}/spool/at
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %{_localstatedir}/spool/at/.SEQ
%attr(0700,root,root) %dir %{_localstatedir}/spool/at/spool
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/atd
%{_sbindir}/atrun
%attr(0755,root,root) %{_sbindir}/atd
%attr(0755,root,root) %{_sbindir}/atd
%{_mandir}/man*/*
%{_bindir}/batch
%{_bindir}/atrm
%{_bindir}/atq
%attr(4755,root,root) %{_bindir}/at
%attr(0644,root,root) /%{_unitdir}/atd.service
%attr(4755,root,root) %{_bindir}/at
%attr(0644,root,root) /%{_unitdir}/atd.service
%changelog
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.1.23-7
@ -425,7 +408,7 @@ chown root:root %{_localstatedir}/spool/at/.SEQ
* Wed Dec 3 2008 Marcela Mašláňová <mmaslano@redhat.com> - 3.1.10-27
- 464393 add script into pm-utils, because daemon wasn't taking all jobs
after suspend/hibernate
after suspend/hibernate
* Fri Oct 24 2008 Marcela Mašláňová <mmaslano@redhat.com> - 3.1.10-26
- update init script according to SysVInitScript