You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.8 KiB

  1. #
  2. # Copyright (C) 2006-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:=libevent
  9. PKG_VERSION:=1.4.15
  10. PKG_RELEASE:=1
  11. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION)-stable
  12. PKG_SOURCE:=release-$(PKG_VERSION)-stable.tar.gz
  13. PKG_SOURCE_URL:=https://github.com/libevent/libevent/archive/
  14. PKG_HASH:=e9a32238a98954081d7ed9918d8f799eb4c743fd570749c0721585140dd5de21
  15. PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
  16. PKG_FIXUP:=autoreconf
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/libevent
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. TITLE:=Event notification library (legacy)
  24. DEPENDS:=+librt
  25. URL:=http://www.libevent.org
  26. endef
  27. define Package/libevent/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. TARGET_CFLAGS += $(FPIC)
  38. CONFIGURE_ARGS += \
  39. --enable-shared \
  40. --enable-static \
  41. MAKE_FLAGS += \
  42. CFLAGS="$(TARGET_CFLAGS)" \
  43. define Build/InstallDev
  44. $(INSTALL_DIR) $(1)/usr/include/libevent
  45. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/libevent/
  46. $(INSTALL_DIR) $(1)/usr/lib/libevent
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{a,so} $(1)/usr/lib/libevent/
  48. endef
  49. define Package/libevent/install
  50. $(INSTALL_DIR) $(1)/usr/lib
  51. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
  52. endef
  53. $(eval $(call BuildPackage,libevent))