2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://www.monkey.org/~provos/
18 PKG_MD5SUM:=a5bd281aeb41bdaa48fbbf0495423d20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23 include $(INCLUDE_DIR)/package.mk
25 define Package/libevent
28 TITLE:=Event notification library
30 The libevent API provides a mechanism to execute a callback function \\\
31 when a specific event occurs on a file descriptor or after a timeout \\\
32 has been reached. Furthermore, libevent also support callbacks due \\\
33 to signals or regular timeouts.\\\
35 libevent is meant to replace the event loop found in event driven \\\
36 network servers. An application just needs to call event_dispatch() \\\
37 and then add or remove events dynamically without having to change \\\
39 URL:=http://www.monkey.org/~provos/libevent/
47 CFLAGS="$(TARGET_CFLAGS)" \
48 DESTDIR="$(PKG_INSTALL_DIR)" \
51 define Build/InstallDev
52 mkdir -p $(1)/usr/include
53 $(CP) $(PKG_INSTALL_DIR)/usr/include/event.h $(1)/usr/include/
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent.{a,so} $(1)/usr/lib/
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-$(PKG_VERSION).so* $(1)/usr/lib/
59 define Build/UninstallDev
61 $(STAGING_DIR)/usr/include/event.h \
62 $(STAGING_DIR)/usr/lib/libevent.{a,so} \
63 $(STAGING_DIR)/usr/lib/libevent-$(PKG_VERSION).so*
66 define Package/libevent/install
67 $(INSTALL_DIR) $(1)/usr/lib
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-$(PKG_VERSION).so.* $(1)/usr/lib/
71 $(eval $(call BuildPackage,libevent))