Standardize package Config.in, change prompt to package name + short description...
[openwrt.git] / package / ncurses / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=ncurses
6 PKG_VERSION:=5.2
7 PKG_RELEASE:=6
8 PKG_MD5SUM:=464d6a49010cf2a6eb9ce59a264d4d47
9
10 PKG_SOURCE_URL:=\
11 ftp://ftp.gnu.org/pub/gnu/$(PKG_NAME) \
12 ftp://gatekeeper.dec.com/pub/GNU/$(PKG_NAME) \
13 ftp://ftp.uu.net/archive/systems/gnu/$(PKG_NAME) \
14 ftp://ftp.eu.uu.net/pub/gnu/$(PKG_NAME) \
15 ftp://ftp.funet.fi/pub/gnu/prep/$(PKG_NAME) \
16 ftp://ftp.leo.org/pub/comp/os/unix/gnu/$(PKG_NAME) \
17 ftp://ftp.digex.net/pub/gnu/$(PKG_NAME)
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
19 PKG_CAT:=zcat
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23
24 include $(TOPDIR)/package/rules.mk
25
26 $(eval $(call PKG_template,LIBNCURSES,libncurses,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
27
28 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
29 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
30 $(TARGET_CONFIGURE_OPTS) \
31 CFLAGS="$(TARGET_CFLAGS)" \
32 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
33 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
34 ac_cv_linux_vers="2" \
35 ./configure \
36 --target=$(GNU_TARGET_NAME) \
37 --host=$(GNU_TARGET_NAME) \
38 --build=$(GNU_HOST_NAME) \
39 --program-prefix="" \
40 --program-suffix="" \
41 --prefix=/usr \
42 --exec-prefix=/usr \
43 --bindir=/usr/bin \
44 --datadir=/usr/share \
45 --includedir=/usr/include \
46 --infodir=/usr/share/info \
47 --libdir=/usr/lib \
48 --libexecdir=/usr/lib \
49 --localstatedir=/var \
50 --mandir=/usr/share/man \
51 --sbindir=/usr/sbin \
52 --sysconfdir=/etc \
53 $(DISABLE_NLS) \
54 $(DISABLE_LARGEFILE) \
55 --with-terminfo-dirs=/usr/share/terminfo \
56 --with-default-terminfo-dir=/usr/share/terminfo \
57 --without-ada \
58 --without-cxx \
59 --without-cxx-binding \
60 --without-progs \
61 --without-profile \
62 --without-debug \
63 --disable-rpath \
64 --enable-echo \
65 --enable-const \
66 --enable-overwrite \
67 --with-shared \
68 --with-normal \
69 );
70 touch $(PKG_BUILD_DIR)/.configured
71
72 $(PKG_BUILD_DIR)/.built:
73 $(MAKE) -C $(PKG_BUILD_DIR) \
74 $(TARGET_CONFIGURE_OPTS) \
75 BUILD_CC="$(TARGET_CC)" \
76 HOSTCC="$(HOSTCC)" \
77 HOSTCCFLAGS="\$$(CPPFLAGS)"
78 mkdir -p $(PKG_INSTALL_DIR)
79 $(MAKE) -C $(PKG_BUILD_DIR) \
80 DESTDIR="$(PKG_INSTALL_DIR)" \
81 install
82 touch $(PKG_BUILD_DIR)/.built
83
84 $(IPKG_LIBNCURSES):
85 install -d -m0755 $(IDIR_LIBNCURSES)/usr/lib
86 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel}*.so.* $(IDIR_LIBNCURSES)/usr/lib/
87 install -d -m0755 $(IDIR_LIBNCURSES)/usr/share/terminfo
88 for f in a/ansi d/dumb l/linux s/screen v/vt100 v/vt102 x/xterm x/xterm-color; do \
89 install -d -m0755 $(IDIR_LIBNCURSES)/usr/share/terminfo/`dirname $${f}`; \
90 cp -fpR $(PKG_INSTALL_DIR)/usr/share/terminfo/$${f} \
91 $(IDIR_LIBNCURSES)/usr/share/terminfo/$${f}; \
92 done
93 $(RSTRIP) $(IDIR_LIBNCURSES)
94 $(IPKG_BUILD) $(IDIR_LIBNCURSES) $(PACKAGE_DIR)
95
96 $(STAGING_DIR)/usr/lib/libncurses.so: $(PKG_BUILD_DIR)/.built
97 mkdir -p $(STAGING_DIR)/usr/include
98 cp -fpR $(PKG_INSTALL_DIR)/usr/include/curses.h $(STAGING_DIR)/usr/include/
99 cp -fpR $(PKG_INSTALL_DIR)/usr/include/{ncurses,panel}.h $(STAGING_DIR)/usr/include/
100 cp -fpR $(PKG_INSTALL_DIR)/usr/include/panel.h $(STAGING_DIR)/usr/include/
101 cp -fpR $(PKG_INSTALL_DIR)/usr/include/term{,cap}.h $(STAGING_DIR)/usr/include/
102 cp -fpR $(PKG_INSTALL_DIR)/usr/include/unctrl.h $(STAGING_DIR)/usr/include/
103 mkdir -p $(STAGING_DIR)/usr/lib
104 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libcurses.so $(STAGING_DIR)/usr/lib/
105 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel}.{a,so*} $(STAGING_DIR)/usr/lib/
106
107 install-dev: $(STAGING_DIR)/usr/lib/libncurses.so
108
109 uninstall-dev:
110 rm -rf \
111 $(PKG_INSTALL_DIR)/usr/include/curses.h \
112 $(PKG_INSTALL_DIR)/usr/include/{ncurses,panel}.h \
113 $(PKG_INSTALL_DIR)/usr/include/panel.h \
114 $(PKG_INSTALL_DIR)/usr/include/term{,cap}.h \
115 $(PKG_INSTALL_DIR)/usr/include/unctrl.h \
116 $(PKG_INSTALL_DIR)/usr/lib/libcurses.so \
117 $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel}.{a,so*} \
118
119 compile: install-dev
120 clean: uninstall-dev
121
This page took 0.054233 seconds and 5 git commands to generate.