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_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:=db71660bb7d01ccd4e6be990af8d813b
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23 include $(INCLUDE_DIR)/package.mk
25 define Package/libxslt
29 TITLE:=Gnome XSLT library
30 URL:=http://xmlsoft.org/XSLT/
33 define Package/libxslt/description
34 A library for XML transformation using XSLT.
37 define Package/xsltproc
40 DEPENDS:=+libxml2 +libxslt
41 TITLE:=Gnome XSLT xsltproc Utility
42 URL:=http://xmlsoft.org/XSLT/
45 define Package/xsltproc/description
46 XSLT XML transformation utility
49 define Build/Configure
50 $(call Build/Configure/Default, \
53 --with-libxml-prefix="$(STAGING_DIR)/usr" \
54 --with-libxml-include-prefix="$(STAGING_DIR)/usr/include" \
55 --with-libxml-libs-prefix="$(STAGING_DIR)/usr/lib" \
62 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/libxml2" \
67 $(MAKE) -C $(PKG_BUILD_DIR) \
68 DESTDIR="$(PKG_INSTALL_DIR)" \
72 define Build/InstallDev
73 $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
74 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xslt-config $(1)/usr/bin/
75 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xsltproc $(1)/usr/bin/
76 $(CP) $(PKG_INSTALL_DIR)/usr/include/libxslt $(1)/usr/include/
77 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxslt.{a,so*} $(1)/usr/lib/
78 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxslt.pc $(1)/usr/lib/pkgconfig/
79 $(SED) 's,-I$$$${includedir},,g' $(1)/usr/bin/xslt-config
80 $(SED) 's,-L$$$${libdir},,g' $(1)/usr/bin/xslt-config
81 $(SED) 's,-I$(STAGING_DIR)/usr/include,,g' $(1)/usr/bin/xslt-config
82 $(SED) 's,-L$(STAGING_DIR)/usr/lib,,g' $(1)/usr/bin/xslt-config
85 define Package/libxslt/install
86 $(INSTALL_DIR) $(1)/usr/lib
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxslt.so.* $(1)/usr/lib/
90 define Package/xsltproc/install
91 $(INSTALL_DIR) $(1)/usr/bin
92 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xsltproc $(1)/usr/bin/
95 $(eval $(call BuildPackage,libxslt))
96 $(eval $(call BuildPackage,xsltproc))