libev.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. ##
  2. ## libev.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package version
  24. %define V_libev 3.45
  25. %define V_perl 3.42
  26. # package information
  27. Name: libev
  28. Summary: Asynchronous Event Notification Library
  29. URL: http://software.schmorp.de/pkg/libev.html
  30. Vendor: Marc Lehmann, Emanuele Giaquinta
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: EVAL
  34. Group: Network
  35. License: MIT-style
  36. Version: %{V_libev}
  37. Release: 20081022
  38. # package options
  39. %option with_perl yes
  40. # list of sources
  41. Source0: http://dist.schmorp.de/libev/libev-%{V_libev}.tar.gz
  42. Source1: http://www.cpan.org/authors/id/M/ML/MLEHMANN/EV-%{V_perl}.tar.gz
  43. Patch0: libev.patch
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20060823
  48. PreReq: OpenPKG, openpkg >= 20060823
  49. %if "%{with_perl}" == "yes"
  50. BuildPreReq: perl, perl-openpkg
  51. PreReq: perl
  52. %endif
  53. AutoReq: no
  54. AutoReqProv: no
  55. %description
  56. Libev is a full-featured and high-performance event loop that is
  57. loosely modelled after (and can emulate) the original libevent.
  58. Features include child/pid watchers and periodic timers based on
  59. wallclock (absolute) time (in addition to timers using relative
  60. timeouts), as well as epoll/kqueue/ports support, fast timer
  61. management, time jump detection and correction, and ease-of-use.
  62. %track
  63. prog libev = {
  64. version = %{version}
  65. url = http://dist.schmorp.de/libev/
  66. regex = libev-(__VER__)\.tar\.gz
  67. }
  68. %prep
  69. %setup -q
  70. %setup -q -D -T -a 1
  71. %patch -p0
  72. %build
  73. CC="%{l_cc}" \
  74. CFLAGS="%{l_cflags -O}" \
  75. CPPFLAGS="%{l_cppflags}" \
  76. LDFLAGS="%{l_ldflags}" \
  77. ./configure \
  78. --prefix=%{l_prefix} \
  79. --includedir=%{l_prefix}/include/ev \
  80. --mandir=%{l_prefix}/man \
  81. --disable-shared
  82. %{l_make} %{l_mflags -O}
  83. %if "%{with_perl}" == "yes"
  84. %{l_prefix}/bin/perl-openpkg prepare
  85. %{l_prefix}/bin/perl-openpkg -d EV-%{V_perl} configure build
  86. %endif
  87. %install
  88. rm -rf $RPM_BUILD_ROOT
  89. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  90. %if "%{with_perl}" == "yes"
  91. %{l_prefix}/bin/perl-openpkg -d EV-%{V_perl} install
  92. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  93. %else
  94. >perl-openpkg-files
  95. %endif
  96. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  97. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  98. %{l_files_std} `cat perl-openpkg-files`
  99. %files -f files
  100. %clean
  101. rm -rf $RPM_BUILD_ROOT