Port palantir to -ng
[openwrt/svn-archive/archive.git] / libs / readline / Makefile
1 #
2 # Copyright (C) 2006 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:=readline
12 PKG_VERSION:=5.1
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=@GNU/readline
18 PKG_MD5SUM:=7ee5a692db88b30ca48927a13fd60e46
19 PKG_CAT:=zcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libreadline
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=Command lines edition library
29 DESCRIPTION:=Command lines edition library\\\
30 The Readline library provides a set of functions for use by applications \\\
31 that allow users to edit command lines as they are typed in. Both Emacs \\\
32 and vi editing modes are available. The Readline library includes \\\
33 additional functions to maintain a list of previously-entered command \\\
34 lines, to recall and perhaps reedit those lines, and perform csh-like \\\
35 history expansion on previous commands.
36 URL:=http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
37 endef
38
39 define Build/Configure
40 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
41 $(TARGET_CONFIGURE_OPTS) \
42 CFLAGS="$(strip $(TARGET_CFLAGS))" \
43 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
44 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
45 ./configure \
46 --target=$(GNU_TARGET_NAME) \
47 --host=$(GNU_TARGET_NAME) \
48 --build=$(GNU_HOST_NAME) \
49 --program-prefix="" \
50 --program-suffix="" \
51 --prefix=/usr \
52 --exec-prefix=/usr \
53 --bindir=/usr/bin \
54 --datadir=/usr/share \
55 --includedir=/usr/include \
56 --infodir=/usr/share/info \
57 --libdir=/usr/lib \
58 --libexecdir=/usr/lib \
59 --localstatedir=/var \
60 --mandir=/usr/share/man \
61 --sbindir=/usr/sbin \
62 --sysconfdir=/etc \
63 $(DISABLE_LARGEFILE) \
64 $(DISABLE_NLS) \
65 --enable-shared \
66 --enable-static \
67 --without-curses \
68 );
69 endef
70
71 define Build/Compile
72 rm -rf $(PKG_INSTALL_DIR)
73 mkdir -p $(PKG_INSTALL_DIR)
74 $(MAKE) -C $(PKG_BUILD_DIR) \
75 DESTDIR="$(PKG_INSTALL_DIR)" \
76 all install
77 endef
78
79 define Package/libreadline/install
80 install -m0755 -d $(1)/usr/lib
81 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.so.* $(1)/usr/lib/
82 endef
83
84 define Build/InstallDev
85 mkdir -p $(STAGING_DIR)/usr/include
86 $(CP) $(PKG_INSTALL_DIR)/usr/include/readline $(STAGING_DIR)/usr/include/
87 mkdir -p $(STAGING_DIR)/usr/lib
88 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.{a,so*} $(STAGING_DIR)/usr/lib/
89 endef
90
91 define Build/UninstallDev
92 rm -rf \
93 $(STAGING_DIR)/usr/include/readline \
94 $(STAGING_DIR)/usr/lib/lib{history,readline}.{a,so*}
95 endef
96
97 $(eval $(call BuildPackage,libreadline))