recipe 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # Build recipe for libevent
  2. #
  3. # Copyright 2018 Mateus P. Rodrigues <mprodrigues@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. program=libevent
  17. version=git8483c53-20180914
  18. release=1
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/libs"
  21. tarname=${program}-${version}.tar.lz
  22. pkgname=${program}
  23. # Remote source(s)
  24. fetch="
  25. http://rsync.dragora.org/current/sources/$tarname
  26. http://csphy.blue/dragora/mirror/current/sources/$tarname
  27. "
  28. description="
  29. libevent - an event notification library
  30. The libevent API provides a mechanism to execute a callback function when a
  31. specific event occurs on a file descriptor or after a timeout has been
  32. reached. Furthermore, libevent also support callbacks due to signals or regular
  33. timeouts.
  34. "
  35. homepage=http://libevent.org/
  36. license="3-clause BSD"
  37. # Source documentation
  38. docs="ChangeLog* LICENSE"
  39. docsdir="${docdir}/${program}-${version}"
  40. build()
  41. {
  42. set -e
  43. unpack "${tardir}/$tarname"
  44. cd "$srcdir"
  45. # Set sane permissions
  46. chmod -R u+w,go-w,a+rX-s .
  47. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  48. $configure_args \
  49. --libdir=/usr/lib${libSuffix} \
  50. --infodir=$infodir \
  51. --mandir=$mandir \
  52. --docdir=$docdir \
  53. --build="$(cc -dumpmachine)"
  54. make -j${jobs} V=1
  55. make -j${jobs} DESTDIR="$destdir" install
  56. # Copy documentation
  57. mkdir -p "${destdir}${docsdir}"
  58. cp -p $docs "${destdir}${docsdir}"
  59. }