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

Archive Download this file



interactive