2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@GNU/ncurses
17 PKG_MD5SUM:=b6593abe1089d6aab1551c105c9300e3
19 PKG_BUILD_DEPENDS:=ncurses/host
21 include $(INCLUDE_DIR)/host-build.mk
22 include $(INCLUDE_DIR)/package.mk
24 define Package/libncurses
27 TITLE:=Terminal handling library
28 URL:=http://www.gnu.org/software/ncurses/
32 $(MAKE) -C $(HOST_BUILD_DIR) libs
36 $(MAKE) -C $(HOST_BUILD_DIR) install.progs
39 TARGET_CFLAGS += $(FPIC)
48 --without-cxx-binding \
54 --with-terminfo-dirs=/usr/share/terminfo \
55 --with-default-terminfo-dir=/usr/share/terminfo
59 $(HOST_BUILD_DIR)/ncurses/make_keys \
60 $(HOST_BUILD_DIR)/ncurses/make_hash \
61 $(PKG_BUILD_DIR)/ncurses/
62 $(MAKE) -C $(PKG_BUILD_DIR) \
63 $(TARGET_CONFIGURE_OPTS) \
64 BUILD_CC="$(TARGET_CC)" \
67 DESTDIR="$(PKG_INSTALL_DIR)" \
68 libs install.libs install.data
71 define Package/libncurses/install
72 $(INSTALL_DIR) $(1)/usr/lib
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu,form}*.so.* $(1)/usr/lib/
74 $(INSTALL_DIR) $(1)/usr/share/terminfo
75 (cd $(PKG_INSTALL_DIR)/usr/share/terminfo; \
77 [ -d "$$$$dir" ] || continue; \
78 mv $$$$dir $$$$(echo -ne "\x$$$$dir"); \
81 for file in a/ansi d/dumb l/linux r/rxvt s/screen v/vt100 v/vt102 x/xterm x/xterm-color; do \
82 $(INSTALL_DIR) $(1)/usr/share/terminfo/`dirname $$$$file`; \
83 $(CP) $(PKG_INSTALL_DIR)/usr/share/terminfo/$$$$file \
84 $(1)/usr/share/terminfo/$$$$file; \
88 define Build/InstallDev
89 mkdir -p $(1)/usr/include
90 $(CP) $(PKG_INSTALL_DIR)/usr/include/curses.h $(1)/usr/include/
91 $(CP) $(PKG_INSTALL_DIR)/usr/include/ncurses.h $(1)/usr/include/
92 $(CP) $(PKG_INSTALL_DIR)/usr/include/ncurses_dll.h $(1)/usr/include/
93 $(CP) $(PKG_INSTALL_DIR)/usr/include/menu.h $(1)/usr/include/
94 $(CP) $(PKG_INSTALL_DIR)/usr/include/panel.h $(1)/usr/include/
95 $(CP) $(PKG_INSTALL_DIR)/usr/include/term{,cap}.h $(1)/usr/include/
96 $(CP) $(PKG_INSTALL_DIR)/usr/include/unctrl.h $(1)/usr/include/
97 $(CP) $(PKG_INSTALL_DIR)/usr/include/form.h $(1)/usr/include/
98 $(CP) $(PKG_INSTALL_DIR)/usr/include/eti.h $(1)/usr/include/
100 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurses.so $(1)/usr/lib/
101 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu,form}.{a,so*} $(1)/usr/lib/
104 $(eval $(call HostBuild))
105 $(eval $(call BuildPackage,libncurses))