psmisc/psmisc.spec
Dr. Werner Fink b5c707f0db Accepting request 33901 from home:oertel:branches:Base:System
Copy from home:oertel:branches:Base:System/psmisc via accept of submit request 33901 revision 2.
Request was accepted with message:

OBS-URL: https://build.opensuse.org/request/show/33901
OBS-URL: https://build.opensuse.org/package/show/Base:System/psmisc?expand=0&rev=17
2010-03-04 08:50:51 +00:00

113 lines
3.3 KiB
RPMSpec

#
# spec file for package psmisc (Version 22.7)
#
# Copyright (c) 2010 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/
#
# norootforbuild
Name: psmisc
BuildRequires: gcc-c++ glibc-devel ncurses-devel
BuildRequires: libselinux-devel
Url: http://switch.dl.sourceforge.net/sourceforge/psmisc/
License: GPLv2+
Group: System/Monitoring
PreReq: %fillup_prereq %insserv_prereq
AutoReqProv: on
Version: 22.7
Release: 8
Provides: ps:/usr/bin/killall
Summary: Utilities for managing processes on your system
Source: http://switch.dl.sourceforge.net/sourceforge/psmisc/psmisc-%{version}.tar.bz2
Patch0: %name-22.7.dif
Patch1: %name-22.7-pstree.patch
Patch2: %name-22.7-nfs4fuser.patch
Patch3: %name-22.6-netunix.patch
Patch4: %name-22.7-writeonly.patch
Patch5: %name-22.6-fdleak.patch
Patch6: %name-22.6-tigetstr.patch
Patch7: %name-22.7-memleaks.patch
Patch8: %name-22.8-to-22.7-backport.patch
Patch9: psmisc-22.7-pstree_overflow.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define nopeek s390 s390x ia64 %arm %sparc
%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.
Authors:
--------
Werner Almesberger
%prep
%setup -q
%patch1 -p0 -b .pstree
%patch2 -p0 -b .nfs4fuser
%patch3 -p0 -b .netunix
%patch4 -p0 -b .wrtonly
%patch5 -p0 -b .fdleak
%patch6 -p0 -b .tigetstr
%patch7 -p0 -b .memleaks
%patch0 -p0
%patch8 -p0
%patch9 -p0
%build
autoreconf -fi
CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 ${RPM_OPT_FLAGS} -pipe"
CXXFLAGS="$CFLAGS"
CC=gcc
CXX=g++
export CFLAGS CXXFLAGS CC CXX
sh ./configure --prefix=%{_prefix} --mandir=%{_mandir} --enable-selinux
make %{?jobs:-j%jobs} CFLAGS="$CFLAGS" "CC=$CC"
%install
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT/bin/
mv $RPM_BUILD_ROOT/usr/bin/fuser $RPM_BUILD_ROOT/bin/
%ifarch %nopeek
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/peekfd.1*
%endif
%find_lang psmisc
%clean
rm -rf $RPM_BUILD_ROOT
%files -f psmisc.lang
%defattr (-,root,root,755)
/bin/fuser
%{_bindir}/killall
%ifnarch %nopeek
%{_bindir}/peekfd
%endif
%{_bindir}/pstree
%{_bindir}/pstree.x11
%{_mandir}/man1/fuser.1*
%{_mandir}/man1/killall.1*
%ifnarch %nopeek
%{_mandir}/man1/peekfd.1*
%endif
%{_mandir}/man1/pstree.1*
%changelog