4c93e77a9b4337c166b9f4fb9e60e2b59f3d0b1a
[openwrt/svn-archive/archive.git] / libs / libxml2 / 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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libxml2
12 PKG_VERSION:=2.6.20
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://xmlsoft.org/sources/ \
17 ftp://fr.rpmfind.net/pub/libxml/
18 PKG_MD5SUM:=8f0b3ce721bda11401e656b90ba4e78c
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
26 define Package/libxml2
27 SECTION:=libs
28 CATEGORY:=Libraries
29 DEPENDS:=+libpthread +zlib
30 TITLE:=Gnome XML library
31 URL:=http://xmlsoft.org/
32 endef
33
34 define Package/libxml2/description
35 A library for manipulating XML and HTML resources.
36 endef
37
38
39 CONFIGURE_ARGS += \
40 --enable-shared \
41 --enable-static \
42 --without-c14n \
43 --without-catalog \
44 --without-debug \
45 --without-docbook \
46 --with-html \
47 --without-ftp \
48 --without-http \
49 --without-iconv \
50 --without-iso8859x \
51 --without-legacy \
52 --with-output \
53 --without-pattern \
54 --without-push \
55 --without-python \
56 --with-reader \
57 --without-readline \
58 --without-regexps \
59 --with-sax1 \
60 --with-schemas \
61 --with-threads \
62 --with-tree \
63 --with-valid \
64 --with-writer \
65 --with-xinclude \
66 --with-xpath \
67 --with-xptr \
68 --with-zlib \
69
70
71 define Build/Configure
72 $(call Build/Configure/Default)
73 $(call libtool_disable_rpath)
74 endef
75
76 define Build/Compile
77 $(MAKE) -C $(PKG_BUILD_DIR) all
78 $(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
79 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
80 endef
81
82 define Build/InstallDev
83 mkdir -p $(1)/usr/bin
84 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(1)/usr/bin/
85 mkdir -p $(1)/usr/include
86 $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(1)/usr/include/
87 mkdir -p $(1)/usr/lib
88 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.{a,so*} $(1)/usr/lib/
89 mkdir -p $(1)/usr/lib/pkgconfig
90 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(1)/usr/lib/pkgconfig/
91 $(SED) 's,-I$$$${includedir}/libxml2,-I$(1)/usr/include/libxml2,g' $(1)/usr/bin/xml2-config
92 $(SED) 's,-L$$$${libdir},,g' $(1)/usr/bin/xml2-config
93 endef
94
95 define Package/libxml2/install
96 $(INSTALL_DIR) $(1)/usr/lib
97 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(1)/usr/lib/
98 endef
99
100
101 $(eval $(call BuildPackage,libxml2))
102