2 # Copyright (C) 2006-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/ncurses
16 PKG_MD5SUM:=cce05daf61a64501ef6cd8da1f727ec6
20 include $(INCLUDE_DIR)/package.mk
22 define Package/libncurses
25 TITLE:=Terminal handling library
26 URL:=http://www.gnu.org/software/ncurses/
29 TARGET_CFLAGS += $(FPIC)
38 --without-cxx-binding \
44 --with-terminfo-dirs=/usr/share/terminfo \
45 --with-default-terminfo-dir=/usr/share/terminfo
48 BUILD_CC="$(HOSTCC)" \
53 define Build/Install/Default
55 $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
56 $(MAKE_INSTALL_FLAGS) \
57 $(1) install.libs install.data;
60 define Package/libncurses/install
61 $(INSTALL_DIR) $(1)/usr/lib
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{curses,ncurses,panel,menu,form}.so* $(1)/usr/lib/
63 $(INSTALL_DIR) $(1)/usr/share/terminfo
64 (cd $(PKG_INSTALL_DIR)/usr/share/terminfo; \
66 [ -d "$$$$dir" ] || continue; \
67 mv $$$$dir $$$$(echo -ne "\x$$$$dir"); \
70 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 \
71 $(INSTALL_DIR) $(1)/usr/share/terminfo/`dirname $$$$file`; \
72 $(CP) $(PKG_INSTALL_DIR)/usr/share/terminfo/$$$$file \
73 $(1)/usr/share/terminfo/$$$$file; \
77 define Build/InstallDev
78 $(INSTALL_DIR) $(1)/usr/include
79 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
81 $(INSTALL_DIR) $(1)/usr/lib
82 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{curses,ncurses,panel,menu,form}.{a,so*} $(1)/usr/lib/
85 $(eval $(call BuildPackage,libncurses))