| 1 |
# $FreeWRT$ |
| 2 |
#- |
| 3 |
# This file is part of the FreeWRT project. FreeWRT is copyrighted |
| 4 |
# material, please see the LICENCE file in the top-level directory |
| 5 |
# or at http://www.freewrt.org/licence for details. |
| 6 |
|
| 7 |
include $(TOPDIR)/rules.mk |
| 8 |
|
| 9 |
PKG_NAME:= ncurses |
| 10 |
PKG_VERSION:= 5.6 |
| 11 |
PKG_RELEASE:= 1 |
| 12 |
PKG_MD5SUM:= b6593abe1089d6aab1551c105c9300e3 |
| 13 |
|
| 14 |
PKG_SOURCE_URL:= @GNU/ncurses |
| 15 |
|
| 16 |
include $(TOPDIR)/mk/package.mk |
| 17 |
|
| 18 |
$(eval $(call PKG_template,LIBNCURSES,libncurses,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) |
| 19 |
|
| 20 |
$(WRKBUILD)/.configured: |
| 21 |
touch $@ |
| 22 |
|
| 23 |
$(WRKBUILD)/.built: |
| 24 |
(cd $(WRKBUILD); rm -rf config.{cache,status} ; \ |
| 25 |
./configure \ |
| 26 |
--target=$(GNU_TARGET_NAME) \ |
| 27 |
--host=$(GNU_TARGET_NAME) \ |
| 28 |
--build=$(GNU_HOST_NAME) \ |
| 29 |
--program-prefix="" \ |
| 30 |
--program-suffix="" \ |
| 31 |
--prefix=/usr \ |
| 32 |
--exec-prefix=/usr \ |
| 33 |
--bindir=/usr/bin \ |
| 34 |
--datadir=/usr/share \ |
| 35 |
--includedir=/usr/include \ |
| 36 |
--infodir=/usr/share/info \ |
| 37 |
--libdir=/usr/lib \ |
| 38 |
--libexecdir=/usr/lib \ |
| 39 |
--localstatedir=/var \ |
| 40 |
--mandir=/usr/share/man \ |
| 41 |
--sbindir=/usr/sbin \ |
| 42 |
--sysconfdir=/etc \ |
| 43 |
--disable-nls \ |
| 44 |
--enable-echo \ |
| 45 |
--enable-const \ |
| 46 |
--enable-overwrite \ |
| 47 |
--disable-rpath \ |
| 48 |
--without-ada \ |
| 49 |
--without-cxx \ |
| 50 |
--without-cxx-binding \ |
| 51 |
--without-debug \ |
| 52 |
--without-profile \ |
| 53 |
--with-progs \ |
| 54 |
--with-normal \ |
| 55 |
--without-shared \ |
| 56 |
--with-terminfo-dirs=/usr/share/terminfo \ |
| 57 |
--with-default-terminfo-dir=/usr/share/terminfo \ |
| 58 |
--with-build-cc=cc \ |
| 59 |
); |
| 60 |
$(MAKE) -C $(WRKBUILD) \ |
| 61 |
DESTDIR="$(WRKINST)" \ |
| 62 |
libs install.progs |
| 63 |
(cd $(WRKBUILD); rm -rf config.{cache,status} ; \ |
| 64 |
$(TARGET_CONFIGURE_OPTS) \ |
| 65 |
CFLAGS="$(TARGET_CFLAGS)" \ |
| 66 |
CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ |
| 67 |
LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ |
| 68 |
ac_cv_linux_vers="2" \ |
| 69 |
./configure \ |
| 70 |
--target=$(GNU_TARGET_NAME) \ |
| 71 |
--host=$(GNU_TARGET_NAME) \ |
| 72 |
--build=$(GNU_HOST_NAME) \ |
| 73 |
--program-prefix="" \ |
| 74 |
--program-suffix="" \ |
| 75 |
--prefix=/usr \ |
| 76 |
--exec-prefix=/usr \ |
| 77 |
--bindir=/usr/bin \ |
| 78 |
--datadir=/usr/share \ |
| 79 |
--includedir=/usr/include \ |
| 80 |
--infodir=/usr/share/info \ |
| 81 |
--libdir=/usr/lib \ |
| 82 |
--libexecdir=/usr/lib \ |
| 83 |
--localstatedir=/var \ |
| 84 |
--mandir=/usr/share/man \ |
| 85 |
--sbindir=/usr/sbin \ |
| 86 |
--sysconfdir=/etc \ |
| 87 |
--disable-nls \ |
| 88 |
--enable-echo \ |
| 89 |
--enable-const \ |
| 90 |
--enable-overwrite \ |
| 91 |
--disable-rpath \ |
| 92 |
--without-ada \ |
| 93 |
--without-cxx \ |
| 94 |
--without-cxx-binding \ |
| 95 |
--without-debug \ |
| 96 |
--without-profile \ |
| 97 |
--without-progs \ |
| 98 |
--with-normal \ |
| 99 |
--with-shared \ |
| 100 |
--with-terminfo-dirs=/usr/share/terminfo \ |
| 101 |
--with-default-terminfo-dir=/usr/share/terminfo \ |
| 102 |
--with-build-cc=cc \ |
| 103 |
); |
| 104 |
$(MAKE) -C $(WRKBUILD) \ |
| 105 |
$(TARGET_CONFIGURE_OPTS) \ |
| 106 |
BUILD_CC="$(TARGET_CC)" \ |
| 107 |
HOSTCC="$(HOSTCC)" \ |
| 108 |
HOSTCCFLAGS="\$$(CPPFLAGS)" \ |
| 109 |
DESTDIR="$(WRKINST)" \ |
| 110 |
libs install.libs install.data |
| 111 |
touch $@ |
| 112 |
|
| 113 |
$(IPKG_LIBNCURSES): |
| 114 |
$(INSTALL_DIR) $(IDIR_LIBNCURSES)/usr/lib |
| 115 |
$(INSTALL_DIR) $(IDIR_LIBNCURSES)/usr/share/terminfo |
| 116 |
$(CP) $(WRKINST)/usr/lib/libncurses*.so.* $(IDIR_LIBNCURSES)/usr/lib/ |
| 117 |
$(CP) $(WRKINST)/usr/lib/libpanel*.so.* $(IDIR_LIBNCURSES)/usr/lib/ |
| 118 |
$(CP) $(WRKINST)/usr/lib/libmenu*.so.* $(IDIR_LIBNCURSES)/usr/lib/ |
| 119 |
$(CP) $(WRKINST)/usr/lib/libform*.so.* $(IDIR_LIBNCURSES)/usr/lib/ |
| 120 |
for f in a/ansi d/dumb l/linux r/rxvt s/screen v/vt100 v/vt102 v/vt220 x/xterm x/xterm-color; do \ |
| 121 |
install -d -m0755 $(IDIR_LIBNCURSES)/usr/share/terminfo/`dirname $${f}`; \ |
| 122 |
$(INSTALL_DATA) $(WRKINST)/usr/share/terminfo/$${f} \ |
| 123 |
$(IDIR_LIBNCURSES)/usr/share/terminfo/$${f}; \ |
| 124 |
done |
| 125 |
$(RSTRIP) $(IDIR_LIBNCURSES) |
| 126 |
$(IPKG_BUILD) $(IDIR_LIBNCURSES) $(PACKAGE_DIR) |
| 127 |
|
| 128 |
$(STAGING_DIR)/usr/lib/libncurses.so: $(WRKBUILD)/.built |
| 129 |
$(INSTALL_DIR) $(STAGING_DIR)/usr/lib |
| 130 |
$(INSTALL_DIR) $(STAGING_DIR)/usr/include |
| 131 |
$(INSTALL_DATA) $(WRKINST)/usr/include/curses.h $(STAGING_DIR)/usr/include/ |
| 132 |
$(INSTALL_DATA) $(WRKINST)/usr/include/ncurses.h $(STAGING_DIR)/usr/include/ |
| 133 |
$(INSTALL_DATA) $(WRKINST)/usr/include/panel.h $(STAGING_DIR)/usr/include/ |
| 134 |
$(INSTALL_DATA) $(WRKINST)/usr/include/term.h $(STAGING_DIR)/usr/include/ |
| 135 |
$(INSTALL_DATA) $(WRKINST)/usr/include/termcap.h $(STAGING_DIR)/usr/include/ |
| 136 |
$(INSTALL_DATA) $(WRKINST)/usr/include/unctrl.h $(STAGING_DIR)/usr/include/ |
| 137 |
$(INSTALL_DATA) $(WRKINST)/usr/include/menu.h $(STAGING_DIR)/usr/include/ |
| 138 |
$(INSTALL_DATA) $(WRKINST)/usr/include/eti.h $(STAGING_DIR)/usr/include/ |
| 139 |
$(INSTALL_DATA) $(WRKINST)/usr/include/form.h $(STAGING_DIR)/usr/include/ |
| 140 |
$(CP) $(WRKINST)/usr/lib/libcurses.so $(STAGING_DIR)/usr/lib/ |
| 141 |
$(INSTALL_DATA) $(WRKINST)/usr/lib/libncurses.a $(STAGING_DIR)/usr/lib/ |
| 142 |
$(CP) $(WRKINST)/usr/lib/libncurses.so* $(STAGING_DIR)/usr/lib/ |
| 143 |
$(INSTALL_DATA) $(WRKINST)/usr/lib/libpanel.a $(STAGING_DIR)/usr/lib/ |
| 144 |
$(CP) $(WRKINST)/usr/lib/libpanel.so* $(STAGING_DIR)/usr/lib/ |
| 145 |
$(INSTALL_DATA) $(WRKINST)/usr/lib/libmenu.a $(STAGING_DIR)/usr/lib/ |
| 146 |
$(CP) $(WRKINST)/usr/lib/libmenu.so* $(STAGING_DIR)/usr/lib/ |
| 147 |
$(CP) $(WRKINST)/usr/lib/libform.so* $(STAGING_DIR)/usr/lib/ |
| 148 |
$(INSTALL_DATA) $(WRKINST)/usr/lib/libform.a $(STAGING_DIR)/usr/lib/ |
| 149 |
|
| 150 |
compile-targets: install-dev |
| 151 |
clean-targets: uninstall-dev |
| 152 |
|
| 153 |
install-dev: $(STAGING_DIR)/usr/lib/libncurses.so |
| 154 |
|
| 155 |
uninstall-dev: |
| 156 |
rm -rf \ |
| 157 |
$(STAGING_DIR)/usr/include/curses.h \ |
| 158 |
$(STAGING_DIR)/usr/include/ncurses.h \ |
| 159 |
$(STAGING_DIR)/usr/include/panel.h \ |
| 160 |
$(STAGING_DIR)/usr/include/menu.h \ |
| 161 |
$(STAGING_DIR)/usr/include/panel.h \ |
| 162 |
$(STAGING_DIR)/usr/include/term.h \ |
| 163 |
$(STAGING_DIR)/usr/include/form.h \ |
| 164 |
$(STAGING_DIR)/usr/include/termcap.h \ |
| 165 |
$(STAGING_DIR)/usr/include/unctrl.h \ |
| 166 |
$(STAGING_DIR)/usr/lib/libcurses.so \ |
| 167 |
$(STAGING_DIR)/usr/lib/libncurses,panel.a \ |
| 168 |
$(STAGING_DIR)/usr/lib/libncurses.so* \ |
| 169 |
$(STAGING_DIR)/usr/lib/libpanel.a \ |
| 170 |
$(STAGING_DIR)/usr/lib/libpanel.so* \ |
| 171 |
$(STAGING_DIR)/usr/lib/libform.a \ |
| 172 |
$(STAGING_DIR)/usr/lib/libform.so* \ |
| 173 |
$(STAGING_DIR)/usr/lib/libmenu.a \ |
| 174 |
$(STAGING_DIR)/usr/lib/libmenu.so* |