use Build/Configure/Default macro, Makefile cleanup

git-svn-id: svn://svn.openwrt.org/openwrt/packages@5329 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico
2006-10-28 22:43:08 +00:00
parent f200c1bf2c
commit d1cac1e535
58 changed files with 1133 additions and 2630 deletions

View File

@ -26,63 +26,32 @@ define Package/libevent
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Event notification library
DESCRIPTION:=Event notification library for event-driven network servers.\\\
The libevent API provides a mechanism to execute a callback function \\\
when a specific event occurs on a file descriptor or after a timeout \\\
has been reached. Furthermore, libevent also support callbacks due \\\
to signals or regular timeouts.\\\
\\\
libevent is meant to replace the event loop found in event driven \\\
network servers. An application just needs to call event_dispatch() \\\
and then add or remove events dynamically without having to change \\\
the event loop.
DESCRIPTION:=\
The libevent API provides a mechanism to execute a callback function \\\
when a specific event occurs on a file descriptor or after a timeout \\\
has been reached. Furthermore, libevent also support callbacks due \\\
to signals or regular timeouts.\\\
\\\
libevent is meant to replace the event loop found in event driven \\\
network servers. An application just needs to call event_dispatch() \\\
and then add or remove events dynamically without having to change \\\
the event loop.
URL:=http://www.monkey.org/~provos/libevent/
endef
define Build/Configure
(cd $(PKG_BUILD_DIR); rm -f config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--program-prefix="" \
--program-suffix="" \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--datadir=/usr/share \
--includedir=/usr/include \
--infodir=/usr/share/info \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--localstatedir=/var \
--mandir=/usr/share/man \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
$(DISABLE_LARGEFILE) \
$(DISABLE_NLS) \
--enable-shared \
--enable-static \
);
$(call Build/Configure/Default, \
--enable-shared \
--enable-static \
)
endef
define Build/Compile
rm -rf $(PKG_INSTALL_DIR)
mkdir -p $(PKG_INSTALL_DIR)
$(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install
endef
define Package/libevent/install
install -d -m0755 $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-$(PKG_VERSION).so.* $(1)/usr/lib/
endef
define Build/InstallDev
mkdir -p $(STAGING_DIR)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/event.h $(STAGING_DIR)/usr/include/
@ -98,4 +67,9 @@ define Build/UninstallDev
$(STAGING_DIR)/usr/lib/libevent-$(PKG_VERSION).so*
endef
define Package/libevent/install
install -d -m0755 $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevent-$(PKG_VERSION).so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libevent))