[libs] newt: Fixed whiptail install so that it takes the files from the package build...
[openwrt/svn-archive/archive.git] / libs / libevent2 / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libevent2
11 PKG_VERSION:=2.0.10
12 PKG_RELEASE:=1
13
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/
17 PKG_MD5SUM:=a37401d26cbbf28185211d582741a3d4
18
19 PKG_FIXUP:=libtool
20 PKG_INSTALL:=1
21 PKG_BUILD_PARALLEL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libevent2
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=Event notification library (version 2.0)
29 URL:=http://www.monkey.org/~provos/libevent/
30 endef
31
32 define Package/libevent2/description
33 The libevent API provides a mechanism to execute a callback function
34 when a specific event occurs on a file descriptor or after a timeout
35 has been reached. Furthermore, libevent also support callbacks due
36 to signals or regular timeouts.
37
38 libevent is meant to replace the event loop found in event driven
39 network servers. An application just needs to call event_dispatch()
40 and then add or remove events dynamically without having to change
41 the event loop.
42 endef
43
44 TARGET_CFLAGS += $(FPIC)
45
46 CONFIGURE_ARGS += \
47 --enable-shared \
48 --enable-static
49
50 MAKE_FLAGS += \
51 CFLAGS="$(TARGET_CFLAGS)"
52
53 define Build/InstallDev
54 $(INSTALL_DIR) $(1)/usr/include
55 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent.{la,a,so} $(1)/usr/lib/
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-2.0.so* $(1)/usr/lib/
59 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libevent.pc $(1)/usr/lib/pkgconfig
61 endef
62
63 define Package/libevent2/install
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-2.0.so.* $(1)/usr/lib/
66 endef
67
68 $(eval $(call BuildPackage,libevent2))