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 DESCRIPTION
:=Terminal handling library
26 URL
:=http
://www.gnu.org
/software
/ncurses
/
29 define Build
/Configure
33 rm -rf
$(PKG_INSTALL_DIR
)
34 mkdir
-p
$(PKG_INSTALL_DIR
)
35 -$(MAKE
) -C
$(PKG_BUILD_DIR
) distclean
36 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
39 --target
=$(GNU_HOST_NAME
) \
40 --host
=$(GNU_HOST_NAME
) \
41 --build
=$(GNU_HOST_NAME
) \
47 --datadir=/usr
/share \
48 --includedir=/usr
/include \
49 --infodir=/usr
/share
/info \
51 --libexecdir
=/usr
/lib \
52 --localstatedir
=/var \
53 --mandir=/usr
/share
/man \
57 $(DISABLE_LARGEFILE
) \
64 --without-cxx-binding \
70 --with-terminfo-dirs
=/usr
/share
/terminfo \
71 --with-default-terminfo-dir
=/usr
/share
/terminfo \
73 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
74 DESTDIR
="$(PKG_INSTALL_DIR)" \
76 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
77 $(TARGET_CONFIGURE_OPTS
) \
78 CFLAGS
="$(TARGET_CFLAGS)" \
79 CPPFLAGS
="$(TARGET_CPPFLAGS)" \
80 LDFLAGS
="$(TARGET_LDFLAGS)" \
82 --target
=$(GNU_TARGET_NAME
) \
83 --host
=$(GNU_TARGET_NAME
) \
84 --build
=$(GNU_HOST_NAME
) \
90 --datadir=/usr
/share \
91 --includedir=/usr
/include \
92 --infodir=/usr
/share
/info \
94 --libexecdir
=/usr
/lib \
95 --localstatedir
=/var \
96 --mandir=/usr
/share
/man \
100 $(DISABLE_LARGEFILE
) \
107 --without-cxx-binding \
113 --with-terminfo-dirs
=/usr
/share
/terminfo \
114 --with-default-terminfo-dir
=/usr
/share
/terminfo \
116 rm -f
$(PKG_BUILD_DIR
)/lib
/lib
*
117 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
118 $(TARGET_CONFIGURE_OPTS
) \
119 BUILD_CC
="$(TARGET_CC)" \
122 DESTDIR
="$(PKG_INSTALL_DIR)" \
123 libs
install.libs
install.data
126 define Package
/libncurses
/install
127 $(INSTALL_DIR
) $(1)/usr
/lib
128 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{ncurses
,panel
,menu
,form
}*.so.
* $(1)/usr
/lib
/
129 $(INSTALL_DIR
) $(1)/usr
/share
/terminfo
130 (cd
$(PKG_INSTALL_DIR
)/usr
/share
/terminfo
; \
132 [ -d
"$$$$dir" ] || continue
; \
133 mv
$$$$dir $$$$(echo
-ne
"\x$$$$dir"); \
136 for file in a
/ansi d
/dumb l
/linux r
/rxvt s
/screen v
/vt100 v
/vt102 x
/xterm x
/xterm-color
; do \
137 $(INSTALL_DIR
) $(1)/usr
/share
/terminfo
/`dirname $$$$file`; \
138 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/terminfo
/$$$$file \
139 $(1)/usr
/share
/terminfo
/$$$$file; \
143 define Build
/InstallDev
144 mkdir
-p
$(STAGING_DIR
)/usr
/include
145 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/curses.h
$(STAGING_DIR
)/usr
/include/
146 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/ncurses.h
$(STAGING_DIR
)/usr
/include/
147 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/ncurses_dll.h
$(STAGING_DIR
)/usr
/include/
148 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/menu.h
$(STAGING_DIR
)/usr
/include/
149 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/panel.h
$(STAGING_DIR
)/usr
/include/
150 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/term
{,cap
}.h
$(STAGING_DIR
)/usr
/include/
151 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/unctrl.h
$(STAGING_DIR
)/usr
/include/
152 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/form.h
$(STAGING_DIR
)/usr
/include/
153 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/eti.h
$(STAGING_DIR
)/usr
/include/
154 mkdir
-p
$(STAGING_DIR
)/usr
/lib
155 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcurses.so
$(STAGING_DIR
)/usr
/lib
/
156 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{ncurses
,panel
,menu
,form
}.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
159 define Build
/UninstallDev
161 $(STAGING_DIR
)/usr
/include/curses.h \
162 $(STAGING_DIR
)/usr
/include/ncurses.h \
163 $(STAGING_DIR
)/usr
/include/ncurses_dll.h \
164 $(STAGING_DIR
)/usr
/include/menu.h \
165 $(STAGING_DIR
)/usr
/include/panel.h \
166 $(STAGING_DIR
)/usr
/include/term
{,cap
}.h \
167 $(STAGING_DIR
)/usr
/include/unctrl.h \
168 $(STAGING_DIR
)/usr
/include/form.h \
169 $(STAGING_DIR
)/usr
/include/eti.h \
170 $(STAGING_DIR
)/usr
/lib
/libcurses.so \
171 $(STAGING_DIR
)/usr
/lib
/lib
{ncurses
,panel
,menu
,form
}.
{a
,so
*}
174 $(eval
$(call BuildPackage
,libncurses
))