recipe 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Build recipe for tree.
  2. #
  3. # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
  4. # Copyright (c) 2018, 2021-2022 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=tree
  20. version=2.0.1
  21. release=1
  22. # Define a category for the output of the package name
  23. pkgcategory=tools
  24. tarname=${program}-${version}.tgz
  25. # Remote source(s)
  26. fetch=http://mama.indstate.edu/users/ice/tree/src/"$tarname"
  27. description="
  28. Tree is a recursive directory listing command.
  29. Tree produces a depth indented listing of files, which is colorized
  30. ala dircolors if the LS_COLORS environment variable is set and output
  31. is to tty. Tree has been ported and reported to work under the
  32. following operating systems: Linux, FreeBSD, OS X, Solaris,
  33. HP/UX, Cygwin, HP Nonstop and OS/2.
  34. "
  35. homepage=https://mama.indstate.edu/users/ice/tree/
  36. license=GPLv2+
  37. # Source documentation
  38. docs="CHANGES LICENSE README TODO"
  39. docsdir="${docdir}/${program}-${version}"
  40. build()
  41. {
  42. unpack "${tardir}/$tarname"
  43. cd "$srcdir"
  44. make -j${jobs} \
  45. CPPFLAGS="$QICPPFLAGS" \
  46. CFLAGS="$QICFLAGS -O3 -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" \
  47. LDFLAGS="$QILDFLAGS -static" \
  48. PREFIX="${destdir}/usr" \
  49. MANDIR="${destdir}/${mandir}" install
  50. lzip -9 "${destdir}/${mandir}/man1/tree.1"
  51. # Copy documentation
  52. mkdir -p "${destdir}/$docsdir"
  53. cp -p $docs "${destdir}/$docsdir"
  54. }