recipe 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. # Build recipe for htop.
  2. #
  3. # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
  4. # Copyright (c) 2018, 2020, 2021 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. # Exit immediately on any error
  18. set -e
  19. program=htop
  20. version=3.0.5
  21. release=1
  22. # Define a category for the output of the package name
  23. pkgcategory=tools
  24. tarname=${program}-${version}.tar.gz
  25. # Remote source(s)
  26. fetch=https://dl.bintray.com/htop/source/$tarname
  27. description="
  28. An interactive process viewer for Unix systems.
  29. Comparison between htop and classic top
  30. * In htop you can scroll the list vertically and horizontally
  31. to see all processes and full command lines.
  32. * In top you are subject to a delay for each unassigned
  33. key you press (especially annoying when multi-key escape
  34. sequences are triggered by accident).
  35. * htop starts faster (top seems to collect data for a while
  36. before displaying anything).
  37. * In htop you don't need to type the process number to
  38. kill a process, in top you do.
  39. * In htop you don't need to type the process number or
  40. the priority value to renice a process, in top you do.
  41. * In htop you can kill multiple processes at once.
  42. * top is older, hence, more tested.
  43. "
  44. homepage=https://hisham.hm/htop/
  45. license=GPLv2+
  46. # Source documentation
  47. docs="AUTHORS COPYING ChangeLog README NEWS"
  48. docsdir="${docdir}/${program}-${version}"
  49. build()
  50. {
  51. unpack "${tardir}/$tarname"
  52. cd "$srcdir"
  53. ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
  54. $configure_args \
  55. --libdir=/usr/lib${libSuffix} \
  56. --mandir=$mandir \
  57. --docdir=$docsdir \
  58. --enable-unicode \
  59. --with-sensors \
  60. --build="$(gcc -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. }