clean up, replace old libtool fixup calls with PKG_FIXUP
[packages.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 PKG_FIXUP = libtool
24
25 include $(INCLUDE_DIR)/package.mk
26
27
28 define Package/libxml2
29   SECTION:=libs
30   CATEGORY:=Libraries
31   DEPENDS:=+libpthread +zlib
32   TITLE:=Gnome XML library
33   URL:=http://xmlsoft.org/
34 endef
35
36 define Package/libxml2/description
37  A library for manipulating XML and HTML resources.
38 endef
39
40
41 CONFIGURE_ARGS += \
42         --enable-shared \
43         --enable-static \
44         --without-c14n \
45         --without-catalog \
46         --without-debug \
47         --without-docbook \
48         --with-html \
49         --without-ftp \
50         --without-http \
51         --without-iconv \
52         --without-iso8859x \
53         --without-legacy \
54         --with-output \
55         --without-pattern \
56         --without-push \
57         --without-python \
58         --with-reader \
59         --without-readline \
60         --without-regexps \
61         --with-sax1 \
62         --with-schemas \
63         --with-threads \
64         --with-tree \
65         --with-valid \
66         --with-writer \
67         --with-xinclude \
68         --with-xpath \
69         --with-xptr \
70         --with-zlib \
71
72
73 define Build/Compile
74         $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
75 endef
76
77 define Build/InstallDev
78         mkdir -p $(1)/usr/bin
79         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(1)/usr/bin/
80         mkdir -p $(1)/usr/include
81         $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(1)/usr/include/
82         mkdir -p $(1)/usr/lib
83         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.{a,so*} $(1)/usr/lib/
84         mkdir -p $(1)/usr/lib/pkgconfig
85         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(1)/usr/lib/pkgconfig/
86         $(SED) 's,-I$$$${includedir}/libxml2,-I$(1)/usr/include/libxml2,g' $(1)/usr/bin/xml2-config
87         $(SED) 's,-L$$$${libdir},,g' $(1)/usr/bin/xml2-config
88 endef
89
90 define Package/libxml2/install
91         $(INSTALL_DIR) $(1)/usr/lib
92         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(1)/usr/lib/
93 endef
94
95
96 $(eval $(call BuildPackage,libxml2))
97