Merge pull request #4853 from StevenHessing/noddos
[feed/packages.git] / libs / libxslt / Makefile
1 #
2 # Copyright (C) 2014 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.28
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:= \
16 http://xmlsoft.org/sources/ \
17 ftp://fr.rpmfind.net/pub/libxml/
18 PKG_HASH:=5fc7151a57b89c03d7b825df5a0fae0a8d5f05674c0e7cf2937ecec4d54a028c
19
20 PKG_LICENSE:=MIT
21 PKG_LICENSE_FILES:=COPYING
22
23 PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
24
25 PKG_FIXUP:=autoreconf
26 PKG_INSTALL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/libxslt
31 SECTION:=libs
32 CATEGORY:=Libraries
33 DEPENDS:=+libxml2
34 TITLE:=Gnome XSLT library
35 URL:=http://xmlsoft.org/XSLT/
36 endef
37
38 define Package/libxslt/description
39 A library for XML transformation using XSLT.
40 endef
41
42 define Package/libexslt
43 SECTION:=libs
44 CATEGORY:=Libraries
45 DEPENDS:=+libxslt
46 TITLE:=Gnome XSLT library Extension
47 URL:=http://xmlsoft.org/XSLT/EXSLT/
48 endef
49
50 define Package/libexslt/description
51 An extension for XSLT.
52 endef
53
54 define Package/xsltproc
55 SECTION:=utils
56 CATEGORY:=Utilities
57 DEPENDS:=+libxml2 +libxslt +libexslt
58 TITLE:=Gnome XSLT xsltproc Utility
59 URL:=http://xmlsoft.org/XSLT/
60 endef
61
62 define Package/xsltproc/description
63 XSLT XML transformation utility.
64 endef
65
66 CONFIGURE_ARGS+= \
67 --enable-shared \
68 --enable-static \
69 --without-python \
70 --without-crypto \
71 --without-debug \
72 --without-mem-debug \
73 --without-debugger \
74
75 TARGET_CFLAGS += $(FPIC)
76
77 define Build/InstallDev/Xslt
78 $(INSTALL_DIR) $(1)/usr/bin $(2)/bin $(1)/usr/include/libxslt \
79 $(1)/usr/include/libexslt $(1)/usr/lib \
80 $(1)/usr/lib/pkgconfig $(2)/share/aclocal
81
82 $(INSTALL_BIN) \
83 $(PKG_INSTALL_DIR)/usr/bin/xslt-config \
84 $(2)/bin/
85
86 ln -sf $(STAGING_DIR)/host/bin/xslt-config $(1)/usr/bin/xslt-config
87
88 $(SED) \
89 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
90 $(2)/bin/xslt-config
91
92 $(INSTALL_DATA) \
93 $(PKG_INSTALL_DIR)/usr/include/libxslt/* \
94 $(1)/usr/include/libxslt/
95
96 $(CP) \
97 $(PKG_INSTALL_DIR)/usr/lib/libxslt.{la,a,so*} \
98 $(1)/usr/lib/
99
100 $(INSTALL_DATA) \
101 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxslt.pc \
102 $(1)/usr/lib/pkgconfig/
103
104 $(INSTALL_DATA) \
105 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
106 $(2)/share/aclocal
107 endef
108
109 define Build/InstallDev/Exslt
110 $(INSTALL_DIR) $(1)/usr/include/libexslt $(1)/usr/lib/pkgconfig
111 $(INSTALL_DATA) \
112 $(PKG_INSTALL_DIR)/usr/include/libexslt/* \
113 $(1)/usr/include/libexslt/
114
115 $(CP) \
116 $(PKG_INSTALL_DIR)/usr/lib/libexslt.{la,a,so*} \
117 $(1)/usr/lib/
118
119 $(INSTALL_DATA) \
120 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libexslt.pc \
121 $(1)/usr/lib/pkgconfig/
122 endef
123
124 define Build/InstallDev
125 $(if $(CONFIG_PACKAGE_libxslt),$(call Build/InstallDev/Xslt,$(1),$(2)))
126 $(if $(CONFIG_PACKAGE_libexslt),$(call Build/InstallDev/Exslt,$(1),$(2)))
127 endef
128
129 define Package/libxslt/install
130 $(INSTALL_DIR) $(1)/usr/lib
131 $(CP) \
132 $(PKG_INSTALL_DIR)/usr/lib/libxslt.so.* \
133 $(1)/usr/lib/
134 endef
135
136 define Package/libexslt/install
137 $(INSTALL_DIR) $(1)/usr/lib
138 $(CP) \
139 $(PKG_INSTALL_DIR)/usr/lib/libexslt.so.* \
140 $(1)/usr/lib/
141 endef
142
143 define Package/xsltproc/install
144 $(INSTALL_DIR) $(1)/usr/bin
145 $(INSTALL_BIN) \
146 $(PKG_INSTALL_DIR)/usr/bin/xsltproc \
147 $(1)/usr/bin/
148 endef
149
150 $(eval $(call BuildPackage,libxslt))
151 $(eval $(call BuildPackage,libexslt))
152 $(eval $(call BuildPackage,xsltproc))