[packages] make libintl and libiconv stub/full implementations switchable, use the...
[packages.git] / libs / libxapian / Makefile
1 #
2 # Copyright (C) 2008-2010 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:=xapian-core
11 PKG_VERSION:=1.0.7
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://oligarchy.co.uk/xapian/$(PKG_VERSION)
16 PKG_MD5SUM:=b4acff50028120852d4a8d943065f6d2
17
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22 include $(INCLUDE_DIR)/nls.mk
23
24 define Package/libxapian
25   SECTION:=libs
26   CATEGORY:=Libraries
27   TITLE:=xapian
28   URL:=http://xapian.org
29   DEPENDS:=+libstdcpp +zlib
30 endef
31
32 define Build/InstallDev
33         $(INSTALL_DIR) $(1)/usr/share/aclocal
34         $(INSTALL_DATA) \
35                 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
36                 $(1)/usr/share/aclocal
37
38         $(INSTALL_DIR) $(1)/usr/include
39         $(INSTALL_DATA) \
40                 $(PKG_INSTALL_DIR)/usr/include/xapian.h \
41                 $(1)/usr/include
42         $(INSTALL_DIR) $(1)/usr/include/xapian
43         $(INSTALL_DATA) \
44                 $(PKG_INSTALL_DIR)/usr/include/xapian/* \
45                 $(1)/usr/include/xapian
46
47         $(INSTALL_DIR) $(1)/usr/lib/
48         $(CP) \
49                 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
50                 $(1)/usr/lib/
51         $(INSTALL_DIR) $(2)/bin
52         $(INSTALL_BIN) \
53                 $(PKG_INSTALL_DIR)/usr/bin/xapian-config \
54                 $(2)/bin
55         $(SED) 's,prefix=",prefix="$(STAGING_DIR),g' $(2)/bin/xapian-config
56
57         #FIXME: Libtool should handle this
58         if [ -f $(TOOLCHAIN_DIR)/usr/lib/libstdc++.la ]; then \
59           $(SED) \
60                 "s,$(STAGING_DIR)/usr/lib/libstdc++,$(TOOLCHAIN_DIR)/usr/lib/libstdc++,g" \
61                 $(1)/usr/lib/libxapian.la ; \
62         else \
63           $(SED) \
64                 "s,$(STAGING_DIR)/usr/lib/libstdc++,$(TOOLCHAIN_DIR)/lib/libstdc++,g" \
65                 $(1)/usr/lib/libxapian.la ; \
66         fi
67 endef
68
69 define Package/libxapian/install
70         $(INSTALL_DIR) $(1)/usr/lib/
71         $(CP) \
72                 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
73                 $(1)/usr/lib
74         $(INSTALL_DIR) $(1)/usr/bin/
75         $(INSTALL_BIN) \
76                 $(PKG_INSTALL_DIR)/usr/bin/* \
77                 $(1)/usr/bin
78 endef
79
80 $(eval $(call BuildPackage,libxapian))