7c2ee4b20bfcbc4d3a02de5d8a6cc8de497d59ae
[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.14
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:=db71660bb7d01ccd4e6be990af8d813b
19 PKG_CAT:=zcat
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/libxslt
27 SECTION:=libs
28 CATEGORY:=Libraries
29 DEPENDS:=+libxml2
30 TITLE:=Gnome XSLT library
31 DESCRIPTION:=\
32 A library for XML transformation using XSLT.
33 URL:=http://xmlsoft.org/XSLT/
34 endef
35
36 define Package/xsltproc
37 SECTION:=utils
38 CATEGORY:=Utilities
39 DEPENDS:=+libxml2 +libxslt
40 TITLE:=Gnome XSLT xsltproc Utility
41 DESCRIPTION:=\
42 XSLT XML transformation utility
43 URL:=http://xmlsoft.org/XSLT/
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 mkdir -p $(STAGING_DIR)/usr/bin
71 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xslt-config $(STAGING_DIR)/usr/bin/
72 mkdir -p $(STAGING_DIR)/usr/include
73 $(CP) $(PKG_INSTALL_DIR)/usr/include/libxslt $(STAGING_DIR)/usr/include/
74 mkdir -p $(STAGING_DIR)/usr/lib
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxslt.{a,so*} $(STAGING_DIR)/usr/lib/
76 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
77 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxslt.pc $(STAGING_DIR)/usr/lib/pkgconfig/
78 $(SED) 's,-I$$$${includedir},,g' $(STAGING_DIR)/usr/bin/xslt-config
79 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/bin/xslt-config
80 $(SED) 's,-I$(STAGING_DIR)/usr/include,,g' $(STAGING_DIR)/usr/bin/xslt-config
81 $(SED) 's,-L$(STAGING_DIR)/usr/lib,,g' $(STAGING_DIR)/usr/bin/xslt-config
82 $(SED) 's,-I$$$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/libxslt.pc
83 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/libxslt.pc
84 $(SED) 's,-I$(STAGING_DIR)/usr/include,,g' $(STAGING_DIR)/usr/lib/pkgconfig/libxslt.pc
85 $(SED) 's,-L$(STAGING_DIR)/usr/lib,,g' $(STAGING_DIR)/usr/lib/pkgconfig/libxslt.pc
86 endef
87
88 define Build/UninstallDev
89 rm -rf \
90 $(STAGING_DIR)/usr/bin/xslt-config \
91 $(STAGING_DIR)/usr/include/libxslt \
92 $(STAGING_DIR)/usr/lib/libxslt.{a,so*} \
93 $(STAGING_DIR)/usr/lib/pkgconfig/libxslt.pc
94 endef
95
96 define Package/libxslt/install
97 $(INSTALL_DIR) $(1)/usr/lib
98 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxslt.so.* $(1)/usr/lib/
99 endef
100
101 define Package/xsltproc/install
102 $(INSTALL_DIR) $(1)/usr/bin
103 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xsltproc $(1)/usr/bin/
104 endef
105
106 $(eval $(call BuildPackage,libxslt))
107 $(eval $(call BuildPackage,xsltproc))