libevent.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. ##
  2. ## libevent.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package version
  25. %define V_libevent 1.3d
  26. %define V_libeventxx 0.7
  27. # package information
  28. Name: libevent
  29. Summary: Asynchronous Event Notification Library
  30. URL: http://monkey.org/~provos/libevent/
  31. Vendor: Niels Provos
  32. Packager: OpenPKG Foundation e.V.
  33. Distribution: OpenPKG Community
  34. Class: PLUS
  35. Group: Network
  36. License: BSD
  37. Version: %{V_libevent}
  38. Release: 20070827
  39. # list of sources
  40. Source0: http://monkey.org/~provos/libevent-%{V_libevent}.tar.gz
  41. Source1: http://www.llucax.com.ar/~luca/eventxx/releases/eventxx-%{V_libeventxx}.tar.gz
  42. Patch0: libevent.patch
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make
  47. PreReq: OpenPKG, openpkg >= 20040130
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. The libevent API provides a mechanism to execute a callback function
  52. when a specific event occurs on a file descriptor or after a timeout
  53. has been reached.
  54. %track
  55. prog libevent = {
  56. version = %{V_libevent}
  57. url = http://monkey.org/~provos/libevent/
  58. regex = libevent-(__VER__)\.tar\.gz
  59. }
  60. prog libevent:libeventxx = {
  61. version = %{V_libeventxx}
  62. url = http://www.llucax.com.ar/~luca/eventxx/releases/
  63. regex = eventxx-(__VER__)\.tar\.gz
  64. }
  65. %prep
  66. %setup -q
  67. %setup -q -T -D -a 1
  68. %patch -p0
  69. %build
  70. %{l_shtool} subst \
  71. -e 's;\(ACLOCAL\)=.*;\1=true;' \
  72. -e 's;\(AUTOCONF\)=.*;\1=true;' \
  73. -e 's;\(AUTOMAKE\)=.*;\1=true;' \
  74. -e 's;\(AUTOHEADER\)=.*;\1=true;' \
  75. -e 's;\(MAKEINFO\)=.*;\1=true;' \
  76. -e 's;\(AMTAR\)=.*;\1=true;' \
  77. configure
  78. CC="%{l_cc}" \
  79. CFLAGS="%{l_cflags} -g" \
  80. CPPFLAGS="%{l_cppflags}" \
  81. LDFLAGS="%{l_ldflags}" \
  82. ./configure \
  83. --prefix=%{l_prefix} \
  84. --mandir=%{l_prefix}/man \
  85. --disable-shared
  86. %{l_make} %{l_mflags -O} SUBDIRS=.
  87. %install
  88. rm -rf $RPM_BUILD_ROOT
  89. %{l_shtool} mkdir -p $RPM_BUILD_ROOT%{l_prefix}/man/man3
  90. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT SUBDIRS=.
  91. %{l_shtool} install -c -m 644 eventxx-*/eventxx $RPM_BUILD_ROOT%{l_prefix}/include/
  92. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/event_rpcgen.py
  93. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  94. %files -f files
  95. %clean
  96. rm -rf $RPM_BUILD_ROOT