Sophie

Sophie

distrib > Mandriva > 7.2 > i586 > media > main-src > by-pkgid > 083390ca294cd17f88bd9add5e79d131 > files > 2

psacct-6.3.2-4mdk.src.rpm

Summary: Utilities for monitoring process activities.
Name: psacct
Version: 6.3.2
Release: 4mdk
Copyright: GPL
Group: Monitoring
Source: ftp://prep.ai.mit.edu/pub/gnu/acct-%version.tar.bz2
Buildroot: /var/tmp/psacct-root
Prereq: /sbin/install-info

%description
The psacct package contains several utilities for monitoring process
activities, including ac, lastcomm, accton and sa.  The ac command
displays statistics about how long users have been logged on.  The
lastcomm command displays information about previous executed commands.
The accton command turns process accounting on or off.  The sa command
summarizes information about previously executed commmands.

Install the psacct package if you'd like to use its utilities for
monitoring process activities on your system.

%prep
%setup -q -n acct-%version

%build
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr \
--mandir=$RPM_BUILD_ROOT/%{_mandir} --infodir=$RPM_BUILD_ROOT/%{_infodir}
sed -e "s/\/\* #undef HAVE_LINUX_ACCT_H \*\//#define HAVE_LINUX_ACCT_H/" config.h > config.h.new
mv -f config.h.new config.h
make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/{sbin,usr,var/log}
make prefix=$RPM_BUILD_ROOT/usr install

# Because of the last command conflicting with the one from SysVinit
mv $RPM_BUILD_ROOT/usr/bin/last $RPM_BUILD_ROOT/usr/bin/last-psacct
mv $RPM_BUILD_ROOT%{_mandir}/man1/last.1 $RPM_BUILD_ROOT%{_mandir}/man1/last-psacct.1

%clean
rm -rf $RPM_BUILD_ROOT

%post
# we need this hack to get rid of an old, incorrect accounting info entry.
if [ $1 = 0 ]; then
  grep -v '* accounting: (psacct)' < /etc/info-dir > /etc/info-dir.new
  mv -f /etc/info-dir.new /etc/info-dir
  /sbin/install-info %{_infodir}/accounting.info.bz2 /usr/info/dir --entry="* accounting: (accounting).            The GNU Process Accounting Suite."
fi

touch /var/log/pacct /var/log/usracct /var/log/savacct

%preun
if [ $1 = 0 ]; then
   /sbin/install-info --delete %{_infodir}/accounting.info.bz2 /usr/info/dir --entry="* accounting: (accounting).            The GNU Process Accounting Suite."
fi
rm -f /var/log/pacct /var/log/usracct /var/log/savacct

%files
%defattr(-,root,root)
/usr/sbin/
/usr/bin/
%{_mandir}/*/*
%{_infodir}/*

%changelog
* Mon Sep 04 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> %version-4mdk
- fix the conflict with SysVinit :
	- Rename the psacct provided 'last' command to 'last-psacct'
	- Rename the psacct provided 'last.1' manpage to 'last-psacct.1'
- Specfile do not specify each binary but directory which contain them

* Tue Aug 29 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> %version-3mdk
- use %{_mandir} & noreplace
- cleanup
- logfile created in %post, removed in %preun

* Thu Apr 13 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> %version-2mdk
- Fix bad tag value.
- usr /usr/sbin not /sbin.

* Tue Mar 21 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> %version-1mdk
- Update to 6.3.2
- User %version in tag.
- Don't run autoconf, just the configure script.
- Removed a not so usefull sleep 2 :-)
- Removed no more needed patch.

* Mon Nov 29 1999 Florent Villard <warly@mandrakesoft.com>
- built in new environment

* Wed May 05 1999 Bernhard Rosenkraenzer <bero@mandrakesoft.com>
- Mandrake adaptions
- handle RPM_OPT_FLAGS

* Mon Apr 05 1999 Preston Brown <pbrown@redhat.com>
- wrap post script with reference count.

* Tue Mar 23 1999 Preston Brown <pbrown@redhat.com>
- install-info sucks.  Still.

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 8)

* Thu Mar 18 1999 Bill Nottingham <notting@redhat.com>
- #define HAVE_LINUX_ACCT_H too, so it works. :)

* Sun Aug 16 1998 Jeff Johnson <jbj@redhat.com>
- accton needs to be accessible to /etc/rc.d/init.d/halt

* Fri May 08 1998 Erik Troan <ewt@redhat.com>
- install-info sucks

* Mon Apr 27 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com>
- updated from 6.2 to 6.3

* Mon Jul 21 1997 Erik Troan <ewt@redhat.com>
- built against glibc