lars d4afeef0ba Add libxapian and python-xapian packages.
git-svn-id: svn://svn.openwrt.org/openwrt/packages@12563 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-09-09 20:26:46 +00:00

81 lines
1.7 KiB
Makefile

#
# Copyright (C) 2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id:
include $(TOPDIR)/rules.mk
PKG_NAME:=xapian-core
PKG_VERSION:=1.0.7
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://oligarchy.co.uk/xapian/$(PKG_VERSION)
PKG_FIXUP:=libtool
include $(INCLUDE_DIR)/package.mk
PKG_INSTALL=1
EXTRA_LDFLAGS+= \
-L$(STAGING_DIR)/usr/lib/libintl/lib \
-L$(STAGING_DIR)/usr/lib/libiconv/lib \
-L$(TOOLCHAIN_DIR)/lib
define Package/libxapian
SECTION:=lib
CATEGORY:=Libraries
TITLE:=xapian
URL:=http://xapian.org
DEPENDS:=+libstdcpp
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/share/aclocal
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/share/aclocal/* \
$(1)/usr/share/aclocal
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/include/xapian.h \
$(1)/usr/include
$(INSTALL_DIR) $(1)/usr/include/xapian
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/include/xapian/* \
$(1)/usr/include/xapian
$(INSTALL_DIR) $(1)/usr/lib/
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/lib/*.{so*,la} \
$(1)/usr/lib/
$(INSTALL_DIR) $(2)/bin
$(INSTALL_BIN) \
$(PKG_INSTALL_DIR)/usr/bin/xapian-config \
$(2)/bin
$(SED) 's,prefix=",prefix="$(STAGING_DIR),g' $(2)/bin/xapian-config
#FIXME: Libtool should handle this
$(SED) \
"s,$(STAGING_DIR)/usr/lib/libstdc++,$(TOOLCHAIN_DIR)/lib/libstdc++,g" \
$(1)/usr/lib/libxapian.la
endef
define Package/libxapian/install
$(INSTALL_DIR) $(1)/usr/lib/
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} \
$(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/bin/
$(INSTALL_BIN) \
$(PKG_INSTALL_DIR)/usr/bin/* \
$(1)/usr/bin
endef
$(eval $(call BuildPackage,libxapian))