lots of package cleanups/fixes
[openwrt/svn-archive/archive.git] / libs / apr-util / Makefile
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=apr-util
12 PKG_VERSION:=1.2.8
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://apache.autinity.de/apr/
17 PKG_MD5SUM:=a2e2e54d65e9eae961f7171335cf2550
18
19 PKG_FIXUP = libtool
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libaprutil
24 SECTION:=libs
25 CATEGORY:=Libraries
26 DEPENDS:=+libapr +libexpat +libiconv +libpthread +libsqlite3 +libuuid
27 TITLE:=Apache Portable Runtime Utility Library
28 URL:=http://apr.apache.org/
29 endef
30
31
32 CONFIGURE_ARGS += \
33 --with-pgsql=no \
34 --with-apr="$(STAGING_DIR)/host/bin/apr-1-config" \
35 --with-expat="$(STAGING_DIR)/usr" \
36 --without-sqlite2 \
37 --with-sqlite3="$(STAGING_DIR)/usr" \
38 --with-iconv="$(STAGING_DIR)/usr/lib/libiconv" \
39
40 CONFIGURE_VARS += \
41 ac_cv_file_dbd_apr_dbd_mysql_c=no \
42 APR_BUILD_DIR="$(STAGING_DIR)/usr/share/build-1" \
43
44 define Build/Compile
45 $(MAKE) -C $(PKG_BUILD_DIR) APRUTIL_LIBS="-lsqlite3 -L$(STAGING_DIR)/usr/lib -lexpat -liconv -lapr-1 -luuid -lm -lcrypt" all
46 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
47 endef
48
49 define Build/InstallDev
50 $(INSTALL_DIR) $(2)/bin $(1)/usr/include/apr-1/ $(1)/usr/lib $(1)/usr/lib/pkgconfig/
51 $(CP) $(PKG_INSTALL_DIR)/usr/bin/apu-1-config \
52 $(2)/bin
53 $(CP) $(PKG_INSTALL_DIR)/usr/include/apr-1/* \
54 $(1)/usr/include/apr-1/
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaprutil-1.{la,a,so*} \
56 $(1)/usr/lib/
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/apr-util-1.pc \
58 $(1)/usr/lib/pkgconfig/
59 $(SED) 's, -e \"s -I$$$$prefix/lib g\",,g' $(2)/bin/apu-1-config
60 $(SED) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(2)/bin/apu-1-config
61 $(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(2)/bin/apu-1-config
62 $(SED) 's,-L$$$$libdir,,g' $(2)/bin/apu-1-config
63 $(SED) 's,-R$$$$libdir,,g' $(2)/bin/apu-1-config
64 endef
65
66 define Package/libaprutil/install
67 $(INSTALL_DIR) $(1)/usr/lib
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libaprutil-1.so.* $(1)/usr/lib/
69 endef
70
71 $(eval $(call BuildPackage,libaprutil))