small image builder change
[openwrt.git] / openwrt / package / ncurses / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=ncurses
6 PKG_VERSION:=5.2
7 PKG_RELEASE:=7
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 touch $@
30
31 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
32 rm -rf $(PKG_INSTALL_DIR)
33 mkdir -p $(PKG_INSTALL_DIR)
34 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
35 ./configure \
36 --target=$(GNU_HOST_NAME) \
37 --host=$(GNU_HOST_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 --enable-echo \
56 --enable-const \
57 --enable-overwrite \
58 --disable-rpath \
59 --without-ada \
60 --without-cxx \
61 --without-cxx-binding \
62 --without-debug \
63 --without-profile \
64 --with-progs \
65 --with-normal \
66 --without-shared \
67 --with-terminfo-dirs=/usr/share/terminfo \
68 --with-default-terminfo-dir=/usr/share/terminfo \
69 );
70 $(MAKE) -C $(PKG_BUILD_DIR) \
71 DESTDIR="$(PKG_INSTALL_DIR)" \
72 libs install.progs
73 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
74 $(TARGET_CONFIGURE_OPTS) \
75 CFLAGS="$(TARGET_CFLAGS)" \
76 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
77 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
78 ac_cv_linux_vers="2" \
79 ./configure \
80 --target=$(GNU_TARGET_NAME) \
81 --host=$(GNU_TARGET_NAME) \
82 --build=$(GNU_HOST_NAME) \
83 --program-prefix="" \
84 --program-suffix="" \
85 --prefix=/usr \
86 --exec-prefix=/usr \
87 --bindir=/usr/bin \
88 --datadir=/usr/share \
89 --includedir=/usr/include \
90 --infodir=/usr/share/info \
91 --libdir=/usr/lib \
92 --libexecdir=/usr/lib \
93 --localstatedir=/var \
94 --mandir=/usr/share/man \
95 --sbindir=/usr/sbin \
96 --sysconfdir=/etc \
97 $(DISABLE_NLS) \
98 $(DISABLE_LARGEFILE) \
99 --enable-echo \
100 --enable-const \
101 --enable-overwrite \
102 --disable-rpath \
103 --without-ada \
104 --without-cxx \
105 --without-cxx-binding \
106 --without-debug \
107 --without-profile \
108 --without-progs \
109 --with-normal \
110 --with-shared \
111 --with-terminfo-dirs=/usr/share/terminfo \
112 --with-default-terminfo-dir=/usr/share/terminfo \
113 );
114 $(MAKE) -C $(PKG_BUILD_DIR) \
115 $(TARGET_CONFIGURE_OPTS) \
116 BUILD_CC="$(TARGET_CC)" \
117 HOSTCC="$(HOSTCC)" \
118 HOSTCCFLAGS="\$$(CPPFLAGS)" \
119 DESTDIR="$(PKG_INSTALL_DIR)" \
120 libs install.libs install.data
121 touch $@
122
123 $(IPKG_LIBNCURSES):
124 install -d -m0755 $(IDIR_LIBNCURSES)/usr/lib
125 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu}*.so.* $(IDIR_LIBNCURSES)/usr/lib/
126 install -d -m0755 $(IDIR_LIBNCURSES)/usr/share/terminfo
127 for f in a/ansi d/dumb l/linux s/screen v/vt100 v/vt102 x/xterm x/xterm-color; do \
128 install -d -m0755 $(IDIR_LIBNCURSES)/usr/share/terminfo/`dirname $${f}`; \
129 cp -fpR $(PKG_INSTALL_DIR)/usr/share/terminfo/$${f} \
130 $(IDIR_LIBNCURSES)/usr/share/terminfo/$${f}; \
131 done
132 $(RSTRIP) $(IDIR_LIBNCURSES)
133 $(IPKG_BUILD) $(IDIR_LIBNCURSES) $(PACKAGE_DIR)
134
135 $(STAGING_DIR)/usr/lib/libncurses.so: $(PKG_BUILD_DIR)/.built
136 mkdir -p $(STAGING_DIR)/usr/include
137 cp -fpR $(PKG_INSTALL_DIR)/usr/include/curses.h $(STAGING_DIR)/usr/include/
138 cp -fpR $(PKG_INSTALL_DIR)/usr/include/{ncurses,panel}.h $(STAGING_DIR)/usr/include/
139 cp -fpR $(PKG_INSTALL_DIR)/usr/include/panel.h $(STAGING_DIR)/usr/include/
140 cp -fpR $(PKG_INSTALL_DIR)/usr/include/term{,cap}.h $(STAGING_DIR)/usr/include/
141 cp -fpR $(PKG_INSTALL_DIR)/usr/include/unctrl.h $(STAGING_DIR)/usr/include/
142 cp -fpR $(PKG_INSTALL_DIR)/usr/include/menu.h $(STAGING_DIR)/usr/include/
143 mkdir -p $(STAGING_DIR)/usr/lib
144 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libcurses.so $(STAGING_DIR)/usr/lib/
145 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu}.{a,so*} $(STAGING_DIR)/usr/lib/
146 touch $@
147
148 install-dev: $(STAGING_DIR)/usr/lib/libncurses.so
149
150 uninstall-dev:
151 rm -rf \
152 $(STAGING_DIR)/usr/include/curses.h \
153 $(STAGING_DIR)/usr/include/{ncurses,panel}.h \
154 $(STAGING_DIR)/usr/include/menu.h \
155 $(STAGING_DIR)/usr/include/panel.h \
156 $(STAGING_DIR)/usr/include/term{,cap}.h \
157 $(STAGING_DIR)/usr/include/unctrl.h \
158 $(STAGING_DIR)/usr/lib/libcurses.so \
159 $(STAGING_DIR)/usr/lib/lib{ncurses,panel}.{a,so*} \
160
161 compile: install-dev
162 clean: uninstall-dev
163
This page took 0.047977 seconds and 5 git commands to generate.