use Build/Configure/Default macro, Makefile cleanup
[openwrt/svn-archive/archive.git] / libs / readline / 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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=readline
12 PKG_VERSION:=5.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@GNU/readline
17 PKG_MD5SUM:=7ee5a692db88b30ca48927a13fd60e46
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
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 DESCRIPTION:=\
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
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 define Build/Compile
48 $(MAKE) -C $(PKG_BUILD_DIR) \
49 DESTDIR="$(PKG_INSTALL_DIR)" \
50 all install
51 endef
52
53 define Build/InstallDev
54 mkdir -p $(STAGING_DIR)/usr/include
55 $(CP) $(PKG_INSTALL_DIR)/usr/include/readline $(STAGING_DIR)/usr/include/
56 mkdir -p $(STAGING_DIR)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.{a,so*} $(STAGING_DIR)/usr/lib/
58 endef
59
60 define Build/UninstallDev
61 rm -rf \
62 $(STAGING_DIR)/usr/include/readline \
63 $(STAGING_DIR)/usr/lib/lib{history,readline}.{a,so*}
64 endef
65
66 define Package/libreadline/install
67 install -d -m0755 $(1)/usr/lib
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.so.* $(1)/usr/lib/
69 endef
70
71 $(eval $(call BuildPackage,libreadline))