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