get rid of the ncurses host build - the only reason why it was necessary in the first...
[openwrt/staging/florian.git] / package / ncurses / Makefile
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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=ncurses
12 PKG_VERSION:=5.6
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@GNU/ncurses
17 PKG_MD5SUM:=b6593abe1089d6aab1551c105c9300e3
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libncurses
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=Terminal handling library
25 URL:=http://www.gnu.org/software/ncurses/
26 endef
27
28 TARGET_CFLAGS += $(FPIC)
29
30 CONFIGURE_ARGS += \
31 --enable-echo \
32 --enable-const \
33 --enable-overwrite \
34 --disable-rpath \
35 --without-ada \
36 --without-cxx \
37 --without-cxx-binding \
38 --without-debug \
39 --without-profile \
40 --without-progs \
41 --with-normal \
42 --with-shared \
43 --with-terminfo-dirs=/usr/share/terminfo \
44 --with-default-terminfo-dir=/usr/share/terminfo
45
46 define Build/Compile
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 $(TARGET_CONFIGURE_OPTS) \
49 BUILD_CC="$(HOSTCC)" \
50 HOSTCC="$(HOSTCC)" \
51 HOSTCCFLAGS="" \
52 DESTDIR="$(PKG_INSTALL_DIR)" \
53 libs install.libs install.data
54 endef
55
56 define Package/libncurses/install
57 $(INSTALL_DIR) $(1)/usr/lib
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu,form}*.so.* $(1)/usr/lib/
59 $(INSTALL_DIR) $(1)/usr/share/terminfo
60 (cd $(PKG_INSTALL_DIR)/usr/share/terminfo; \
61 for dir in ??; do \
62 [ -d "$$$$dir" ] || continue; \
63 mv $$$$dir $$$$(echo -ne "\x$$$$dir"); \
64 done \
65 )
66 for file in a/ansi d/dumb l/linux r/rxvt s/screen v/vt100 v/vt102 x/xterm x/xterm-color; do \
67 $(INSTALL_DIR) $(1)/usr/share/terminfo/`dirname $$$$file`; \
68 $(CP) $(PKG_INSTALL_DIR)/usr/share/terminfo/$$$$file \
69 $(1)/usr/share/terminfo/$$$$file; \
70 done
71 endef
72
73 define Build/InstallDev
74 mkdir -p $(1)/usr/include
75 $(CP) $(PKG_INSTALL_DIR)/usr/include/curses.h $(1)/usr/include/
76 $(CP) $(PKG_INSTALL_DIR)/usr/include/ncurses.h $(1)/usr/include/
77 $(CP) $(PKG_INSTALL_DIR)/usr/include/ncurses_dll.h $(1)/usr/include/
78 $(CP) $(PKG_INSTALL_DIR)/usr/include/menu.h $(1)/usr/include/
79 $(CP) $(PKG_INSTALL_DIR)/usr/include/panel.h $(1)/usr/include/
80 $(CP) $(PKG_INSTALL_DIR)/usr/include/term{,cap}.h $(1)/usr/include/
81 $(CP) $(PKG_INSTALL_DIR)/usr/include/unctrl.h $(1)/usr/include/
82 $(CP) $(PKG_INSTALL_DIR)/usr/include/form.h $(1)/usr/include/
83 $(CP) $(PKG_INSTALL_DIR)/usr/include/eti.h $(1)/usr/include/
84 mkdir -p $(1)/usr/lib
85 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurses.so $(1)/usr/lib/
86 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu,form}.{a,so*} $(1)/usr/lib/
87 endef
88
89 $(eval $(call BuildPackage,libncurses))