fc42fe5e21be5f01f14e532c5b417f7d94d1d396
[openwrt/svn-archive/archive.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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libevent
11 PKG_VERSION:=1.4.4
12 PKG_RELEASE:=1
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-stable
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-stable.tar.gz
16 PKG_SOURCE_URL:=http://www.monkey.org/~provos/
17 PKG_MD5SUM:=5d7591aa6301f06315b52bade472bf2f
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libevent
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=Event notification library
25 URL:=http://www.monkey.org/~provos/libevent/
26 endef
27
28 define Package/libevent/description
29 The libevent API provides a mechanism to execute a callback function
30 when a specific event occurs on a file descriptor or after a timeout
31 has been reached. Furthermore, libevent also support callbacks due
32 to signals or regular timeouts.
33
34 libevent is meant to replace the event loop found in event driven
35 network servers. An application just needs to call event_dispatch()
36 and then add or remove events dynamically without having to change
37 the event loop.
38 endef
39
40 TARGET_CFLAGS += $(FPIC)
41
42 CONFIGURE_ARGS += \
43 --enable-shared \
44 --enable-static \
45
46 MAKE_FLAGS += \
47 CFLAGS="$(TARGET_CFLAGS)" \
48 DESTDIR="$(PKG_INSTALL_DIR)" \
49 all install
50
51 define Build/InstallDev
52 mkdir -p $(1)/usr/include
53 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
54 mkdir -p $(1)/usr/lib
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent.{a,so} $(1)/usr/lib/
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-1.4.so* $(1)/usr/lib/
57 endef
58
59 define Package/libevent/install
60 $(INSTALL_DIR) $(1)/usr/lib
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-1.4.so.* $(1)/usr/lib/
62 endef
63
64 $(eval $(call BuildPackage,libevent))