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_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
17 PKG_SOURCE_URL
:=@GNU
/ncurses
18 PKG_MD5SUM
:=464d6a49010cf2a6eb9ce59a264d4d47
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/libncurses
28 TITLE
:=Terminal handling library
29 DESCRIPTION
:=Terminal handling library
30 URL
:=http
://www.gnu.org
/software
/ncurses
/
33 define Build
/Configure
37 rm -rf
$(PKG_INSTALL_DIR
)
38 mkdir
-p
$(PKG_INSTALL_DIR
)
39 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
41 --target
=$(GNU_HOST_NAME
) \
42 --host
=$(GNU_HOST_NAME
) \
43 --build
=$(GNU_HOST_NAME
) \
49 --datadir=/usr
/share \
50 --includedir=/usr
/include \
51 --infodir=/usr
/share
/info \
53 --libexecdir
=/usr
/lib \
54 --localstatedir
=/var \
55 --mandir=/usr
/share
/man \
59 $(DISABLE_LARGEFILE
) \
66 --without-cxx-binding \
72 --with-terminfo-dirs
=/usr
/share
/terminfo \
73 --with-default-terminfo-dir
=/usr
/share
/terminfo \
75 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
76 DESTDIR
="$(PKG_INSTALL_DIR)" \
78 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
79 $(TARGET_CONFIGURE_OPTS
) \
80 CFLAGS
="$(TARGET_CFLAGS)" \
81 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
82 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
83 ac_cv_linux_vers
="2" \
85 --target
=$(GNU_TARGET_NAME
) \
86 --host
=$(GNU_TARGET_NAME
) \
87 --build
=$(GNU_HOST_NAME
) \
93 --datadir=/usr
/share \
94 --includedir=/usr
/include \
95 --infodir=/usr
/share
/info \
97 --libexecdir
=/usr
/lib \
98 --localstatedir
=/var \
99 --mandir=/usr
/share
/man \
100 --sbindir
=/usr
/sbin \
103 $(DISABLE_LARGEFILE
) \
110 --without-cxx-binding \
116 --with-terminfo-dirs
=/usr
/share
/terminfo \
117 --with-default-terminfo-dir
=/usr
/share
/terminfo \
119 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
120 $(TARGET_CONFIGURE_OPTS
) \
121 BUILD_CC
="$(TARGET_CC)" \
124 DESTDIR
="$(PKG_INSTALL_DIR)" \
125 libs
install.libs
install.data
128 define Package
/libncurses
/install
129 install -d
-m0755
$(1)/usr
/lib
130 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{ncurses
,panel
,menu
}*.so.
* $(1)/usr
/lib
/
131 install -d
-m0755
$(1)/usr
/share
/terminfo
132 for file in a
/ansi d
/dumb l
/linux r
/rxvt s
/screen v
/vt100 v
/vt102 x
/xterm x
/xterm-color
; do \
133 install -d
-m0755
$(1)/usr
/share
/terminfo
/`dirname $$$$file`; \
134 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/terminfo
/$$$$file \
135 $(1)/usr
/share
/terminfo
/$$$$file; \
139 define Build
/InstallDev
140 mkdir
-p
$(STAGING_DIR
)/usr
/include
141 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/curses.h
$(STAGING_DIR
)/usr
/include/
142 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/ncurses.h
$(STAGING_DIR
)/usr
/include/
143 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/menu.h
$(STAGING_DIR
)/usr
/include/
144 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/panel.h
$(STAGING_DIR
)/usr
/include/
145 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/term
{,cap
}.h
$(STAGING_DIR
)/usr
/include/
146 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/unctrl.h
$(STAGING_DIR
)/usr
/include/
147 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/form.h
$(STAGING_DIR
)/usr
/include/
148 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/eti.h
$(STAGING_DIR
)/usr
/include/
149 mkdir
-p
$(STAGING_DIR
)/usr
/lib
150 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcurses.so
$(STAGING_DIR
)/usr
/lib
/
151 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{ncurses
,panel
,menu
,form
}.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
154 define Build
/UninstallDev
156 $(STAGING_DIR
)/usr
/include/curses.h \
157 $(STAGING_DIR
)/usr
/include/ncurses.h \
158 $(STAGING_DIR
)/usr
/include/menu.h \
159 $(STAGING_DIR
)/usr
/include/panel.h \
160 $(STAGING_DIR
)/usr
/include/term
{,cap
}.h \
161 $(STAGING_DIR
)/usr
/include/unctrl.h \
162 $(STAGING_DIR
)/usr
/lib
/libcurses.so \
163 $(STAGING_DIR
)/usr
/lib
/lib
{ncurses
,panel
,menu
}.
{a
,so
*}
166 $(eval
$(call BuildPackage
,libncurses
))