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
31 TARGET_CFLAGS
+= $(FPIC
)
34 rm -rf
$(PKG_INSTALL_DIR
)
35 mkdir
-p
$(PKG_INSTALL_DIR
)
36 -$(MAKE
) -C
$(PKG_BUILD_DIR
) distclean
37 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
40 --target
=$(GNU_HOST_NAME
) \
41 --host
=$(GNU_HOST_NAME
) \
42 --build
=$(GNU_HOST_NAME
) \
48 --datadir=/usr
/share \
49 --includedir=/usr
/include \
50 --infodir=/usr
/share
/info \
52 --libexecdir
=/usr
/lib \
53 --localstatedir
=/var \
54 --mandir=/usr
/share
/man \
58 $(DISABLE_LARGEFILE
) \
65 --without-cxx-binding \
71 --with-terminfo-dirs
=/usr
/share
/terminfo \
72 --with-default-terminfo-dir
=/usr
/share
/terminfo \
74 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
75 DESTDIR
="$(PKG_INSTALL_DIR)" \
77 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
78 $(TARGET_CONFIGURE_OPTS
) \
79 CFLAGS
="$(TARGET_CFLAGS)" \
80 CPPFLAGS
="$(TARGET_CPPFLAGS)" \
81 LDFLAGS
="$(TARGET_LDFLAGS)" \
83 --target
=$(GNU_TARGET_NAME
) \
84 --host
=$(GNU_TARGET_NAME
) \
85 --build
=$(GNU_HOST_NAME
) \
91 --datadir=/usr
/share \
92 --includedir=/usr
/include \
93 --infodir=/usr
/share
/info \
95 --libexecdir
=/usr
/lib \
96 --localstatedir
=/var \
97 --mandir=/usr
/share
/man \
101 $(DISABLE_LARGEFILE
) \
108 --without-cxx-binding \
114 --with-terminfo-dirs
=/usr
/share
/terminfo \
115 --with-default-terminfo-dir
=/usr
/share
/terminfo \
117 rm -f
$(PKG_BUILD_DIR
)/lib
/lib
*
118 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
119 $(TARGET_CONFIGURE_OPTS
) \
120 BUILD_CC
="$(TARGET_CC)" \
123 DESTDIR
="$(PKG_INSTALL_DIR)" \
124 libs
install.libs
install.data
127 define Package
/libncurses
/install
128 $(INSTALL_DIR
) $(1)/usr
/lib
129 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{ncurses
,panel
,menu
,form
}*.so.
* $(1)/usr
/lib
/
130 $(INSTALL_DIR
) $(1)/usr
/share
/terminfo
131 (cd
$(PKG_INSTALL_DIR
)/usr
/share
/terminfo
; \
133 [ -d
"$$$$dir" ] || continue
; \
134 mv
$$$$dir $$$$(echo
-ne
"\x$$$$dir"); \
137 for file in a
/ansi d
/dumb l
/linux r
/rxvt s
/screen v
/vt100 v
/vt102 x
/xterm x
/xterm-color
; do \
138 $(INSTALL_DIR
) $(1)/usr
/share
/terminfo
/`dirname $$$$file`; \
139 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/terminfo
/$$$$file \
140 $(1)/usr
/share
/terminfo
/$$$$file; \
144 define Build
/InstallDev
145 mkdir
-p
$(1)/usr
/include
146 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/curses.h
$(1)/usr
/include/
147 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/ncurses.h
$(1)/usr
/include/
148 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/ncurses_dll.h
$(1)/usr
/include/
149 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/menu.h
$(1)/usr
/include/
150 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/panel.h
$(1)/usr
/include/
151 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/term
{,cap
}.h
$(1)/usr
/include/
152 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/unctrl.h
$(1)/usr
/include/
153 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/form.h
$(1)/usr
/include/
154 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/eti.h
$(1)/usr
/include/
155 mkdir
-p
$(1)/usr
/lib
156 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcurses.so
$(1)/usr
/lib
/
157 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{ncurses
,panel
,menu
,form
}.
{a
,so
*} $(1)/usr
/lib
/
160 $(eval
$(call BuildPackage
,libncurses
))