Use xml2-config.
[openwrt/svn-archive/archive.git] / libs / libxslt / 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:=libxslt
12 PKG_VERSION:=1.1.24
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:=e83ec5d27fc4c10c6f612879bea9a153
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/libxslt
23 SECTION:=libs
24 CATEGORY:=Libraries
25 DEPENDS:=+libxml2
26 TITLE:=Gnome XSLT library
27 URL:=http://xmlsoft.org/XSLT/
28 endef
29
30 define Package/libxslt/description
31 A library for XML transformation using XSLT.
32 endef
33
34 define Package/xsltproc
35 SECTION:=utils
36 CATEGORY:=Utilities
37 DEPENDS:=+libxml2 +libxslt
38 TITLE:=Gnome XSLT xsltproc Utility
39 URL:=http://xmlsoft.org/XSLT/
40 endef
41
42 define Package/xsltproc/description
43 XSLT XML transformation utility
44 endef
45
46 define Build/Configure
47 $(call Build/Configure/Default, \
48 --enable-shared \
49 --enable-static \
50 --without-python \
51 --without-crypto \
52 --without-debug \
53 --without-mem-debug \
54 --without-debugger \
55 )
56 endef
57
58 TARGET_CFLAGS += $(FPIC)
59
60 define Build/Compile
61 $(MAKE) -C $(PKG_BUILD_DIR) \
62 DESTDIR="$(PKG_INSTALL_DIR)" \
63 all install
64 endef
65
66 define Build/InstallDev
67 $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
68 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xslt-config $(1)/usr/bin/
69 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xsltproc $(1)/usr/bin/
70 $(CP) $(PKG_INSTALL_DIR)/usr/include/libxslt $(1)/usr/include/
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxslt.{a,so*} $(1)/usr/lib/
72 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxslt.pc $(1)/usr/lib/pkgconfig/
73 $(SED) 's,-I$$$${includedir},,g' $(1)/usr/bin/xslt-config
74 $(SED) 's,-L$$$${libdir},,g' $(1)/usr/bin/xslt-config
75 $(SED) 's,-I$(STAGING_DIR)/usr/include,,g' $(1)/usr/bin/xslt-config
76 $(SED) 's,-L$(STAGING_DIR)/usr/lib,,g' $(1)/usr/bin/xslt-config
77 endef
78
79 define Package/libxslt/install
80 $(INSTALL_DIR) $(1)/usr/lib
81 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxslt.so.* $(1)/usr/lib/
82 endef
83
84 define Package/xsltproc/install
85 $(INSTALL_DIR) $(1)/usr/bin
86 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xsltproc $(1)/usr/bin/
87 endef
88
89 $(eval $(call BuildPackage,libxslt))
90 $(eval $(call BuildPackage,xsltproc))