2 # Copyright (C) 2011-2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_BUILD_DIR:=$(BUILD_DIR)/libevent-$(PKG_VERSION)-stable
15 PKG_SOURCE:=libevent-$(PKG_VERSION)-stable.tar.gz
16 PKG_SOURCE_URL:=http://www.monkey.org/~provos/ \
18 PKG_MD5SUM:=b2405cc9ebf264aa47ff615d9de527a2
19 PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
25 include $(INCLUDE_DIR)/package.mk
27 define Package/libevent2/Default
30 TITLE:=Event notification
31 URL:=http://www.monkey.org/~provos/libevent/
34 define Package/libevent2/Default/description
35 The libevent API provides a mechanism to execute a callback function
36 when a specific event occurs on a file descriptor or after a timeout
37 has been reached. Furthermore, libevent also support callbacks due
38 to signals or regular timeouts.
40 libevent is meant to replace the event loop found in event driven
41 network servers. An application just needs to call event_dispatch()
42 and then add or remove events dynamically without having to change
46 define Package/libevent2
47 $(call Package/libevent2/Default)
48 TITLE+= library (version 2.0)
51 define Package/libevent2/description
52 $(call Package/libevent2/Default/description)
54 This package contains the libevent shared library historically
55 containing both the core & extra libraries.
58 define Package/libevent2-core
59 $(call Package/libevent2/Default)
60 TITLE+= core library (version 2.0)
63 define Package/libevent2-core/description
64 $(call Package/libevent2/Default/description)
66 This package contains the libevent core shared library for the event,
67 buffer & utility functions.
70 define Package/libevent2-extra
71 $(call Package/libevent2/Default)
72 TITLE+= extra library (version 2.0)
75 define Package/libevent2-extra/description
76 $(call Package/libevent2/Default/description)
78 This package contains the libevent extra shared library for specific
79 protocols including HTTP, DNS & RPC.
82 define Package/libevent2-openssl
83 $(call Package/libevent2/Default)
84 TITLE+= OpenSSL library (version 2.0)
88 define Package/libevent2-openssl/description
89 $(call Package/libevent2/Default/description)
91 This package contains the libevent OpenSSL shared library for encrypted
95 define Package/libevent2-pthreads
96 $(call Package/libevent2/Default)
97 TITLE+= Pthreads library (version 2.0)
101 define Package/libevent2-pthreads/description
102 $(call Package/libevent2/Default/description)
104 This package contains the libevent Pthreads shared library for
108 TARGET_CFLAGS += $(FPIC)
116 CFLAGS="$(TARGET_CFLAGS)"
118 define Build/InstallDev
119 $(INSTALL_DIR) $(1)/usr/include
120 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
121 $(INSTALL_DIR) $(1)/usr/lib
122 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent*.{la,a,so} $(1)/usr/lib/
123 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent*-2.0.so* $(1)/usr/lib/
124 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
125 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libevent*.pc $(1)/usr/lib/pkgconfig/
128 define Package/libevent2/install
129 $(INSTALL_DIR) $(1)/usr/lib
130 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-2.0.so.* $(1)/usr/lib/
133 define Package/libevent2-core/install
134 $(INSTALL_DIR) $(1)/usr/lib
135 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_core-2.0.so.* $(1)/usr/lib/
138 define Package/libevent2-extra/install
139 $(INSTALL_DIR) $(1)/usr/lib
140 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_extra-2.0.so.* $(1)/usr/lib/
143 define Package/libevent2-openssl/install
144 $(INSTALL_DIR) $(1)/usr/lib
145 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_openssl-2.0.so.* $(1)/usr/lib/
148 define Package/libevent2-pthreads/install
149 $(INSTALL_DIR) $(1)/usr/lib
150 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_pthreads-2.0.so.* $(1)/usr/lib/
153 $(eval $(call BuildPackage,libevent2))
154 $(eval $(call BuildPackage,libevent2-core))
155 $(eval $(call BuildPackage,libevent2-extra))
156 $(eval $(call BuildPackage,libevent2-openssl))
157 $(eval $(call BuildPackage,libevent2-pthreads))