a6f81c695b1d3510ffe966b96167428337e67439
[packages.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                 --with-libxml-prefix="$(STAGING_DIR)/usr" \
51                 --with-libxml-include-prefix="$(STAGING_DIR)/usr/include" \
52                 --with-libxml-libs-prefix="$(STAGING_DIR)/usr/lib" \
53                 --without-python \
54                 --without-crypto \
55                 --without-debug \
56                 --without-mem-debug \
57                 --without-debugger \
58                 , \
59                 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/libxml2" \
60         )
61 endef
62
63 define Build/Compile
64         $(MAKE) -C $(PKG_BUILD_DIR) \
65                 DESTDIR="$(PKG_INSTALL_DIR)" \
66                 all install
67 endef
68
69 define Build/InstallDev
70         $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
71         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xslt-config $(1)/usr/bin/
72         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xsltproc $(1)/usr/bin/
73         $(CP) $(PKG_INSTALL_DIR)/usr/include/libxslt $(1)/usr/include/
74         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxslt.{a,so*} $(1)/usr/lib/
75         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxslt.pc $(1)/usr/lib/pkgconfig/
76         $(SED) 's,-I$$$${includedir},,g' $(1)/usr/bin/xslt-config
77         $(SED) 's,-L$$$${libdir},,g' $(1)/usr/bin/xslt-config
78         $(SED) 's,-I$(STAGING_DIR)/usr/include,,g' $(1)/usr/bin/xslt-config
79         $(SED) 's,-L$(STAGING_DIR)/usr/lib,,g' $(1)/usr/bin/xslt-config
80 endef
81
82 define Package/libxslt/install
83         $(INSTALL_DIR) $(1)/usr/lib
84         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxslt.so.* $(1)/usr/lib/
85 endef
86
87 define Package/xsltproc/install
88         $(INSTALL_DIR) $(1)/usr/bin
89         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xsltproc $(1)/usr/bin/
90 endef
91
92 $(eval $(call BuildPackage,libxslt))
93 $(eval $(call BuildPackage,xsltproc))