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