89f1e747af97884a59217864369b8e0f4ce7c453
[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_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://xmlsoft.org/sources/ \
18 ftp://fr.rpmfind.net/pub/libxml/
19 PKG_MD5SUM:=db71660bb7d01ccd4e6be990af8d813b
20 PKG_CAT:=zcat
21
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:=A library for XML transformation using XSLT.
32 URL:=http://xmlsoft.org/XSLT/
33 endef
34
35 define Build/Configure
36 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
37 $(TARGET_CONFIGURE_OPTS) \
38 CFLAGS="$(strip $(TARGET_CFLAGS))" \
39 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/libxml2" \
40 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
41 ./configure \
42 --target=$(GNU_TARGET_NAME) \
43 --host=$(GNU_TARGET_NAME) \
44 --build=$(GNU_HOST_NAME) \
45 --program-prefix="" \
46 --program-suffix="" \
47 --prefix=/usr \
48 --exec-prefix=/usr \
49 --bindir=/usr/bin \
50 --datadir=/usr/share \
51 --includedir=/usr/include \
52 --infodir=/usr/share/info \
53 --libdir=/usr/lib \
54 --libexecdir=/usr/lib \
55 --localstatedir=/var \
56 --mandir=/usr/share/man \
57 --sbindir=/usr/sbin \
58 --sysconfdir=/etc \
59 $(DISABLE_LARGEFILE) \
60 $(DISABLE_NLS) \
61 --enable-shared \
62 --enable-static \
63 --disable-rpath \
64 --with-gnu-ld \
65 --with-libxml-prefix="$(STAGING_DIR)/usr" \
66 --with-libxml-include-prefix="$(STAGING_DIR)/usr/include" \
67 --with-libxml-libs-prefix="$(STAGING_DIR)/usr/lib" \
68 --without-python \
69 --without-crypto \
70 --without-debug \
71 --without-mem-debug \
72 --without-debugger \
73 );
74 endef
75
76 define Build/Compile
77 rm -rf $(PKG_INSTALL_DIR)
78 mkdir -p $(PKG_INSTALL_DIR)
79 $(MAKE) -C $(PKG_BUILD_DIR) \
80 DESTDIR="$(PKG_INSTALL_DIR)" \
81 all install
82 endef
83
84 define Package/libxslt/install
85 install -m0755 -d $(1)/usr/lib
86 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxslt.so.* $(1)/usr/lib/
87 endef
88
89 define Build/InstallDev
90 mkdir -p $(STAGING_DIR)/usr/bin
91 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xslt-config $(STAGING_DIR)/usr/bin/
92 mkdir -p $(STAGING_DIR)/usr/include
93 $(CP) $(PKG_INSTALL_DIR)/usr/include/libxslt $(STAGING_DIR)/usr/include/
94 mkdir -p $(STAGING_DIR)/usr/lib
95 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxslt.{a,so*} $(STAGING_DIR)/usr/lib/
96 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
97 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxslt.pc $(STAGING_DIR)/usr/lib/pkgconfig/
98 $(SED) 's,-I$$$${includedir},,g' $(STAGING_DIR)/usr/bin/xslt-config
99 $(SED) 's,-I$(STAGING_DIR)/usr/include,,g' $(STAGING_DIR)/usr/bin/xslt-config
100 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/bin/xslt-config
101 $(SED) 's,-L$(STAGING_DIR)/usr/lib,,g' $(STAGING_DIR)/usr/bin/xslt-config
102 endef
103
104 define Build/UninstallDev
105 rm -rf \
106 $(STAGING_DIR)/usr/bin/xslt-config \
107 $(STAGING_DIR)/usr/include/libxslt \
108 $(STAGING_DIR)/usr/lib/libxslt.{a,so*} \
109 $(STAGING_DIR)/usr/lib/pkgconfig/libxslt.pc
110 endef
111
112 $(eval $(call BuildPackage,libxslt))