source: packages/libs/libevent2/Makefile @ 29487

Last change on this file since 29487 was 29487, checked in by swalker, 4 years ago

[packages] libevent2: update to 2.0.16

File size: 4.2 KB
Line 
1#
2# Copyright (C) 2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=libevent2
11PKG_VERSION:=2.0.16
12PKG_RELEASE:=1
13
14PKG_BUILD_DIR:=$(BUILD_DIR)/libevent-$(PKG_VERSION)-stable
15PKG_SOURCE:=libevent-$(PKG_VERSION)-stable.tar.gz
16PKG_SOURCE_URL:=http://www.monkey.org/~provos/ \
17        @SF/levent
18PKG_MD5SUM:=899efcffccdb3d5111419df76e7dc8df
19
20PKG_FIXUP:=libtool
21PKG_INSTALL:=1
22PKG_BUILD_PARALLEL:=1
23
24include $(INCLUDE_DIR)/package.mk
25
26define Package/libevent2/Default
27  SECTION:=libs
28  CATEGORY:=Libraries
29  TITLE:=Event notification
30  URL:=http://www.monkey.org/~provos/libevent/
31endef
32
33define Package/libevent2/Default/description
34        The libevent API provides a mechanism to execute a callback function
35        when a specific event occurs on a file descriptor or after a timeout
36        has been reached. Furthermore, libevent also support callbacks due
37        to signals or regular timeouts.
38
39        libevent is meant to replace the event loop found in event driven
40        network servers. An application just needs to call event_dispatch()
41        and then add or remove events dynamically without having to change
42        the event loop.
43endef
44
45define Package/libevent2
46  $(call Package/libevent2/Default)
47  TITLE+= library (version 2.0)
48endef
49
50define Package/libevent2/description
51        $(call Package/libevent2/Default/description)
52
53        This package contains the libevent shared library historically
54        containing both the core & extra libraries.
55endef
56
57define Package/libevent2-core
58  $(call Package/libevent2/Default)
59  TITLE+= core library (version 2.0)
60endef
61
62define Package/libevent2-core/description
63        $(call Package/libevent2/Default/description)
64
65        This package contains the libevent core shared library for the event,
66        buffer & utility functions.
67endef
68
69define Package/libevent2-extra
70  $(call Package/libevent2/Default)
71  TITLE+= extra library (version 2.0)
72endef
73
74define Package/libevent2-extra/description
75        $(call Package/libevent2/Default/description)
76
77        This package contains the libevent extra shared library for specific
78        protocols including HTTP, DNS & RPC.
79endef
80
81define Package/libevent2-openssl
82  $(call Package/libevent2/Default)
83  TITLE+= OpenSSL library (version 2.0)
84  DEPENDS:=+libopenssl
85endef
86
87define Package/libevent2-openssl/description
88        $(call Package/libevent2/Default/description)
89
90        This package contains the libevent OpenSSL shared library for encrypted
91        bufferevents.
92endef
93
94define Package/libevent2-pthreads
95  $(call Package/libevent2/Default)
96  TITLE+= Pthreads library (version 2.0)
97  DEPENDS:=+libpthread
98endef
99
100define Package/libevent2-pthreads/description
101        $(call Package/libevent2/Default/description)
102
103        This package contains the libevent Pthreads shared library for
104        threading & locking.
105endef
106
107TARGET_CFLAGS += $(FPIC)
108
109CONFIGURE_ARGS += \
110        --enable-shared \
111        --enable-static
112
113MAKE_FLAGS += \
114        CFLAGS="$(TARGET_CFLAGS)"
115
116define Build/InstallDev
117        $(INSTALL_DIR) $(1)/usr/include
118        $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
119        $(INSTALL_DIR) $(1)/usr/lib
120        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent*.{la,a,so} $(1)/usr/lib/
121        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent*-2.0.so* $(1)/usr/lib/
122        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
123        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libevent*.pc $(1)/usr/lib/pkgconfig/
124endef
125
126define Package/libevent2/install
127        $(INSTALL_DIR) $(1)/usr/lib
128        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-2.0.so.* $(1)/usr/lib/
129endef
130
131define Package/libevent2-core/install
132        $(INSTALL_DIR) $(1)/usr/lib
133        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_core-2.0.so.* $(1)/usr/lib/
134endef
135
136define Package/libevent2-extra/install
137        $(INSTALL_DIR) $(1)/usr/lib
138        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_extra-2.0.so.* $(1)/usr/lib/
139endef
140
141define Package/libevent2-openssl/install
142        $(INSTALL_DIR) $(1)/usr/lib
143        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_openssl-2.0.so.* $(1)/usr/lib/
144endef
145
146define Package/libevent2-pthreads/install
147        $(INSTALL_DIR) $(1)/usr/lib
148        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent_pthreads-2.0.so.* $(1)/usr/lib/
149endef
150
151$(eval $(call BuildPackage,libevent2))
152$(eval $(call BuildPackage,libevent2-core))
153$(eval $(call BuildPackage,libevent2-extra))
154$(eval $(call BuildPackage,libevent2-openssl))
155$(eval $(call BuildPackage,libevent2-pthreads))
Note: See TracBrowser for help on using the repository browser.