[packages] neon: rename from neon to libneon, add libtool fixes, use expat instead...
[openwrt/svn-archive/archive.git] / libs / neon / 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:=neon
12 PKG_VERSION:=0.26.3
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.webdav.org/neon/
17 PKG_MD5SUM:=6e52cd9c03e372026d6eccbfb80f09ef
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libneon
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=HTTP and WebDAV client library
25 URL:=http://www.webdav.org/neon/
26 DEPENDS:=+libopenssl +libexpat
27 endef
28
29
30 CONFIGURE_ARGS += \
31 --enable-shared \
32 --enable-static \
33 --with-expat \
34 --with-ssl="openssl" \
35 --without-egd \
36 --without-socks \
37
38 CONFIGURE_VARS += \
39 LDFLAGS="$$$$LDFLAGS -lcrypto -lssl"
40
41 define Build/Configure
42 $(call Build/Configure/Default)
43 $(call libtool_disable_rpath)
44 endef
45
46 define Build/Compile
47 $(MAKE) -C $(PKG_BUILD_DIR) all
48 $(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
49 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
50 endef
51
52 define Build/InstallDev
53 mkdir -p $(1)/usr/bin
54 $(CP) $(PKG_INSTALL_DIR)/usr/bin/neon-config $(1)/usr/bin/
55 mkdir -p $(1)/usr/include
56 $(CP) $(PKG_INSTALL_DIR)/usr/include/neon $(1)/usr/include/
57 mkdir -p $(1)/usr/lib
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libneon.{a,so*} $(1)/usr/lib/
59 mkdir -p $(1)/usr/lib/pkgconfig
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/neon.pc $(1)/usr/lib/pkgconfig/
61 $(SED) 's,-I$$$${includedir}/,-I$(1)/usr/include/,g' $(1)/usr/bin/neon-config
62 $(SED) 's,-L$$$${libdir},,g' $(1)/usr/bin/neon-config
63 endef
64
65 define Build/UninstallDev
66 rm -rf $(STAGING_DIR)/usr/bin/neon-config \
67 $(STAGING_DIR)/usr/include/neon \
68 $(STAGING_DIR)/usr/lib/libneon.{a,so*} \
69 $(STAGING_DIR)/usr/lib/pkgconfig/neon.pc
70 endef
71
72 define Package/libneon/install
73 $(INSTALL_DIR) $(1)/usr/lib
74 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libneon.so.* $(1)/usr/lib/
75 endef
76
77 $(eval $(call BuildPackage,libneon))