1 # Build recipe for htop.
3 # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
4 # Copyright (c) 2018, 2020, 2021-2022 Matias Fonzo, <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # Exit immediately on any error
25 # Define a category for the output of the package name
28 tarname=${program}-${version}.tar.xz
32 https://github.com/htop-dev/htop/releases/download/${version}/$tarname
33 https://dl.bintray.com/htop/source/$tarname
37 An interactive process viewer for Unix systems.
39 Comparison between htop and classic top
40 * In htop you can scroll the list vertically and horizontally
41 to see all processes and full command lines.
42 * In top you are subject to a delay for each unassigned
43 key you press (especially annoying when multi-key escape
44 sequences are triggered by accident).
45 * htop starts faster (top seems to collect data for a while
46 before displaying anything).
47 * In htop you don't need to type the process number to
48 kill a process, in top you do.
49 * In htop you don't need to type the process number or
50 the priority value to renice a process, in top you do.
51 * In htop you can kill multiple processes at once.
52 * top is older, hence, more tested.
55 homepage=https://hisham.hm/htop/
58 # Source documentation
59 docs="AUTHORS COPYING ChangeLog README NEWS"
60 docsdir="${docdir}/${program}-${version}"
64 unpack "${tardir}/$tarname"
68 ./configure CPPFLAGS="$QICPPFLAGS" \
69 CFLAGS="$QICFLAGS -O3" LDFLAGS="$QILDFLAGS -static" \
71 --libdir=/usr/lib${libSuffix} \
76 --build="$(gcc -dumpmachine)"
79 make -j${jobs} DESTDIR="$destdir" install
81 # Compress and link man pages (if needed)
82 if test -d "${destdir}/$mandir"
85 cd "${destdir}/$mandir"
86 find . -type f -exec lzip -9 {} +
87 find . -type l | while read -r file
89 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
96 mkdir -p "${destdir}/$docsdir"
97 cp -p $docs "${destdir}/$docsdir"