2
0

Makefile 1.7 KB

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