Makefile 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #
  2. # Copyright (C) 2007-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=apr-util
  9. PKG_VERSION:=1.5.4
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@APACHE/apr/
  13. PKG_MD5SUM:=2202b18f269ad606d70e1864857ed93c
  14. PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
  15. PKG_LICENSE:=Apache License
  16. PKG_FIXUP:=autoreconf
  17. PKG_REMOVE_FILES:=aclocal.m4 build/ltmain.sh
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/nls.mk
  21. define Package/libaprutil
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. DEPENDS:=+libapr +libexpat +libsqlite3 +libuuid $(ICONV_DEPENDS)
  25. TITLE:=Apache Portable Runtime Utility Library
  26. URL:=http://apr.apache.org/
  27. endef
  28. TARGET_CFLAGS += $(FPIC)
  29. TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
  30. CONFIGURE_ARGS += \
  31. --with-pgsql=no \
  32. --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
  33. --with-expat="$(STAGING_DIR)/usr" \
  34. --without-sqlite2 \
  35. --with-sqlite3="$(STAGING_DIR)/usr"
  36. ifdef $(CONFIG_BUILD_NLS)
  37. CONFIGURE_ARGS += --with-iconv="$(ICONV_PREFIX)"
  38. else
  39. CONFIGURE_ARGS += --without-iconv
  40. endif
  41. CONFIGURE_VARS += \
  42. ac_cv_file_dbd_apr_dbd_mysql_c=no \
  43. ac_cv_path_ODBC_CONFIG= \
  44. APR_BUILD_DIR="$(STAGING_DIR)/usr/share/build-1"
  45. MAKE_FLAGS += \
  46. APRUTIL_LIBS="-lsqlite3 $(TARGET_LDFLAGS) -lexpat $(if $(ICONV_FULL),-liconv) -lapr-1 -luuid -lm -lcrypt"
  47. define Build/InstallDev
  48. $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1/ $(1)/usr/lib $(1)/usr/lib/pkgconfig/
  49. $(CP) $(PKG_INSTALL_DIR)/usr/bin/apu-1-config \
  50. $(1)/usr/bin/
  51. $(CP) $(PKG_INSTALL_DIR)/usr/include/apr-1/* \
  52. $(1)/usr/include/apr-1/
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaprutil-1.{la,a,so*} \
  54. $(1)/usr/lib/
  55. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/apr-util-1.pc \
  56. $(1)/usr/lib/pkgconfig/
  57. $(SED) 's, -e \"s -I$$$$prefix/lib g\",,g' $(1)/usr/bin/apu-1-config
  58. $(SED) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(1)/usr/bin/apu-1-config
  59. $(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(1)/usr/bin/apu-1-config
  60. $(SED) 's,-L$$$$libdir,,g' $(1)/usr/bin/apu-1-config
  61. $(SED) 's,-R$$$$libdir,,g' $(1)/usr/bin/apu-1-config
  62. endef
  63. define Package/libaprutil/install
  64. $(INSTALL_DIR) $(1)/usr/lib
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaprutil-1.so.* $(1)/usr/lib/
  66. endef
  67. $(eval $(call BuildPackage,libaprutil))