Makefile 1.8 KB

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