Makefile 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. #
  2. # Copyright (C) 2011-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libevent2
  9. PKG_VERSION:=2.0.22
  10. PKG_RELEASE:=1
  11. PKG_BUILD_DIR:=$(BUILD_DIR)/libevent-$(PKG_VERSION)-stable
  12. PKG_SOURCE:=libevent-$(PKG_VERSION)-stable.tar.gz
  13. PKG_SOURCE_URL:=@SF/levent
  14. PKG_MD5SUM:=c4c56f986aa985677ca1db89630a2e11
  15. PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
  16. PKG_LICENSE:=BSD-3-Clause
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/libevent2/Default
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=Event notification
  25. URL:=http://www.monkey.org/~provos/libevent/
  26. endef
  27. define Package/libevent2/Default/description
  28. The libevent API provides a mechanism to execute a callback function
  29. when a specific event occurs on a file descriptor or after a timeout
  30. has been reached. Furthermore, libevent also support callbacks due
  31. to signals or regular timeouts.
  32. libevent is meant to replace the event loop found in event driven
  33. network servers. An application just needs to call event_dispatch()
  34. and then add or remove events dynamically without having to change
  35. the event loop.
  36. endef
  37. define Package/libevent2
  38. $(call Package/libevent2/Default)
  39. TITLE+= library (version 2.0)
  40. endef
  41. define Package/libevent2/description
  42. $(call Package/libevent2/Default/description)
  43. This package contains the libevent shared library historically
  44. containing both the core & extra libraries.
  45. endef
  46. define Package/libevent2-core
  47. $(call Package/libevent2/Default)
  48. TITLE+= core library (version 2.0)
  49. endef
  50. define Package/libevent2-core/description
  51. $(call Package/libevent2/Default/description)
  52. This package contains the libevent core shared library for the event,
  53. buffer & utility functions.
  54. endef
  55. define Package/libevent2-extra
  56. $(call Package/libevent2/Default)
  57. TITLE+= extra library (version 2.0)
  58. endef
  59. define Package/libevent2-extra/description
  60. $(call Package/libevent2/Default/description)
  61. This package contains the libevent extra shared library for specific
  62. protocols including HTTP, DNS & RPC.
  63. endef
  64. define Package/libevent2-openssl
  65. $(call Package/libevent2/Default)
  66. TITLE+= OpenSSL library (version 2.0)
  67. DEPENDS+=+libopenssl
  68. endef
  69. define Package/libevent2-openssl/description
  70. $(call Package/libevent2/Default/description)
  71. This package contains the libevent OpenSSL shared library for encrypted
  72. bufferevents.
  73. endef
  74. define Package/libevent2-pthreads
  75. $(call Package/libevent2/Default)
  76. TITLE+= Pthreads library (version 2.0)
  77. DEPENDS+=+libpthread
  78. endef
  79. define Package/libevent2-pthreads/description
  80. $(call Package/libevent2/Default/description)
  81. This package contains the libevent Pthreads shared library for
  82. threading & locking.
  83. endef
  84. TARGET_CFLAGS += $(FPIC)
  85. CONFIGURE_ARGS += \
  86. --enable-shared \
  87. --enable-static \
  88. --disable-debug-mode
  89. MAKE_FLAGS += \
  90. CFLAGS="$(TARGET_CFLAGS)"
  91. define Build/InstallDev
  92. $(INSTALL_DIR) $(1)/usr/include
  93. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  94. $(INSTALL_DIR) $(1)/usr/lib
  95. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent*.{la,a,so} $(1)/usr/lib/
  96. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent*-2.0.so* $(1)/usr/lib/
  97. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  98. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libevent*.pc $(1)/usr/lib/pkgconfig/
  99. endef
  100. define Package/libevent2/install
  101. $(INSTALL_DIR) $(1)/usr/lib
  102. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-2.0.so.* $(1)/usr/lib/
  103. endef
  104. define Package/libevent2-core/install
  105. $(INSTALL_DIR) $(1)/usr/lib
  106. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_core-2.0.so.* $(1)/usr/lib/
  107. endef
  108. define Package/libevent2-extra/install
  109. $(INSTALL_DIR) $(1)/usr/lib
  110. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_extra-2.0.so.* $(1)/usr/lib/
  111. endef
  112. define Package/libevent2-openssl/install
  113. $(INSTALL_DIR) $(1)/usr/lib
  114. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_openssl-2.0.so.* $(1)/usr/lib/
  115. endef
  116. define Package/libevent2-pthreads/install
  117. $(INSTALL_DIR) $(1)/usr/lib
  118. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_pthreads-2.0.so.* $(1)/usr/lib/
  119. endef
  120. $(eval $(call BuildPackage,libevent2))
  121. $(eval $(call BuildPackage,libevent2-core))
  122. $(eval $(call BuildPackage,libevent2-extra))
  123. $(eval $(call BuildPackage,libevent2-openssl))
  124. $(eval $(call BuildPackage,libevent2-pthreads))