Makefile 1.7 KB

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