Makefile 1.9 KB

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