2 # Copyright (C) 2008-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://oligarchy.co.uk/xapian/$(PKG_VERSION)
18 include $(INCLUDE_DIR)/package.mk
23 -L$(STAGING_DIR)/usr/lib/libintl/lib \
24 -L$(STAGING_DIR)/usr/lib/libiconv/lib \
26 define Package/libxapian
30 URL:=http://xapian.org
34 define Build/InstallDev
35 $(INSTALL_DIR) $(1)/usr/share/aclocal
37 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
38 $(1)/usr/share/aclocal
40 $(INSTALL_DIR) $(1)/usr/include
42 $(PKG_INSTALL_DIR)/usr/include/xapian.h \
44 $(INSTALL_DIR) $(1)/usr/include/xapian
46 $(PKG_INSTALL_DIR)/usr/include/xapian/* \
47 $(1)/usr/include/xapian
49 $(INSTALL_DIR) $(1)/usr/lib/
51 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
53 $(INSTALL_DIR) $(2)/bin
55 $(PKG_INSTALL_DIR)/usr/bin/xapian-config \
57 $(SED) 's,prefix=",prefix="$(STAGING_DIR),g' $(2)/bin/xapian-config
59 #FIXME: Libtool should handle this
60 if [ -f $(TOOLCHAIN_DIR)/usr/lib/libstdc++.la ]; then \
62 "s,$(STAGING_DIR)/usr/lib/libstdc++,$(TOOLCHAIN_DIR)/usr/lib/libstdc++,g" \
63 $(1)/usr/lib/libxapian.la ; \
66 "s,$(STAGING_DIR)/usr/lib/libstdc++,$(TOOLCHAIN_DIR)/lib/libstdc++,g" \
67 $(1)/usr/lib/libxapian.la ; \
71 define Package/libxapian/install
72 $(INSTALL_DIR) $(1)/usr/lib/
74 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
76 $(INSTALL_DIR) $(1)/usr/bin/
78 $(PKG_INSTALL_DIR)/usr/bin/* \
82 $(eval $(call BuildPackage,libxapian))