2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
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
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/libreadline
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
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" \
46 --target
=$(GNU_TARGET_NAME
) \
47 --host
=$(GNU_TARGET_NAME
) \
48 --build
=$(GNU_HOST_NAME
) \
54 --datadir=/usr
/share \
55 --includedir=/usr
/include \
56 --infodir=/usr
/share
/info \
58 --libexecdir
=/usr
/lib \
59 --localstatedir
=/var \
60 --mandir=/usr
/share
/man \
63 $(DISABLE_LARGEFILE
) \
72 rm -rf
$(PKG_INSTALL_DIR
)
73 mkdir
-p
$(PKG_INSTALL_DIR
)
74 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
75 DESTDIR
="$(PKG_INSTALL_DIR)" \
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
/
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
/
91 define Build
/UninstallDev
93 $(STAGING_DIR
)/usr
/include/readline \
94 $(STAGING_DIR
)/usr
/lib
/lib
{history
,readline
}.
{a
,so
*}
97 $(eval
$(call BuildPackage
,libreadline
))