add vt102 terminfo file to ncurses package
[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 http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
20 PKG_CAT:=zcat
21
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
23
24 IPKG_LIBNCURSES:=$(PACKAGE_DIR)/lib$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
25 IDIR_LIBNCURSES:=$(PKG_BUILD_DIR)/ipkg/lib$(PKG_NAME)
26 INFO_LIBNCURSES:=$(IPKG_STATE_DIR)/info/lib$(PKG_NAME).list
27
28 $(DL_DIR)/$(PKG_SOURCE):
29 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
30
31 $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
32 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
33 touch $(PKG_BUILD_DIR)/.prepared
34
35 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
36 (cd $(PKG_BUILD_DIR); rm -rf config.cache config.status; \
37 $(TARGET_CONFIGURE_OPTS) \
38 CFLAGS="$(TARGET_CFLAGS)" \
39 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
40 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
41 ac_cv_linux_vers="2" \
42 ./configure \
43 --target=$(GNU_TARGET_NAME) \
44 --host=$(GNU_TARGET_NAME) \
45 --build=$(GNU_HOST_NAME) \
46 --program-prefix="" \
47 --program-suffix="" \
48 --prefix=/usr \
49 --exec-prefix=/usr \
50 --bindir=/usr/bin \
51 --datadir=/usr/share \
52 --includedir=/usr/include \
53 --infodir=/usr/share/info \
54 --libdir=/usr/lib \
55 --libexecdir=/usr/lib \
56 --localstatedir=/var \
57 --mandir=/usr/share/man \
58 --sbindir=/usr/sbin \
59 --sysconfdir=/etc \
60 $(DISABLE_NLS) \
61 $(DISABLE_LARGEFILE) \
62 --with-terminfo-dirs=/usr/share/terminfo \
63 --with-default-terminfo-dir=/usr/share/terminfo \
64 --without-ada \
65 --without-cxx \
66 --without-cxx-binding \
67 --without-progs \
68 --without-profile \
69 --without-debug \
70 --disable-rpath \
71 --enable-echo \
72 --enable-const \
73 --enable-overwrite \
74 --with-shared \
75 --with-normal \
76 );
77 touch $(PKG_BUILD_DIR)/.configured
78
79 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
80 $(MAKE) -C $(PKG_BUILD_DIR) \
81 $(TARGET_CONFIGURE_OPTS) \
82 BUILD_CC="$(TARGET_CC)" \
83 HOSTCC="$(HOSTCC)" \
84 HOSTCCFLAGS="\$$(CPPFLAGS)"
85 mkdir -p $(PKG_BUILD_DIR)/terminfo
86 $(MAKE) -C $(PKG_BUILD_DIR) \
87 DESTDIR="$(PKG_BUILD_DIR)/install" \
88 install
89 touch $(PKG_BUILD_DIR)/.built
90
91 $(STAGING_DIR)/usr/lib/libncurses.so: $(PKG_BUILD_DIR)/.built
92 $(MAKE) -C $(PKG_BUILD_DIR) \
93 DESTDIR="$(STAGING_DIR)" \
94 install
95
96 $(IPKG_LIBNCURSES): $(STAGING_DIR)/usr/lib/libncurses.so
97 $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_LIBNCURSES) ./ipkg/lib$(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
98 mkdir -p $(IDIR_LIBNCURSES)/usr/lib
99 cp -fpR $(STAGING_DIR)/usr/lib/lib{ncurses,panel}*.so.* $(IDIR_LIBNCURSES)/usr/lib/
100 $(STRIP) $(IDIR_LIBNCURSES)/usr/lib/*.so*
101 mkdir -p $(IDIR_LIBNCURSES)/usr/share/terminfo
102 for f in a/ansi d/dumb l/linux s/screen v/vt100 v/vt102 x/xterm x/xterm-color; do \
103 mkdir -p $(IDIR_LIBNCURSES)/usr/share/terminfo/`dirname $${f}`; \
104 cp -fpR \
105 $(PKG_BUILD_DIR)/install/usr/share/terminfo/$${f} \
106 $(IDIR_LIBNCURSES)/usr/share/terminfo/$${f}; \
107 done
108 mkdir -p $(PACKAGE_DIR)
109 $(IPKG_BUILD) $(IDIR_LIBNCURSES) $(PACKAGE_DIR)
110
111 $(INFO_LIBNCURSES): $(IPKG_LIBNCURSES)
112 $(IPKG) install $(IPKG_LIBNCURSES)
113
114 source: $(DL_DIR)/$(PKG_SOURCE)
115 prepare: $(PKG_BUILD_DIR)/.prepared
116 compile: $(IPKG_LIBNCURSES)
117 install: $(INFO_LIBNCURSES)
118
119 clean:
120 -$(MAKE) -C $(PKG_BUILD_DIR) \
121 DESTDIR="$(STAGING_DIR)" \
122 uninstall
123 rm -rf $(PKG_BUILD_DIR) $(IPKG_LIBNCURSES)
This page took 0.045934 seconds and 5 git commands to generate.