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