Add init script from #924
[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 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/neon
26 SECTION:=libs
27 CATEGORY:=Libraries
28 DEPENDS:=+libopenssl +libxml2 +libintl
29 TITLE:=neon - HTTP and WebDAV client library
30 URL:=http://www.webdav.org/neon/
31 endef
32
33 define Build/Configure
34 $(call Build/Configure/Default, \
35 --enable-shared \
36 --with-libxml2 \
37 --with-ssl=openssl \
38 --without-egd \
39 --without-socks \
40 , \
41 LDFLAGS="-lcrypto -lssl -L$(STAGING_DIR)/usr/lib" \
42 CFLAGS="-I$(STAGING_DIR)/include \
43 -I$(STAGING_DIR)/usr/include/libxml2 \
44 -I$(STAGING_DIR)/usr/lib/libintl/include" \
45 XML2_CONFIG="$(STAGING_DIR)/usr/bin/xml2-config" \
46 )
47 endef
48
49 define Build/Compile
50 $(MAKE) -C $(PKG_BUILD_DIR) \
51 DESTDIR="$(PKG_INSTALL_DIR)" \
52 all install
53 endef
54
55 define Build/InstallDev
56 mkdir -p $(1)/usr/bin
57 $(CP) $(PKG_INSTALL_DIR)/usr/bin/neon-config $(1)/usr/bin/
58 mkdir -p $(1)/usr/include/neon
59 $(CP) $(PKG_INSTALL_DIR)/usr/include/neon/* $(1)/usr/include/neon/
60 mkdir -p $(1)/usr/lib/pkgconfig
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/{libneon.a,libneon.la,libneon.so,libneon.so.26,libneon.so.26.0.3} $(1)/usr/lib/
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/neon.pc $(1)/usr/lib/pkgconfig/
63 $(SED) "s,\=\/usr,\=$(1)/usr," $(1)/usr/bin/neon-config
64 $(SED) "s,"libdir\=\'/usr/lib\'",libdir='$(1)/usr/lib\'," $(1)/usr/lib/libneon.la
65 endef
66
67 define Build/UninstallDev
68 rm -rf $(STAGING_DIR)/usr/bin/neon-config \
69 $(STAGING_DIR)/usr/lib/{libneon.a,libneon.la,libneon.so,libneon.so.26,libneon.so.26.0.3} \
70 $(STAGING_DIR)/usr/lib/pkgconfig/neon.pc \
71 $(STAGING_DIR)/usr/include/neon
72 endef
73
74 define Package/neon/install
75 $(INSTALL_DIR) $(1)/usr/bin
76 $(CP) $(PKG_INSTALL_DIR)/usr/bin/neon-config $(1)/usr/bin/
77 $(INSTALL_DIR) $(1)/usr/lib
78 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
79 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
80 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/neon.pc $(1)/usr/lib/pkgconfig/
81 endef
82
83 $(eval $(call BuildPackage,neon))