Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #
  2. # Copyright (C) 2006-2010 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:=ncurses
  9. PKG_VERSION:=5.7
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@GNU/ncurses
  13. PKG_MD5SUM:=cce05daf61a64501ef6cd8da1f727ec6
  14. PKG_INSTALL:=1
  15. include $(INCLUDE_DIR)/package.mk
  16. define Package/libncurses
  17. SECTION:=libs
  18. CATEGORY:=Libraries
  19. TITLE:=Terminal handling library
  20. URL:=http://www.gnu.org/software/ncurses/
  21. endef
  22. TARGET_CFLAGS += $(FPIC)
  23. CONFIGURE_ARGS += \
  24. --enable-echo \
  25. --enable-const \
  26. --enable-overwrite \
  27. --disable-rpath \
  28. --without-ada \
  29. --without-cxx \
  30. --without-cxx-binding \
  31. --without-debug \
  32. --without-profile \
  33. --without-progs \
  34. --with-normal \
  35. --with-shared \
  36. --with-terminfo-dirs=/usr/share/terminfo \
  37. --with-default-terminfo-dir=/usr/share/terminfo
  38. MAKE_FLAGS += \
  39. BUILD_CC="$(HOSTCC)" \
  40. HOSTCC="$(HOSTCC)" \
  41. HOSTCCFLAGS="" \
  42. libs
  43. define Build/Install/Default
  44. $(MAKE_VARS) \
  45. $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
  46. $(MAKE_INSTALL_FLAGS) \
  47. $(1) install.libs install.data;
  48. endef
  49. define Package/libncurses/install
  50. $(INSTALL_DIR) $(1)/usr/lib
  51. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{curses,ncurses,panel,menu,form}.so* $(1)/usr/lib/
  52. $(INSTALL_DIR) $(1)/usr/share/terminfo
  53. (cd $(PKG_INSTALL_DIR)/usr/share/terminfo; \
  54. for dir in ??; do \
  55. [ -d "$$$$dir" ] || continue; \
  56. mv $$$$dir $$$$(echo -ne "\x$$$$dir"); \
  57. done \
  58. )
  59. for file in a/ansi d/dumb l/linux r/rxvt r/rxvt-unicode s/screen v/vt100 v/vt102 x/xterm x/xterm-color; do \
  60. $(INSTALL_DIR) $(1)/usr/share/terminfo/`dirname $$$$file`; \
  61. $(CP) $(PKG_INSTALL_DIR)/usr/share/terminfo/$$$$file \
  62. $(1)/usr/share/terminfo/$$$$file; \
  63. done
  64. endef
  65. define Build/InstallDev
  66. $(INSTALL_DIR) $(1)/usr/include
  67. $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
  68. $(INSTALL_DIR) $(1)/usr/lib
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{curses,ncurses,panel,menu,form}.{a,so*} $(1)/usr/lib/
  70. endef
  71. $(eval $(call BuildPackage,libncurses))