Root/package/ncurses/Makefile

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

Archive Download this file



interactive