DESCRIPTION:= is obselete
[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 URL:=http://xmlsoft.org/XSLT/
32 endef
33
34 define Package/libxslt/description
35 A library for XML transformation using XSLT.
36 endef
37
38 define Package/xsltproc
39 SECTION:=utils
40 CATEGORY:=Utilities
41 DEPENDS:=+libxml2 +libxslt
42 TITLE:=Gnome XSLT xsltproc Utility
43 URL:=http://xmlsoft.org/XSLT/
44 endef
45
46 define Package/xsltproc/description
47 XSLT XML transformation utility
48 endef
49
50 define Build/Configure
51 $(call Build/Configure/Default, \
52 --enable-shared \
53 --enable-static \
54 --with-libxml-prefix="$(STAGING_DIR)/usr" \
55 --with-libxml-include-prefix="$(STAGING_DIR)/usr/include" \
56 --with-libxml-libs-prefix="$(STAGING_DIR)/usr/lib" \
57 --without-python \
58 --without-crypto \
59 --without-debug \
60 --without-mem-debug \
61 --without-debugger \
62 , \
63 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/libxml2" \
64 )
65 endef
66
67 define Build/Compile
68 $(MAKE) -C $(PKG_BUILD_DIR) \
69 DESTDIR="$(PKG_INSTALL_DIR)" \
70 all install
71 endef
72
73 define Build/InstallDev
74 mkdir -p $(1)/usr/bin
75 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xslt-config $(1)/usr/bin/
76 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xsltproc $(1)/usr/bin/
77 mkdir -p $(1)/usr/include
78 $(CP) $(PKG_INSTALL_DIR)/usr/include/libxslt $(1)/usr/include/
79 mkdir -p $(1)/usr/lib
80 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxslt.{a,so*} $(1)/usr/lib/
81 mkdir -p $(1)/usr/lib/pkgconfig
82 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxslt.pc $(1)/usr/lib/pkgconfig/
83 $(SED) 's,-I$$$${includedir},,g' $(1)/usr/bin/xslt-config
84 $(SED) 's,-L$$$${libdir},,g' $(1)/usr/bin/xslt-config
85 $(SED) 's,-I$(1)/usr/include,,g' $(1)/usr/bin/xslt-config
86 $(SED) 's,-L$(1)/usr/lib,,g' $(1)/usr/bin/xslt-config
87 endef
88
89 define Build/UninstallDev
90 rm -rf \
91 $(STAGING_DIR)/usr/bin/xslt-config \
92 $(STAGING_DIR)/usr/include/libxslt \
93 $(STAGING_DIR)/usr/lib/libxslt.{a,so*} \
94 $(STAGING_DIR)/usr/lib/pkgconfig/libxslt.pc
95 endef
96
97 define Package/libxslt/install
98 $(INSTALL_DIR) $(1)/usr/lib
99 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxslt.so.* $(1)/usr/lib/
100 endef
101
102 define Package/xsltproc/install
103 $(INSTALL_DIR) $(1)/usr/bin
104 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xsltproc $(1)/usr/bin/
105 endef
106
107 $(eval $(call BuildPackage,libxslt))
108 $(eval $(call BuildPackage,xsltproc))