2007-01-15 23:50:49 +01:00
|
|
|
#
|
2011-03-07 15:45:29 +01:00
|
|
|
# spec file for package acct
|
2007-01-15 23:50:49 +01:00
|
|
|
#
|
2015-05-18 09:49:46 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-15 23:50:49 +01:00
|
|
|
#
|
2008-10-23 04:26:09 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-15 23:50:49 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: acct
|
2014-12-20 16:56:51 +01:00
|
|
|
Version: 6.6.2
|
2012-07-22 21:23:23 +02:00
|
|
|
Release: 0
|
2014-12-20 16:56:51 +01:00
|
|
|
Source: http://ftp.gnu.org/gnu/acct/%{name}-%{version}.tar.gz
|
2014-12-20 16:57:36 +01:00
|
|
|
Source4: http://ftp.gnu.org/gnu/acct/%{name}-%{version}.tar.gz.sig
|
|
|
|
Source5: %name.keyring
|
2013-06-07 12:43:36 +02:00
|
|
|
Source1: acct.service
|
2007-01-15 23:50:49 +01:00
|
|
|
Source2: logrotate.acct
|
2014-03-20 08:50:42 +01:00
|
|
|
Source3: accton-create
|
2011-10-02 16:36:31 +02:00
|
|
|
BuildRequires: libtool
|
2014-03-20 08:50:42 +01:00
|
|
|
%if %suse_version >= 1310
|
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
%else
|
2013-06-07 12:43:36 +02:00
|
|
|
BuildRequires: systemd
|
2014-03-20 08:50:42 +01:00
|
|
|
%endif
|
2013-06-07 12:43:36 +02:00
|
|
|
%{?systemd_requires}
|
2013-04-26 12:41:35 +02:00
|
|
|
%if %suse_version >= 1230
|
|
|
|
BuildRequires: makeinfo
|
|
|
|
%endif
|
2013-06-07 12:43:36 +02:00
|
|
|
Requires: logrotate
|
2014-03-20 08:50:42 +01:00
|
|
|
Requires(pre): fileutils
|
|
|
|
Requires(pre): coreutils
|
|
|
|
Requires(preun): fileutils
|
|
|
|
Requires(preun): coreutils
|
|
|
|
Requires(post): %install_info_prereq
|
|
|
|
Requires(post): fileutils
|
|
|
|
Requires(post): coreutils
|
|
|
|
Requires(postun): %install_info_prereq
|
|
|
|
Requires(postun): fileutils
|
|
|
|
Requires(postun): coreutils
|
2014-12-20 16:56:51 +01:00
|
|
|
Patch: %{name}-%{version}-hz.patch
|
2012-01-25 18:07:04 +01:00
|
|
|
Patch2: %{name}-info.patch
|
|
|
|
Patch3: %{name}-ac.patch
|
2014-12-20 16:56:51 +01:00
|
|
|
Url: http://www.gnu.org/software/acct/
|
2007-01-15 23:50:49 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
Summary: User-Specific Process Accounting
|
2012-07-22 21:23:23 +02:00
|
|
|
License: GPL-2.0+
|
|
|
|
Group: System/Base
|
2007-01-15 23:50:49 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
This package contains the programs necessary for user-specific process
|
|
|
|
accounting: sa, accton, and lastcomm.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2012-01-25 18:07:04 +01:00
|
|
|
%patch -p1
|
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
2007-01-15 23:50:49 +01:00
|
|
|
|
|
|
|
%build
|
2012-01-25 18:07:04 +01:00
|
|
|
autoreconf -ivf
|
2014-03-20 08:50:42 +01:00
|
|
|
%configure
|
|
|
|
make %{?_smp_mflags} CC="%{__cc}" CXX="%{__cxx}"
|
2007-01-15 23:50:49 +01:00
|
|
|
|
|
|
|
%install
|
2014-03-20 08:50:42 +01:00
|
|
|
install -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d
|
|
|
|
install -d -m 755 %{buildroot}/%{_unitdir}
|
|
|
|
install -d -m 755 %{buildroot}%{_localstatedir}/account/
|
|
|
|
install -d -m 755 %{buildroot}%{_libexecdir}/account
|
|
|
|
install -d -m 755 %{buildroot}%{_sbindir}
|
|
|
|
install -d -m 755 %{buildroot}%{_bindir}
|
|
|
|
%make_install CC="%{__cc}" CXX="%{__cxx}"
|
|
|
|
install -m 644 %{S:1} %{buildroot}/%{_unitdir}/acct.service
|
|
|
|
install -m 644 %{S:2} %{buildroot}%{_sysconfdir}/logrotate.d/acct
|
|
|
|
> %{buildroot}%{_localstatedir}/account/pacct
|
|
|
|
chmod 600 %{buildroot}%{_localstatedir}/account/pacct
|
|
|
|
cd %{buildroot}/usr/sbin/
|
2013-06-07 12:43:36 +02:00
|
|
|
ln -sf service rcacct
|
2014-03-20 08:50:42 +01:00
|
|
|
rm -f %{buildroot}/usr/bin/last
|
|
|
|
rm -f %{buildroot}/%{_mandir}/man1/last.1*
|
|
|
|
install -m 0755 %{S:3} %{buildroot}%{_libexecdir}/account/create
|
2007-01-15 23:50:49 +01:00
|
|
|
|
2013-06-07 12:43:36 +02:00
|
|
|
%pre
|
|
|
|
%service_add_pre acct.service
|
|
|
|
|
2007-01-15 23:50:49 +01:00
|
|
|
%post
|
2014-03-20 08:50:42 +01:00
|
|
|
echo "Creating %{_localstatedir}/account/pacct"
|
|
|
|
%{_libexecdir}/account/create
|
2007-01-15 23:50:49 +01:00
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/accounting.info.gz
|
2013-06-07 12:43:36 +02:00
|
|
|
%service_add_post acct.service
|
2007-01-15 23:50:49 +01:00
|
|
|
|
|
|
|
%preun
|
2015-05-18 09:49:46 +02:00
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/accounting.info.gz
|
2013-06-07 12:43:36 +02:00
|
|
|
%service_del_preun acct.service
|
2007-01-15 23:50:49 +01:00
|
|
|
|
|
|
|
%postun
|
2013-06-07 12:43:36 +02:00
|
|
|
%service_del_postun acct.service
|
2007-01-15 23:50:49 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%doc README NEWS
|
|
|
|
%doc %{_infodir}/*.info.*
|
|
|
|
%doc %{_mandir}/man1/ac*
|
|
|
|
%doc %{_mandir}/man1/lastcomm*
|
|
|
|
%doc %{_mandir}/man8/*
|
2014-03-20 08:50:42 +01:00
|
|
|
%dir %{_localstatedir}/account
|
|
|
|
%attr(600, root, root) %ghost %{_localstatedir}/account/pacct
|
|
|
|
%config %{_sysconfdir}/logrotate.d/acct
|
|
|
|
%{_bindir}/ac
|
|
|
|
%{_bindir}/lastcomm
|
|
|
|
%{_sbindir}/*
|
2013-06-07 12:43:36 +02:00
|
|
|
%{_unitdir}/acct.service
|
2014-03-20 08:50:42 +01:00
|
|
|
%dir %{_libexecdir}/account
|
|
|
|
%{_libexecdir}/account/create
|
2007-01-15 23:50:49 +01:00
|
|
|
|
2008-10-23 04:26:09 +02:00
|
|
|
%changelog
|