You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
3.9 KiB

##
## top.spec -- OpenPKG RPM Specification
## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
## the above copyright notice and this permission notice appear in all
## copies.
##
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
## SUCH DAMAGE.
##
# package version
%define V_dist 3.5beta12.10
%define V_opkg 3.5b12.10
# package information
Name: top
Summary: Full-Screen Process Display
URL: http://www.spang.uk.eu.org/top/
Vendor: William LeFebvre
Packager: The OpenPKG Project
Distribution: OpenPKG [EVAL]
Group: System
License: Freely Redistributable
Version: %{V_opkg}
Release: 20031218
# list of sources
Source0: http://www.spang.uk.eu.org/top/top-%{V_dist}.tar.gz
Patch0: top.patch
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20030927
PreReq: OpenPKG, openpkg >= 20030927
AutoReq: no
AutoReqProv: no
%description
Top is a full-screen display of the currently running system
processes.
%prep
%setup -q -n top-%{V_dist}
%patch -p0
%build
# configure program
case "%{l_platform -t}" in
*-freebsd[45]* ) module="freebsd4" ;;
*-linux2* ) module="linux" ;;
*-sunos5* ) module="sunos57" ;;
* ) echo "platform \"%{l_platform -t}\" not supported" 1>&2; exit 1 ;;
esac
cdefs="%{l_cflags -O}"
if [ ".$module" = .linux ]; then
if [ -f /usr/include/linux/tasks.h ]; then
cdefs="$cdefs -DHAVE_LINUX_TASKS_H"
fi
fi
( echo "set module = '$module'"
echo "set LoadMax = '4.0'"
echo "set topn = '-1'"
echo "set NominalTopn = '100'"
echo "set delay = '4'"
echo "set owner = '-'"
echo "set group = '-'"
echo "set mode = '-'"
echo "set random = '1'"
echo "set TableSize = '53'"
echo "set bindir = '%{l_prefix}/bin'"
echo "set mandir = '%{l_prefix}/man/man1'"
echo "set manext = '1'"
echo "set mansty = 'man'"
echo "set Cmdshell = '/bin/sh'"
echo "set Cmdcc = '%{l_cc}'"
echo "set Cmdawk = 'awk'"
echo "set Cmdinstall = './install'"
echo "set cdefs = '$cdefs'"
echo "set ColourDef = 'yes'"
) >.defaults
./Configure </dev/null
# build program
%{l_make} %{l_mflags}
%install
rm -rf $RPM_BUILD_ROOT
# install program
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/bin \
$RPM_BUILD_ROOT%{l_prefix}/man/man1
%{l_shtool} install -c -s -m 755 \
top $RPM_BUILD_ROOT%{l_prefix}/bin/
%{l_shtool} install -c -m 644 \
top.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
# determine installation files
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
%{l_files_std} \
'%attr(4711,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/top'
%files -f files
%clean
rm -rf $RPM_BUILD_ROOT