recipe 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Build recipe for dhcpcd.
  2. #
  3. # Copyright (C) 2017 Mateus P. Rodrigues <mprodrigues@dragora.org>.
  4. #
  5. # This recipe is free software: you have unlimited permission
  6. # to copy, distribute and modify it.
  7. program=dhcpcd
  8. version=7.0.0-rc3
  9. release=1
  10. tarname=${program}-${version}.tar.xz
  11. # Remote source(s)
  12. fetch=https://roy.marples.name/downloads/dhcpcd/$tarname
  13. description="
  14. dhcpcd is a DHCP and DHCPv6 client. It's also an IPv4LL (aka ZeroConf) client.
  15. "
  16. homepage=https://roy.marples.name/projects/dhcpcd
  17. license="2-clause BSD"
  18. # Source documentation
  19. docs="LICENSE README.md"
  20. docsdir="${docdir}/${program}-${version}"
  21. build()
  22. {
  23. set -e
  24. unpack "${tardir}/$tarname"
  25. cd "$srcdir"
  26. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  27. $configure_args \
  28. --libdir=/usr/lib${libSuffix} \
  29. --mandir=$mandir \
  30. --docdir=$docdir \
  31. --build="$(cc -dumpmachine)" \
  32. || true
  33. make -j${jobs} V=1
  34. make -j${jobs} DESTDIR="$destdir" install
  35. # Compress and link man pages (if needed)
  36. if test -d "${destdir}/$mandir"
  37. then
  38. (
  39. cd "${destdir}/$mandir"
  40. find . -type f -exec lzip -9 '{}' +
  41. find . -type l | while read -r file
  42. do
  43. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  44. rm -- "$file"
  45. done
  46. )
  47. fi
  48. # Copy documentation
  49. mkdir -p "${destdir}${docsdir}"
  50. for file in $docs
  51. do
  52. if test -e $file
  53. then
  54. cp -p $file "${destdir}${docsdir}"
  55. fi
  56. done
  57. }