2007-05-17 20:41:56 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2007 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2007-07-01 21:54:25 +00:00
|
|
|
# $Id$
|
2007-05-17 20:41:56 +00:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=apr
|
2007-07-02 10:59:50 +00:00
|
|
|
PKG_VERSION:=1.2.9
|
2007-05-17 20:41:56 +00:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=http://apache.d-s-s-p.de/apr/
|
2007-07-02 10:59:50 +00:00
|
|
|
PKG_MD5SUM:=6f4b063ac01a54ba0818c31280f06959
|
2007-05-17 20:41:56 +00:00
|
|
|
PKG_CAT:=zcat
|
|
|
|
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/apr
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
DEPENDS:=+libpthread
|
|
|
|
TITLE:=Apache Portable Runtime Library
|
|
|
|
DESCRIPTION:=\
|
|
|
|
Apache Portable Runtime Library
|
|
|
|
URL:=http://apr.apache.org/
|
|
|
|
endef
|
|
|
|
|
2007-07-31 10:23:55 +00:00
|
|
|
CONFIGURE_ARGS += \
|
2007-05-17 20:41:56 +00:00
|
|
|
--with-devrandom=/dev/urandom \
|
|
|
|
--disable-dso \
|
2007-07-31 10:23:55 +00:00
|
|
|
--disable-ipv6
|
|
|
|
|
|
|
|
CONFIGURE_VARS += \
|
2007-05-17 20:41:56 +00:00
|
|
|
ac_cv_file__dev_zero=yes \
|
2007-07-01 21:54:25 +00:00
|
|
|
apr_cv_process_shared_works=no \
|
2007-05-17 20:41:56 +00:00
|
|
|
apr_cv_mutex_robust_shared=no \
|
2007-07-01 21:54:25 +00:00
|
|
|
apr_cv_tcp_nodelay_with_cork=yes \
|
|
|
|
ac_cv_sizeof_ssize_t=4 \
|
2007-05-17 20:41:56 +00:00
|
|
|
LDFLAGS="-lpthread -L$(STAGING_DIR)/lib" \
|
2007-07-31 10:23:55 +00:00
|
|
|
CFLAGS="-I$(STAGING_DIR)/include $(TARGET_CFLAGS)"
|
2007-05-17 20:41:56 +00:00
|
|
|
|
2007-07-31 10:23:55 +00:00
|
|
|
MAKE_FLAGS += \
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
|
|
all install
|
2007-05-17 20:41:56 +00:00
|
|
|
|
|
|
|
define Build/InstallDev
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/bin
|
2007-07-01 21:54:25 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/apr-1-config \
|
2007-05-17 20:41:56 +00:00
|
|
|
$(STAGING_DIR)/usr/bin
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/include
|
2007-07-01 21:54:25 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/apr-1/ \
|
2007-05-17 20:41:56 +00:00
|
|
|
$(STAGING_DIR)/usr/include/
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/*apr* \
|
|
|
|
$(STAGING_DIR)/usr/lib/
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/share/
|
2007-07-01 21:54:25 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/share/build-1/ \
|
2007-05-17 20:41:56 +00:00
|
|
|
$(STAGING_DIR)/usr/share/
|
2007-07-01 21:54:25 +00:00
|
|
|
$(SED) "s,/usr/share/build-1,$(STAGING_DIR)/usr/share/build-1," $(STAGING_DIR)/usr/share/build-1/apr_rules.mk
|
|
|
|
$(SED) "s,\"/usr\",$(STAGING_DIR)/usr," $(STAGING_DIR)/usr/bin/apr-1-config
|
|
|
|
$(SED) "s,"libdir\=\'/usr/lib\'",libdir='$(STAGING_DIR)/usr/lib\'," $(STAGING_DIR)/usr/lib/libapr-1.la
|
|
|
|
$(SED) "s,"bindir\=\"/usr/bin\"",bindir=\"$(STAGING_DIR)/usr/bin\"," $(STAGING_DIR)/usr/bin/apr-1-config
|
|
|
|
$(SED) "s,"datadir\=\"/usr/share\"",datadir=\"$(STAGING_DIR)/usr/share\"," $(STAGING_DIR)/usr/bin/apr-1-config
|
|
|
|
$(SED) "s,"installbuilddir\=\"/usr/share/build-1\"",installbuilddir=\"$(STAGING_DIR)/usr/share/build-1\"," $(STAGING_DIR)/usr/bin/apr-1-config
|
2007-05-17 20:41:56 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/UninstallDev
|
2007-07-12 09:34:20 +00:00
|
|
|
rm -rf $(STAGING_DIR)/usr/bin/apr-1-config \
|
2007-07-01 21:54:25 +00:00
|
|
|
$(STAGING_DIR)/usr/lib/{libapr-1*,apr.exp} \
|
2007-07-12 09:34:20 +00:00
|
|
|
$(STAGING_DIR)/usr/share/build-1/ \
|
2007-07-01 21:54:25 +00:00
|
|
|
$(STAGING_DIR)/usr/include/apr-1/
|
2007-05-17 20:41:56 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/apr/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,apr))
|