a9e6a221638f4ec647cebd4c3abb7f23956261be
[openwrt/staging/mkresin.git] / package / libs / libreadline / Makefile
1 #
2 # Copyright (C) 2006-2014 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:=readline
11 PKG_VERSION:=6.3
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/readline
16 PKG_MD5SUM:=33c8fb279e981274f485fd91da77e94a
17
18 PKG_LICENSE:=GPL-3.0
19 PKG_LICENSE_FILES:=COPYING
20
21 PKG_BUILD_PARALLEL:=1
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 URL:=http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
30 endef
31
32 define Package/libreadline/description
33 The Readline library provides a set of functions for use by applications
34 that allow users to edit command lines as they are typed in. Both Emacs
35 and vi editing modes are available. The Readline library includes
36 additional functions to maintain a list of previously-entered command
37 lines, to recall and perhaps reedit those lines, and perform csh-like
38 history expansion on previous commands.
39 endef
40
41 define Build/Configure
42 $(CP) $(SCRIPT_DIR)/config.guess $(SCRIPT_DIR)/config.sub $(PKG_BUILD_DIR)/support/
43 $(call Build/Configure/Default, \
44 --enable-shared \
45 --enable-static \
46 --without-curses \
47 bash_cv_wcwidth_broken=no \
48 bash_cv_func_sigsetjmp=yes \
49 )
50 endef
51
52 TARGET_CPPFLAGS:=-I. -I.. $(TARGET_CPPFLAGS)
53
54 TARGET_CFLAGS += $(FPIC)
55
56 define Build/Compile
57 $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
58 DESTDIR="$(PKG_INSTALL_DIR)" \
59 all install
60 endef
61
62 define Build/InstallDev
63 $(INSTALL_DIR) $(1)/usr/include
64 $(CP) $(PKG_INSTALL_DIR)/usr/include/readline $(1)/usr/include/
65 $(INSTALL_DIR) $(1)/usr/lib
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.{a,so,so.6,so.6.3} $(1)/usr/lib/
67 endef
68
69 define Package/libreadline/install
70 $(INSTALL_DIR) $(1)/usr/lib
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.{so,so.6,so.6.3} $(1)/usr/lib/
72 endef
73
74 $(eval $(call BuildPackage,libreadline))