Name: psmisc
Summary:     Utilities for managing processes on your system.
Summary(ja): システムのプロセスを管理するユーティリティ
Version: 22.21
Release: 1%{?_dist_release}

Group: Applications/System
License: GPLv2+
URL: http://sourceforge.net/projects/psmisc

Source: ftp://ftp.sf.net/pub/sourceforge/psmisc/psmisc-%{version}.tar.gz

Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: gettext
BuildRequires: ncurses-devel
BuildRequires: autoconf automake

%description
The psmisc package contains utilities for managing processes on your
system: pstree, killall and fuser.  The pstree command displays a tree
structure of all of the running processes on your system.  The killall
command sends a specified signal (SIGTERM if nothing is specified) to
processes identified by name.  The fuser command identifies the PIDs
of processes that are using specified files or filesystems.

%description -l ja
psmisc パッケージには pstree, killall, fuser といった，システムの
プロセスを管理するユーティリティが収められています．pstree コマンドは
システム上で動作している全プロセスをツリー状に表示します．
killall コマンドは，指定されたシグナル (何も指定しなければ SIGTERM) を
名前で指定したプロセスに送ります．
fuser コマンドは，指定したファイルやファイルシステムを使用している
プロセスの PID を特定します．


%prep
%setup -q

%build
%configure --prefix=%{_prefix}
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
# The rpm makeinstall macro breaks the build, so we do it the old way
make install DESTDIR="$RPM_BUILD_ROOT"
mkdir -p $RPM_BUILD_ROOT%{_syssbindir}
mv $RPM_BUILD_ROOT%{_bindir}/fuser $RPM_BUILD_ROOT%{_syssbindir}

%ifnarch %ix86 x86_64 ppc ppc64
rm -f $RPM_BUILD_ROOT/%{_bindir}/peekfd
rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/peekfd.1*
%endif

%find_lang %name

%clean
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING README
%{_syssbindir}/fuser
%{_bindir}/killall
%{_bindir}/pstree
%{_bindir}/pstree.x11
%{_bindir}/prtstat
%{_mandir}/man1/fuser.1*
%{_mandir}/man1/killall.1*
%{_mandir}/man1/pstree.1*
%{_mandir}/man1/prtstat.1*
%ifarch %ix86 x86_64 ppc ppc64
%{_bindir}/peekfd
%{_mandir}/man1/peekfd.1*
%endif

%changelog
* Fri May 23 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 22.21-1
- update to 22.21

* Sat Apr  9 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 22.13-1
- updated to 22.13
- added Patch1-4 from Fedora
  * Thu Jan 27 2011 Jan Görig <jgorig@redhat.com> 22.13-7
  - fix #671135 - peekfd utility doesn't work on ppc64 architecture
  * Fri Jan 7 2011 Jan Görig <jgorig@redhat.com> 22.13-6
  - fix #666213 - uninitialized memory leading to `killall -g name` failure
  * Tue Nov 16 2010 Jan Görig <jgorig@redhat.com> 22.13-5
  - fix #651794 - incorrect exit code of fuser -m -s
  * Thu Oct 14 2010 Jan Görig <jgorig@redhat.com> 22.13-3
  - fix #642800 - peekfd regression

* Mon Aug 18 2008 Shu KONNO <owa@bg.wakwak.com> 22.6-2
- added psmisc-22.6-types.patch by fedora
- added psmisc-22.6-pstree-overflow.patch by fedora

* Sat Aug 16 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 22.6-1
- new upstream release
- add peekfd to %%files on %%ix86, x86_64, ppc and ppc64

* Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 22.5-2vl5
- applied new versioning policy, spec in utf-8

* Sat Oct 20 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 22.5-2vl1
- based on 22.5-2 from Fedora
- rebuilt with new toolchains

* Sun Jun 15 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 21.2-4vl1
- based on 21.2-4 from Redhat9
- dropped psmisc-17-buildroot.patch and psmisc-19-noroot.patch
- rebuild with new toolchains

* Wed Jan 10 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 19-4vl1
- based on 19-4 from Rawhide
- use better macros (%%{_syssbindir}, %%{_bindir})
- added Japanese summary and description

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Sun Jun 18 2000 Matt Wilson <msw@redhat.com>
- FHS man paths
- patch makefile to enable non-root builds

* Sat Feb  5 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- Deal with compressed man pages

* Sun Nov 21 1999 Bernhard Rosenkraenzer <bero@redhat.com>
- update to v19
- handle RPM_OPT_FLAGS

* Mon Sep 27 1999 Bill Nottingham <notting@redhat.com>
- move fuser to /sbin

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

* Sat Mar 13 1999 Michael Maher <mike@redhat.com>
- updated package

* Fri May 01 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Thu Apr 30 1998 Cristian Gafton <gafton@redhat.com>
- renamed the patch file .patch instead of .spec

* Thu Apr 09 1998 Erik Troan <ewt@redhat.com>
- updated to psmisc version 17
- buildrooted

* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com>
- updated from version 11 to version 16
- spec file cleanups

* Tue Jun 17 1997 Erik Troan <ewt@redhat.com>
- built against glibc
