e4a0eea4d1932da6ce7c84f9335a12e5d3c2c6e2
[openwrt/svn-archive/archive.git] / utils / apr-util / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # crazy_imp
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=apr-util
12 PKG_VERSION:=0.9.13
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:=31e3881af0d9546286b0057717cdb89b
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/apr-util
26 SECTION:=utils
27 CATEGORY:=Utilities
28 DEPENDS:=+libiconv +libexpat
29 TITLE:=Apache Portable Runtime Library Util
30 URL:=http://apr.apache.org/
31 endef
32
33 define Build/Configure
34 $(call Build/Configure/Default, \
35 --with-apr="$(STAGING_DIR)/usr/bin/apr-config" \
36 , \
37 APR_BUILD_DIR="$(STAGING_DIR)/usr/share/build" \
38 CFLAGS="-I$(STAGING_DIR)/usr/lib/libiconv/include/" \
39 )
40 endef
41
42 define Build/Compile
43 $(MAKE) -C $(PKG_BUILD_DIR) \
44 DESTDIR="$(PKG_INSTALL_DIR)" \
45 all install
46 endef
47
48 define Build/InstallDev
49 mkdir -p $(STAGING_DIR)/usr/bin
50 $(CP) $(PKG_INSTALL_DIR)/usr/bin/apu-config \
51 $(STAGING_DIR)/usr/bin
52 mkdir -p $(STAGING_DIR)/usr/include/apr-0/
53 $(CP) $(PKG_INSTALL_DIR)/usr/include/apr-0/* \
54 $(STAGING_DIR)/usr/include/apr-0/
55 mkdir -p $(STAGING_DIR)/usr/lib
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*aprutil* \
57 $(STAGING_DIR)/usr/lib/
58 $(SED) "s,\"/usr\",$(STAGING_DIR)/usr," $(STAGING_DIR)/usr/bin/apu-config
59 endef
60
61 define Build/UninstallDev
62 rm $(STAGING_DIR)/usr/bin/apu-config \
63 $(STAGING_DIR)/usr/include/apr-0/{apr_anylock.h,apr_base64.h,apr_buckets.h,apr_date.h,apr_dbm.h,apr_hooks.h,apr_ldap.h,apr_ldap_url.h,apr_md4.h,apr_md5.h,apr_optional.h,apr_optional_hooks.h,apr_queue.h,apr_reslist.h,apr_rmm.h,apr_sdbm.h,apr_sha1.h,apr_strmatch.h,apr_uri.h,apr_uuid.h,apr_xlate.h,apr_xml.h,apu_compat.h,apu.h,apu_version.h,apu_want.h} \
64 $(STAGING_DIR)/usr/lib/*aprutil*
65 endef
66
67 define Package/apr-util/install
68 $(INSTALL_DIR) $(1)/usr/bin
69 $(CP) $(PKG_INSTALL_DIR)/usr/bin/apu-config $(1)/usr/bin/
70 $(INSTALL_DIR) $(1)/usr/lib
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
72 endef
73
74 $(eval $(call BuildPackage,apr-util))