Retain symlinks. $(INSTALL_*) copys the contens of a file, so if we want to keep
[openwrt/svn-archive/archive.git] / libs / libxml2 / Makefile
1 #
2 # Copyright (C) 2006-2008 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.7.2
13 PKG_RELEASE:=3
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:=dc43ff7ae6aded45f578c87b7b0c8766
19 PKG_FIXUP:=libtool
20
21 include $(INCLUDE_DIR)/package.mk
22
23 PKG_INSTALL=1
24
25 define Package/libxml2
26 SECTION:=libs
27 CATEGORY:=Libraries
28 DEPENDS:=+libpthread +zlib
29 TITLE:=Gnome XML library
30 URL:=http://xmlsoft.org/
31 endef
32
33 define Package/libxml2/description
34 A library for manipulating XML and HTML resources.
35 endef
36
37 TARGET_CFLAGS += $(FPIC)
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 define Build/InstallDev
71 $(INSTALL_DIR) $(2)/bin
72 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(2)/bin/
73 $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(2)/bin/xml2-config
74
75 $(INSTALL_DIR) $(1)/usr/include
76 $(CP) \
77 $(PKG_INSTALL_DIR)/usr/include/libxml2 \
78 $(1)/usr/include/
79
80 $(INSTALL_DIR) $(1)/usr/lib
81 $(CP) \
82 $(PKG_INSTALL_DIR)/usr/lib/libxml2.{la,a,so*} \
83 $(1)/usr/lib/
84
85 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
86 $(INSTALL_DATA) \
87 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc \
88 $(1)/usr/lib/pkgconfig/
89
90 $(INSTALL_DIR) $(2)/share/aclocal/
91 $(INSTALL_DATA) \
92 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
93 $(2)/share/aclocal
94 endef
95
96 define Package/libxml2/install
97 $(INSTALL_DIR) $(1)/usr/lib
98 $(CP) \
99 $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* \
100 $(1)/usr/lib/
101 endef
102
103
104 $(eval $(call BuildPackage,libxml2))