[package] libxslt: add InstallDev for libexslt
[openwrt/svn-archive/archive.git] / libs / libxslt / Makefile
1 #
2 # Copyright (C) 2006-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libxslt
11 PKG_VERSION:=1.1.26
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://xmlsoft.org/sources/ \
16 ftp://fr.rpmfind.net/pub/libxml/
17 PKG_MD5SUM:=e61d0364a30146aaa3001296f853b2b9
18
19 PKG_FIXUP:=libtool
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libxslt
25 SECTION:=libs
26 CATEGORY:=Libraries
27 DEPENDS:=+libxml2
28 TITLE:=Gnome XSLT library
29 URL:=http://xmlsoft.org/XSLT/
30 endef
31
32 define Package/libxslt/description
33 A library for XML transformation using XSLT.
34 endef
35
36 define Package/libexslt
37 SECTION:=libs
38 CATEGORY:=Libraries
39 DEPENDS:=+libxslt
40 TITLE:=Gnome XSLT library Extention
41 URL:=http://xmlsoft.org/XSLT/EXSLT/
42 endef
43
44 define Package/libexslt/description
45 A extention for XSLT.
46 endef
47
48 define Package/xsltproc
49 SECTION:=utils
50 CATEGORY:=Utilities
51 DEPENDS:=+libxml2 +libxslt +libexslt
52 TITLE:=Gnome XSLT xsltproc Utility
53 URL:=http://xmlsoft.org/XSLT/
54 endef
55
56 define Package/xsltproc/description
57 XSLT XML transformation utility
58 endef
59
60 CONFIGURE_ARGS+= \
61 --enable-shared \
62 --enable-static \
63 --without-python \
64 --without-crypto \
65 --without-debug \
66 --without-mem-debug \
67 --without-debugger \
68
69 TARGET_CFLAGS += $(FPIC)
70
71 define Build/InstallDev/Xslt
72 $(INSTALL_DIR) $(1)/usr/bin $(2)/bin $(1)/usr/include/libxslt \
73 $(1)/usr/include/libexslt $(1)/usr/lib \
74 $(1)/usr/lib/pkgconfig $(2)/share/aclocal
75
76 $(INSTALL_BIN) \
77 $(PKG_INSTALL_DIR)/usr/bin/xslt-config \
78 $(2)/bin/
79
80 ln -sf $(STAGING_DIR)/host/bin/xslt-config $(1)/usr/bin/xslt-config
81
82 $(SED) \
83 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
84 $(2)/bin/xslt-config
85
86 $(INSTALL_DATA) \
87 $(PKG_INSTALL_DIR)/usr/include/libxslt/* \
88 $(1)/usr/include/libxslt/
89
90 $(CP) \
91 $(PKG_INSTALL_DIR)/usr/lib/libxslt.{la,a,so*} \
92 $(1)/usr/lib/
93
94 $(INSTALL_DATA) \
95 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxslt.pc \
96 $(1)/usr/lib/pkgconfig/
97
98 $(INSTALL_DATA) \
99 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
100 $(2)/share/aclocal
101 endef
102
103 define Build/InstallDev/Exslt
104 $(INSTALL_DIR) $(1)/usr/include/libexslt $(1)/usr/lib/pkgconfig
105 $(INSTALL_DATA) \
106 $(PKG_INSTALL_DIR)/usr/include/libexslt/* \
107 $(1)/usr/include/libexslt/
108
109 $(CP) \
110 $(PKG_INSTALL_DIR)/usr/lib/libexslt.{la,a,so*} \
111 $(1)/usr/lib/
112
113 $(INSTALL_DATA) \
114 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libexslt.pc \
115 $(1)/usr/lib/pkgconfig/
116 endef
117
118 define Build/InstallDev
119 $(if $(CONFIG_PACKAGE_libxslt),$(call Build/InstallDev/Xslt,$(1)))
120 $(if $(CONFIG_PACKAGE_libexslt),$(call Build/InstallDev/Exslt,$(1)))
121 endef
122
123 define Package/libxslt/install
124 $(INSTALL_DIR) $(1)/usr/lib
125 $(CP) \
126 $(PKG_INSTALL_DIR)/usr/lib/libxslt.so.* \
127 $(1)/usr/lib/
128 endef
129
130 define Package/libexslt/install
131 $(INSTALL_DIR) $(1)/usr/lib
132 $(CP) \
133 $(PKG_INSTALL_DIR)/usr/lib/libexslt.so.* \
134 $(1)/usr/lib/
135 endef
136
137 define Package/xsltproc/install
138 $(INSTALL_DIR) $(1)/usr/bin
139 $(INSTALL_BIN) \
140 $(PKG_INSTALL_DIR)/usr/bin/xsltproc \
141 $(1)/usr/bin/
142 endef
143
144 $(eval $(call BuildPackage,libxslt))
145 $(eval $(call BuildPackage,libexslt))
146 $(eval $(call BuildPackage,xsltproc))