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