2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
17 PKG_SOURCE_URL
:=http
://xmlsoft.org
/sources
/ \
18 ftp
://fr.rpmfind.net
/pub
/libxml
/
19 PKG_MD5SUM
:=8f0b3ce721bda11401e656b90ba4e78c
22 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/libxml2
29 DEPENDS
:=+libpthread
+zlib
30 TITLE
:=Gnome XML library
31 DESCRIPTION
:=A library for manipulating XML and HTML resources.
32 URL
:=http
://xmlsoft.org
/
35 define Build
/Configure
36 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
37 $(TARGET_CONFIGURE_OPTS
) \
38 CFLAGS
="$(strip $(TARGET_CFLAGS))" \
39 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
40 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
42 --target
=$(GNU_TARGET_NAME
) \
43 --host
=$(GNU_TARGET_NAME
) \
44 --build
=$(GNU_HOST_NAME
) \
50 --datadir=/usr
/share \
51 --includedir=/usr
/include \
52 --infodir=/usr
/share
/info \
54 --libexecdir
=/usr
/lib \
55 --localstatedir
=/var \
56 --mandir=/usr
/share
/man \
59 $(DISABLE_LARGEFILE
) \
96 rm -rf
$(PKG_INSTALL_DIR
)
97 mkdir
-p
$(PKG_INSTALL_DIR
)
98 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
99 DESTDIR
="$(PKG_INSTALL_DIR)" \
103 define Package
/libxml2
/install
104 install -m0755
-d
$(1)/usr
/lib
105 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libxml2.so.
* $(1)/usr
/lib
/
108 define Build
/InstallDev
109 mkdir
-p
$(STAGING_DIR
)/usr
/bin
110 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/xml2-config
$(STAGING_DIR
)/usr
/bin
/
111 mkdir
-p
$(STAGING_DIR
)/usr
/include
112 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/libxml2
$(STAGING_DIR
)/usr
/include/
113 mkdir
-p
$(STAGING_DIR
)/usr
/lib
114 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libxml2.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
115 mkdir
-p
$(STAGING_DIR
)/usr
/lib
/pkgconfig
116 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libxml-2.0.
pc $(STAGING_DIR
)/usr
/lib
/pkgconfig
/
117 $(SED
) 's,-I$$$${includedir}/libxml2,,g' $(STAGING_DIR
)/usr
/bin
/xml2-config
118 $(SED
) 's,-I$$$${includedir},,g' $(STAGING_DIR
)/usr
/bin
/xml2-config
119 $(SED
) 's,-I$(STAGING_DIR)/usr/include,,g' $(STAGING_DIR
)/usr
/bin
/xml2-config
120 $(SED
) 's,-L$$$${libdir},,g' $(STAGING_DIR
)/usr
/bin
/xml2-config
121 $(SED
) 's,-L$(STAGING_DIR)/usr/lib,,g' $(STAGING_DIR
)/usr
/bin
/xml2-config
122 $(SED
) 's,-I$$$${includedir}/libxml2,,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/libxml-2.0.
pc
123 $(SED
) 's,-L$$$${libdir},,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/libxml-2.0.
pc
126 define Build
/UninstallDev
128 $(STAGING_DIR
)/usr
/bin
/xml2-config \
129 $(STAGING_DIR
)/usr
/include/libxml2 \
130 $(STAGING_DIR
)/usr
/lib
/libxml2.
{a
,so
*} \
131 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/libxml-2.0.
pc
134 $(eval
$(call BuildPackage
,libxml2
))