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
|
|
|
#
|
2013-01-12 08:32:23 +01:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products 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
|
2013-10-19 17:38:21 +02:00
|
|
|
PreReq: fileutils %install_info_prereq
|
2013-12-23 13:06:02 +01:00
|
|
|
Version: 6.6.1
|
2012-07-22 21:23:23 +02:00
|
|
|
Release: 0
|
2012-01-25 18:07:04 +01:00
|
|
|
Source: %{name}-%{version}.tar.gz
|
2013-06-07 12:43:36 +02:00
|
|
|
Source1: acct.service
|
2007-01-15 23:50:49 +01:00
|
|
|
Source2: logrotate.acct
|
2013-12-23 13:06:02 +01:00
|
|
|
Source10: %{name}-%{version}.tar.gz.sig
|
|
|
|
Source11: %{name}.keyring
|
|
|
|
BuildRequires: gpg-offline
|
2011-10-02 16:36:31 +02:00
|
|
|
BuildRequires: libtool
|
2013-06-07 12:43:36 +02:00
|
|
|
BuildRequires: systemd
|
|
|
|
%{?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
|
2012-01-25 18:07:04 +01:00
|
|
|
Patch: %{name}-hz.patch
|
|
|
|
Patch2: %{name}-info.patch
|
|
|
|
Patch3: %{name}-ac.patch
|
2008-10-23 04:26:09 +02:00
|
|
|
Url: http://www.gnu.org/directory/acct.html
|
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
|
2013-12-23 13:06:02 +01:00
|
|
|
%gpg_verify %{SOURCE10}
|
2007-01-15 23:50:49 +01:00
|
|
|
%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
|
|
|
|
%define prefix /usr
|
|
|
|
%define sysconfdir /etc
|
2012-01-25 18:07:04 +01:00
|
|
|
autoreconf -ivf
|
2007-01-15 23:50:49 +01:00
|
|
|
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure \
|
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--prefix=%{prefix} \
|
|
|
|
--infodir=%{_infodir} \
|
|
|
|
--sysconfdir=%{sysconfdir}
|
2011-10-04 11:25:56 +02:00
|
|
|
make %{?_smp_mflags} CC="%{__cc}" CXX="%{__cxx}"
|
2007-01-15 23:50:49 +01:00
|
|
|
|
|
|
|
%install
|
2011-10-04 11:25:56 +02:00
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install CC="%{__cc}" CXX="%{__cxx}"
|
2013-06-07 12:43:36 +02:00
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/etc/logrotate.d
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/%{_unitdir}
|
|
|
|
install -m 644 %{S:1} $RPM_BUILD_ROOT/%{_unitdir}/acct.service
|
2009-12-26 11:44:55 +01:00
|
|
|
install -m 644 %{S:2} $RPM_BUILD_ROOT/etc/logrotate.d/acct
|
2007-01-15 23:50:49 +01:00
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/var/account/
|
|
|
|
touch $RPM_BUILD_ROOT/var/account/pacct
|
|
|
|
chmod 600 $RPM_BUILD_ROOT/var/account/pacct
|
|
|
|
cd $RPM_BUILD_ROOT/usr/sbin/
|
2013-06-07 12:43:36 +02:00
|
|
|
ln -sf service rcacct
|
2007-01-15 23:50:49 +01:00
|
|
|
rm -f $RPM_BUILD_ROOT/usr/bin/last
|
|
|
|
rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/last.1*
|
|
|
|
|
2013-06-07 12:43:36 +02:00
|
|
|
%pre
|
|
|
|
%service_add_pre acct.service
|
|
|
|
|
2007-01-15 23:50:49 +01:00
|
|
|
%post
|
|
|
|
echo "Creating /var/account/pacct"
|
|
|
|
touch var/account/pacct
|
|
|
|
chmod 600 var/account/pacct
|
|
|
|
%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
|
2013-06-07 12:43:36 +02:00
|
|
|
%service_del_preun acct.service
|
2007-01-15 23:50:49 +01:00
|
|
|
|
|
|
|
%postun
|
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/accounting.info.gz
|
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/*
|
|
|
|
%dir /var/account
|
|
|
|
%attr(600, root, root) %ghost /var/account/pacct
|
|
|
|
%config /etc/logrotate.d/acct
|
|
|
|
/usr/bin/ac
|
|
|
|
/usr/bin/lastcomm
|
|
|
|
/usr/sbin/*
|
2013-06-07 12:43:36 +02:00
|
|
|
%{_unitdir}/acct.service
|
2007-01-15 23:50:49 +01:00
|
|
|
|
2008-10-23 04:26:09 +02:00
|
|
|
%changelog
|