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 include $(INCLUDE_DIR
)/package.mk
21 define Package
/libncurses
24 TITLE
:=Terminal handling library
25 URL
:=http
://www.gnu.org
/software
/ncurses
/
28 define Build
/Configure
32 rm -rf
$(PKG_INSTALL_DIR
)
33 mkdir
-p
$(PKG_INSTALL_DIR
)
34 -$(MAKE
) -C
$(PKG_BUILD_DIR
) distclean
35 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
38 --target
=$(GNU_HOST_NAME
) \
39 --host
=$(GNU_HOST_NAME
) \
40 --build
=$(GNU_HOST_NAME
) \
46 --datadir=/usr
/share \
47 --includedir=/usr
/include \
48 --infodir=/usr
/share
/info \
50 --libexecdir
=/usr
/lib \
51 --localstatedir
=/var \
52 --mandir=/usr
/share
/man \
56 $(DISABLE_LARGEFILE
) \
63 --without-cxx-binding \
69 --with-terminfo-dirs
=/usr
/share
/terminfo \
70 --with-default-terminfo-dir
=/usr
/share
/terminfo \
72 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
73 DESTDIR
="$(PKG_INSTALL_DIR)" \
75 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
76 $(TARGET_CONFIGURE_OPTS
) \
77 CFLAGS
="$(TARGET_CFLAGS)" \
78 CPPFLAGS
="$(TARGET_CPPFLAGS)" \
79 LDFLAGS
="$(TARGET_LDFLAGS)" \
81 --target
=$(GNU_TARGET_NAME
) \
82 --host
=$(GNU_TARGET_NAME
) \
83 --build
=$(GNU_HOST_NAME
) \
89 --datadir=/usr
/share \
90 --includedir=/usr
/include \
91 --infodir=/usr
/share
/info \
93 --libexecdir
=/usr
/lib \
94 --localstatedir
=/var \
95 --mandir=/usr
/share
/man \
99 $(DISABLE_LARGEFILE
) \
106 --without-cxx-binding \
112 --with-terminfo-dirs
=/usr
/share
/terminfo \
113 --with-default-terminfo-dir
=/usr
/share
/terminfo \
115 rm -f
$(PKG_BUILD_DIR
)/lib
/lib
*
116 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
117 $(TARGET_CONFIGURE_OPTS
) \
118 BUILD_CC
="$(TARGET_CC)" \
121 DESTDIR
="$(PKG_INSTALL_DIR)" \
122 libs
install.libs
install.data
125 define Package
/libncurses
/install
126 $(INSTALL_DIR
) $(1)/usr
/lib
127 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{ncurses
,panel
,menu
,form
}*.so.
* $(1)/usr
/lib
/
128 $(INSTALL_DIR
) $(1)/usr
/share
/terminfo
129 (cd
$(PKG_INSTALL_DIR
)/usr
/share
/terminfo
; \
131 [ -d
"$$$$dir" ] || continue
; \
132 mv
$$$$dir $$$$(echo
-ne
"\x$$$$dir"); \
135 for file in a
/ansi d
/dumb l
/linux r
/rxvt s
/screen v
/vt100 v
/vt102 x
/xterm x
/xterm-color
; do \
136 $(INSTALL_DIR
) $(1)/usr
/share
/terminfo
/`dirname $$$$file`; \
137 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/terminfo
/$$$$file \
138 $(1)/usr
/share
/terminfo
/$$$$file; \
142 define Build
/InstallDev
143 mkdir
-p
$(1)/usr
/include
144 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/curses.h
$(1)/usr
/include/
145 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/ncurses.h
$(1)/usr
/include/
146 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/ncurses_dll.h
$(1)/usr
/include/
147 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/menu.h
$(1)/usr
/include/
148 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/panel.h
$(1)/usr
/include/
149 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/term
{,cap
}.h
$(1)/usr
/include/
150 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/unctrl.h
$(1)/usr
/include/
151 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/form.h
$(1)/usr
/include/
152 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/eti.h
$(1)/usr
/include/
153 mkdir
-p
$(1)/usr
/lib
154 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcurses.so
$(1)/usr
/lib
/
155 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{ncurses
,panel
,menu
,form
}.
{a
,so
*} $(1)/usr
/lib
/
158 $(eval
$(call BuildPackage
,libncurses
))