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