SHA256
1
0
forked from pool/acct
acct/acct.spec
Cristian Rodríguez 07a4cd0789 Accepting request 101489 from home:bvassche:branches:Base:System
- switch from acct-6.3.5 to acct-6.5.5. From the upstream acct ChangeLog:
	* sa.c - Fix hzval.
	* ac.8 - Rename to sa.1
	* FreeBSD / kFreeBSD >= 7.0-STABLE patch.
	* Fix potential buffer-overflows.
	* UNIX 98 pty support.
	* sa.c - correct --help.
	* accounting.texi - grammar fix.
	* Fixed includes for BSDen. Removed last K & R remainings.
	  Bump version to 6.5.4.
	* Minor fixes, included getop, mktime, rename & xmalloc
	  from gnulib. Fixed HOST_LEN not defined issue.
	* Major overhaul, releasing GNU Acct 6.5.
	* NEWS: document changes in the upcoming 6.4 release.
	* accounting.texi: clarify sa sum line.
	* accounting.info: regenerated.
	* Makefile.am: reflect earlier ToDo -> TODO change.
	* config.guess: added.
	* config.sub: added.
	* depcomp: added.
	* texinfo.tex: added.
	* INSTALL: regenerated.
	* Makefile.in: regenerated.
	* aclocal.m4: regenerated.
	* ansi2knr.c: regenerated.
	* config.h.in: regenerated.
	* configure: regenerated.
	* install-sh: regenerated.
	* mdate-sh: regenerated.

OBS-URL: https://build.opensuse.org/request/show/101489
OBS-URL: https://build.opensuse.org/package/show/Base:System/acct?expand=0&rev=17
2012-01-25 17:07:04 +00:00

105 lines
3.1 KiB
RPMSpec

#
# spec file for package acct
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: acct
License: GPL-2.0+
Group: System/Base
PreReq: %insserv_prereq %fillup_prereq fileutils %install_info_prereq
Version: 6.5.5
Release: 830
Source: %{name}-%{version}.tar.gz
Source1: rc.acct
Source2: logrotate.acct
BuildRequires: libtool
Patch: %{name}-hz.patch
Patch1: %{name}-axp.patch
Patch2: %{name}-info.patch
Patch3: %{name}-ac.patch
Url: http://www.gnu.org/directory/acct.html
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: User-Specific Process Accounting
%description
This package contains the programs necessary for user-specific process
accounting: sa, accton, and lastcomm.
%prep
%setup -q
%patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%define prefix /usr
%define sysconfdir /etc
%{suse_update_config}
autoreconf -ivf
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure \
--mandir=%{_mandir} \
--prefix=%{prefix} \
--infodir=%{_infodir} \
--sysconfdir=%{sysconfdir}
make %{?_smp_mflags} CC="%{__cc}" CXX="%{__cxx}"
%install
make DESTDIR=$RPM_BUILD_ROOT install CC="%{__cc}" CXX="%{__cxx}"
install -d -m 755 $RPM_BUILD_ROOT/etc/{init.d,logrotate.d}
install -m 755 %{S:1} $RPM_BUILD_ROOT/etc/init.d/acct
install -m 644 %{S:2} $RPM_BUILD_ROOT/etc/logrotate.d/acct
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/
ln -sf ../../etc/init.d/acct rcacct
rm -f $RPM_BUILD_ROOT/usr/bin/last
rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/last.1*
%post
%{fillup_and_insserv acct}
echo "Creating /var/account/pacct"
touch var/account/pacct
chmod 600 var/account/pacct
%install_info --info-dir=%{_infodir} %{_infodir}/accounting.info.gz
%preun
%stop_on_removal acct
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/accounting.info.gz
%restart_on_update acct
%{insserv_cleanup}
%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
%config /etc/init.d/acct
/usr/bin/ac
/usr/bin/lastcomm
/usr/sbin/*
%changelog