Root/package/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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=readline
11PKG_VERSION:=6.2
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=@GNU/readline
16PKG_MD5SUM:=67948acb2ca081f23359d0256e9a271c
17
18PKG_LICENSE:=GPLv3
19PKG_LICENSE_FILES:=COPYING
20
21PKG_BUILD_PARALLEL:=1
22
23include $(INCLUDE_DIR)/package.mk
24
25define 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
30endef
31
32define 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.
39endef
40
41define 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    )
48endef
49
50TARGET_CPPFLAGS:=-I. -I.. $(TARGET_CPPFLAGS)
51
52TARGET_CFLAGS += $(FPIC)
53
54define Build/Compile
55    $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
56        DESTDIR="$(PKG_INSTALL_DIR)" \
57        all install
58endef
59
60define Build/InstallDev
61    $(INSTALL_DIR) $(1)/usr/include
62    $(CP) $(PKG_INSTALL_DIR)/usr/include/readline $(1)/usr/include/
63    $(INSTALL_DIR) $(1)/usr/lib
64    $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.{a,so,so.6,so.6.2} $(1)/usr/lib/
65endef
66
67define Package/libreadline/install
68    $(INSTALL_DIR) $(1)/usr/lib
69    $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.{so,so.6,so.6.2} $(1)/usr/lib/
70endef
71
72$(eval $(call BuildPackage,libreadline))
73

Archive Download this file



interactive