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 %bcond_without pam
Summary: Job spooling tools Summary: Job spooling tools
Name: at Name: at
Version: 3.1.23 Version: 3.1.23
Release: 7%{?dist} Release: 7%{?dist}
# http://packages.debian.org/changelogs/pool/main/a/at/current/copyright # http://packages.debian.org/changelogs/pool/main/a/at/current/copyright
# + install-sh is MIT license with changes under Public Domain # + install-sh is MIT license with changes under Public Domain
License: GPLv3+ and GPLv2+ and ISC and MIT and Public Domain License: GPLv3+ and GPLv2+ and ISC and MIT and Public Domain
URL: http://ftp.debian.org/debian/pool/main/a/at 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 # git upstream source git://git.debian.org/git/collab-maint/at.git
Source1: pam_atd Source1: pam_atd
Source3: atd.sysconf Source3: atd.sysconf
Source5: atd.systemd Source5: atd.systemd
Patch0: at-aarch64.patch Patch: at-aarch64.patch
Patch1: at-3.1.18-make.patch Patch: at-3.1.18-make.patch
Patch2: at-3.1.20-pam.patch Patch: at-3.1.20-pam.patch
Patch4: at-3.1.14-opt_V.patch Patch: at-3.1.14-opt_V.patch
Patch5: at-3.1.20-shell.patch Patch: at-3.1.20-shell.patch
Patch6: at-3.1.18-nitpicks.patch Patch: at-3.1.18-nitpicks.patch
Patch8: at-3.1.14-fix_no_export.patch Patch: at-3.1.14-fix_no_export.patch
Patch9: at-3.1.14-mailwithhostname.patch Patch: at-3.1.14-mailwithhostname.patch
Patch10: at-3.1.14-usePOSIXtimers.patch Patch: at-3.1.14-usePOSIXtimers.patch
Patch12: at-3.1.20-aborted-jobs.patch Patch: at-3.1.20-aborted-jobs.patch
Patch13: at-3.1.18-noabort.patch Patch: at-3.1.18-noabort.patch
Patch14: at-3.1.16-fclose-error.patch Patch: at-3.1.16-fclose-error.patch
Patch15: at-3.1.16-clear-nonjobs.patch Patch: at-3.1.16-clear-nonjobs.patch
Patch16: at-3.1.18-utc-dst.patch Patch: at-3.1.18-utc-dst.patch
Patch17: at-3.1.20-lock-locks.patch Patch: at-3.1.20-lock-locks.patch
Patch18: at-3.1.23-document-n.patch Patch: at-3.1.23-document-n.patch
Patch19: at-3.1.20-log-jobs.patch Patch: at-3.1.20-log-jobs.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: flex flex-static bison autoconf 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. use crontab instead.
%prep %prep
%setup -q %autosetup -N
cp %{SOURCE1} . cp %{SOURCE1} .
%patch0 -p1 -b .arm %autopatch -p1
%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
%build %build
# patch9 touches configure.in # at-3.1.14-usePOSIXtimers.patch touches configure.in
autoconf autoconf
# uselles files # uselles files
rm -f lex.yy.* y.tab.* rm -f lex.yy.* y.tab.*
%configure --with-atspool=%{_localstatedir}/spool/at/spool \ %configure --with-atspool=%{_localstatedir}/spool/at/spool \
--with-jobdir=%{_localstatedir}/spool/at \ --with-jobdir=%{_localstatedir}/spool/at \
--with-daemon_username=root \ --with-daemon_username=root \
--with-daemon_groupname=root \ --with-daemon_groupname=root \
--with-selinux \ --with-selinux \
%if %{with pam} %{?with_pam:--with-pam}
--with-pam
%endif
make make
%install %install
make install \ make install \
DAEMON_USERNAME=`id -nu`\ DAEMON_USERNAME=`id -nu`\
DAEMON_GROUPNAME=`id -ng` \ DAEMON_GROUPNAME=`id -ng` \
DESTDIR=%{buildroot}\ DESTDIR=%{buildroot}\
sbindir=%{buildroot}%{_prefix}/sbin\ sbindir=%{buildroot}%{_prefix}/sbin\
bindir=%{buildroot}%{_bindir}\ bindir=%{buildroot}%{_bindir}\
prefix=%{buildroot}%{_prefix}\ prefix=%{buildroot}%{_prefix}\
exec_prefix=%{buildroot}%{_prefix}\ exec_prefix=%{buildroot}%{_prefix}\
docdir=%{buildroot}/usr/doc\ docdir=%{buildroot}/usr/doc\
mandir=%{buildroot}%{_mandir}\ mandir=%{buildroot}%{_mandir}\
etcdir=%{buildroot}%{_sysconfdir} \ etcdir=%{buildroot}%{_sysconfdir} \
ATJOB_DIR=%{buildroot}%{_localstatedir}/spool/at \ ATJOB_DIR=%{buildroot}%{_localstatedir}/spool/at \
ATSPOOL_DIR=%{buildroot}%{_localstatedir}/spool/at/spool \ ATSPOOL_DIR=%{buildroot}%{_localstatedir}/spool/at/spool \
INSTALL_ROOT_USER=`id -nu` \ INSTALL_ROOT_USER=`id -nu` \
INSTALL_ROOT_GROUP=`id -nu`; INSTALL_ROOT_GROUP=`id -nu`;
echo > %{buildroot}%{_sysconfdir}/at.deny echo > %{buildroot}%{_sysconfdir}/at.deny
mkdir docs mkdir docs
@ -167,20 +150,20 @@ chown root:root %{_localstatedir}/spool/at/.SEQ
%files %files
%license Copyright COPYING %license Copyright COPYING
%doc README timespec ChangeLog %doc README timespec ChangeLog
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/at.deny %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/at.deny
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/atd %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/atd
%attr(0700,root,root) %dir %{_localstatedir}/spool/at %attr(0700,root,root) %dir %{_localstatedir}/spool/at
%attr(0600,root,root) %verify(not md5 size mtime) %ghost %{_localstatedir}/spool/at/.SEQ %attr(0600,root,root) %verify(not md5 size mtime) %ghost %{_localstatedir}/spool/at/.SEQ
%attr(0700,root,root) %dir %{_localstatedir}/spool/at/spool %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}/pam.d/atd
%{_sbindir}/atrun %{_sbindir}/atrun
%attr(0755,root,root) %{_sbindir}/atd %attr(0755,root,root) %{_sbindir}/atd
%{_mandir}/man*/* %{_mandir}/man*/*
%{_bindir}/batch %{_bindir}/batch
%{_bindir}/atrm %{_bindir}/atrm
%{_bindir}/atq %{_bindir}/atq
%attr(4755,root,root) %{_bindir}/at %attr(4755,root,root) %{_bindir}/at
%attr(0644,root,root) /%{_unitdir}/atd.service %attr(0644,root,root) /%{_unitdir}/atd.service
%changelog %changelog
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.1.23-7 * 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 * 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 - 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 * Fri Oct 24 2008 Marcela Mašláňová <mmaslano@redhat.com> - 3.1.10-26
- update init script according to SysVInitScript - update init script according to SysVInitScript