recipe 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. # Build recipe for htop.
  2. #
  3. # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
  4. # Copyright (c) 2018 Matias Fonzo, <selk@dragora.org>.
  5. #
  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
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  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.
  17. program=htop
  18. version=2.2.0
  19. release=2
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/tools"
  22. tarname=${program}-${version}.tar.gz
  23. # Remote source(s)
  24. fetch=http://hisham.hm/htop/releases/${version}/"$tarname"
  25. description="
  26. This is htop, an interactive process viewer for Unix systems.
  27. Comparison between htop and classic top
  28. * In htop you can scroll the list vertically and horizontally
  29. to see all processes and full command lines.
  30. * In top you are subject to a delay for each unassigned
  31. key you press (especially annoying when multi-key escape
  32. sequences are triggered by accident).
  33. * htop starts faster (top seems to collect data for a while
  34. before displaying anything).
  35. * In htop you don't need to type the process number to
  36. kill a process, in top you do.
  37. * In htop you don't need to type the process number or
  38. the priority value to renice a process, in top you do.
  39. * In htop you can kill multiple processes at once.
  40. * top is older, hence, more tested.
  41. "
  42. homepage=http://hisham.hm/htop/
  43. license=GPLv2+
  44. # Source documentation
  45. docs="AUTHORS COPYING ChangeLog README NEWS"
  46. docsdir="${docdir}/${program}-${version}"
  47. build()
  48. {
  49. set -e
  50. unpack "${tardir}/$tarname"
  51. cd "$srcdir"
  52. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
  53. $configure_args \
  54. --libdir=/usr/lib${libSuffix} \
  55. --mandir=$mandir \
  56. --docdir=$docsdir \
  57. --enable-proc \
  58. --enable-cgroup \
  59. --enable-unicode \
  60. --build="$(cc -dumpmachine)"
  61. make -j${jobs} V=1
  62. make -j${jobs} DESTDIR="$destdir" install
  63. # Compress and link man pages (if needed)
  64. if test -d "${destdir}/$mandir"
  65. then
  66. (
  67. cd "${destdir}/$mandir"
  68. find . -type f -exec lzip -9 '{}' +
  69. find . -type l | while read -r file
  70. do
  71. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  72. rm -- "$file"
  73. done
  74. )
  75. fi
  76. # Copy documentation
  77. mkdir -p "${destdir}${docsdir}"
  78. cp -p $docs "${destdir}${docsdir}/"
  79. }