recipe 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Build recipe for pm-utils.
  2. #
  3. # Copyright (C) 2019 Kevin "The Nuclear" Bloom, <nuclearkev@dragora.org>
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. #
  17. # Based on recipes written by Mateus P. Rodrigues, <mprodrigues@dragora.org>
  18. # and Matias Fonzo, <selk@dragora.org>.
  19. program=pm-utils
  20. version=1.4.1
  21. release=1
  22. tarname=${version}.tar.gz
  23. srcdir=${program}-${version}
  24. # Remote source(s)
  25. # fetch=http://pm-utils.freedesktop.org/releases/$tarname
  26. description="
  27. pm-utils - power utilities
  28. pm-utils provides simple shell command line tools to suspend and
  29. hibernate compute that can be used to run vendor, distribution, or
  30. user supplied scripts on suspend and resume
  31. "
  32. homepage=http://pm-utils.freedesktop.org/
  33. license="GPLv2+"
  34. # Source documentation
  35. docs="AUTHORS COPYING ChangeLog NEWS INSTALL README* TODO"
  36. docsdir="${docdir}/${program}-${version}"
  37. build()
  38. {
  39. set -e
  40. unpack "${tardir}/$tarname"
  41. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  42. $configure_args \
  43. --libdir=/usr/lib${libSuffix} \
  44. --infodir=$infodir \
  45. --mandir=$mandir \
  46. --docdir=$docdir \
  47. --build="$(cc -dumpmachine)"
  48. make -j${jobs} V=1
  49. make -j${jobs} DESTDIR="$destdir" install
  50. # Delete index file for the package
  51. if test -d "${destdir}/$infodir"
  52. then
  53. rm -f "${destdir}/${infodir}/dir"
  54. fi
  55. # Copy documentation
  56. mkdir -p "${destdir}${docsdir}"
  57. for file in $docs
  58. do
  59. if test -e $file
  60. then
  61. cp -p $file "${destdir}${docsdir}"
  62. fi
  63. done
  64. }