Makefile 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #
  2. # Copyright (C) 2006-2014 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.3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@GNU/readline
  13. PKG_MD5SUM:=33c8fb279e981274f485fd91da77e94a
  14. PKG_LICENSE:=GPL-3.0
  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. bash_cv_wcwidth_broken=no \
  39. bash_cv_func_sigsetjmp=yes \
  40. )
  41. endef
  42. TARGET_CPPFLAGS:=-I. -I.. $(TARGET_CPPFLAGS)
  43. TARGET_CFLAGS += $(FPIC)
  44. define Build/Compile
  45. $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  46. DESTDIR="$(PKG_INSTALL_DIR)" \
  47. all install
  48. endef
  49. define Build/InstallDev
  50. $(INSTALL_DIR) $(1)/usr/include
  51. $(CP) $(PKG_INSTALL_DIR)/usr/include/readline $(1)/usr/include/
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.{a,so,so.6,so.6.3} $(1)/usr/lib/
  54. endef
  55. define Package/libreadline/install
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.{so,so.6,so.6.3} $(1)/usr/lib/
  58. endef
  59. $(eval $(call BuildPackage,libreadline))