80c5fd9ca114ac49bbf7cdd26e25e2a1f8121164
[packages.git] / libs / libevent / Makefile
1
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libevent
12 PKG_VERSION:=1.1
13 PKG_RELEASE:=1
14
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
19
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libevent
25   SECTION:=libs
26   CATEGORY:=Libraries
27   TITLE:=Event notification library
28   URL:=http://www.monkey.org/~provos/libevent/
29 endef
30
31 define Package/libevent/description
32         The libevent API provides a mechanism to execute a callback function 
33         when a specific event occurs on a file descriptor or after a timeout 
34         has been reached. Furthermore, libevent also support callbacks due 
35         to signals or regular timeouts.
36         
37         libevent is meant to replace the event loop found in event driven 
38         network servers. An application just needs to call event_dispatch() 
39         and then add or remove events dynamically without having to change 
40         the event loop.
41 endef
42
43 CONFIGURE_ARGS += \
44         --enable-shared \
45         --enable-static \
46
47 MAKE_FLAGS += \
48         CFLAGS="$(TARGET_CFLAGS)" \
49         DESTDIR="$(PKG_INSTALL_DIR)" \
50         all install
51
52 define Build/InstallDev
53         mkdir -p $(1)/usr/include
54         $(CP) $(PKG_INSTALL_DIR)/usr/include/event.h $(1)/usr/include/
55         mkdir -p $(1)/usr/lib
56         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent.{a,so} $(1)/usr/lib/
57         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-$(PKG_VERSION).so* $(1)/usr/lib/
58 endef
59
60 define Package/libevent/install
61         $(INSTALL_DIR) $(1)/usr/lib
62         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-$(PKG_VERSION).so.* $(1)/usr/lib/
63 endef
64
65 $(eval $(call BuildPackage,libevent))