2c75045fe502d91f6c9e8d7cd8c05956118a5965
[openwrt/svn-archive/archive.git] / libs / libreadline / 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: Makefile 5624 2006-11-23 00:29:07Z nbd $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=readline
12 PKG_VERSION:=5.2
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@GNU/readline
17 PKG_MD5SUM:=e39331f32ad14009b9ff49cc10c5e751
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libreadline
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=Command lines edition library
25 URL:=http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
26 endef
27
28 define Package/libreadline/description
29 The Readline library provides a set of functions for use by applications
30 that allow users to edit command lines as they are typed in. Both Emacs
31 and vi editing modes are available. The Readline library includes
32 additional functions to maintain a list of previously-entered command
33 lines, to recall and perhaps reedit those lines, and perform csh-like
34 history expansion on previous commands.
35 endef
36
37 define Build/Configure
38 $(call Build/Configure/Default, \
39 --enable-shared \
40 --enable-static \
41 --without-curses \
42 )
43 endef
44
45 TARGET_CPPFLAGS:=-I. -I.. $(TARGET_CPPFLAGS)
46
47 define Build/Compile
48 $(MAKE) -C $(PKG_BUILD_DIR) \
49 DESTDIR="$(PKG_INSTALL_DIR)" \
50 all install
51 endef
52
53 define Build/InstallDev
54 mkdir -p $(1)/usr/include
55 $(CP) $(PKG_INSTALL_DIR)/usr/include/readline $(1)/usr/include/
56 mkdir -p $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.{a,so*} $(1)/usr/lib/
58 endef
59
60 define Package/libreadline/install
61 $(INSTALL_DIR) $(1)/usr/lib
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.so.* $(1)/usr/lib/
63 endef
64
65 $(eval $(call BuildPackage,libreadline))