source: packages/libs/apr/Makefile @ 9246

Last change on this file since 9246 was 9246, checked in by nico, 9 years ago

[packages] apr: rename from apr to libapr, add libtool fixes, cleanup

  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
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
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=apr
12PKG_VERSION:=1.2.9
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16PKG_SOURCE_URL:=http://apache.d-s-s-p.de/apr/
17PKG_MD5SUM:=6f4b063ac01a54ba0818c31280f06959
18
19include $(INCLUDE_DIR)/package.mk
20
21define Package/libapr
22  SECTION:=libs
23  CATEGORY:=Libraries
24  DEPENDS:=+libpthread
25  TITLE:=Apache Portable Runtime Library
26  URL:=http://apr.apache.org/
27endef
28
29CONFIGURE_ARGS += \
30        --with-devrandom=/dev/urandom \
31        --disable-dso \
32        --disable-ipv6
33
34CONFIGURE_VARS += \
35        ac_cv_file__dev_zero=yes \
36        apr_cv_process_shared_works=no \
37        apr_cv_mutex_robust_shared=no \
38        apr_cv_tcp_nodelay_with_cork=yes \
39        ac_cv_sizeof_ssize_t=4 \
40        LDFLAGS="$$$$LDFLAGS -lpthread" \
41
42define Build/Configure
43        $(call Build/Configure/Default)
44        $(call libtool_disable_rpath)
45endef
46
47define Build/Compile
48        $(MAKE) -C $(PKG_BUILD_DIR) all
49        $(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
50        $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
51endef
52
53define Build/InstallDev
54        mkdir -p $(1)/usr/bin
55        $(CP)   $(PKG_INSTALL_DIR)/usr/bin/apr-1-config \
56                $(1)/usr/bin
57        mkdir -p $(1)/usr/include/apr-1
58        $(CP)   $(PKG_INSTALL_DIR)/usr/include/apr-1/* \
59                $(1)/usr/include/apr-1/
60        mkdir -p $(1)/usr/lib
61        $(CP)   $(PKG_INSTALL_DIR)/usr/lib/libapr-1.{a,so*} \
62                $(1)/usr/lib/
63        mkdir -p $(1)/usr/lib/pkgconfig
64        $(CP)   $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/apr-1.pc \
65                $(1)/usr/lib/pkgconfig/
66        mkdir -p $(1)/usr/share/build-1
67        $(CP)   $(PKG_INSTALL_DIR)/usr/share/build-1/* \
68                $(1)/usr/share/build-1/
69        $(SED) 's,^datadir=\"/usr/share\",datadir=\"$(1)/usr/share\",g' $(1)/usr/bin/apr-1-config
70        $(SED) 's,^installbuilddir=\"/usr/share/build-1\",installbuilddir=\"$(1)/usr/share/build-1\",g' $(1)/usr/bin/apr-1-config
71        $(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(1)/usr/include/,g' $(1)/usr/bin/apr-1-config
72        $(SED) 's,-L$$$$libdir,,g' $(1)/usr/bin/apr-1-config
73        $(SED) 's,-R$$$$libdir,,g' $(1)/usr/bin/apr-1-config
74        $(SED) 's,/usr/share/build-1,$(1)/usr/share/build-1,g' $(1)/usr/share/build-1/apr_rules.mk
75endef
76
77define Build/UninstallDev
78        rm -rf  $(STAGING_DIR)/usr/bin/apr-1-config \
79                $(STAGING_DIR)/usr/include/apr-1 \
80                $(STAGING_DIR)/usr/lib/libapr-1.{a,so*} \
81                $(STAGING_DIR)/usr/lib/pkgconfig/apr-1.pc \
82                $(STAGING_DIR)/usr/share/build-1
83endef
84
85define Package/libapr/install
86        $(INSTALL_DIR) $(1)/usr/lib
87        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libapr-1.so.* $(1)/usr/lib/
88endef
89
90$(eval $(call BuildPackage,libapr))
Note: See TracBrowser for help on using the repository browser.