fix the xt/ipt module path issue
[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:=8
8 PKG_MD5SUM:=464d6a49010cf2a6eb9ce59a264d4d47
9
10 PKG_SOURCE_URL:=@GNU/ncurses
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,LIBNCURSES,libncurses,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 $(PKG_BUILD_DIR)/.configured:
22 touch $@
23
24 $(PKG_BUILD_DIR)/.built:
25 rm -rf $(PKG_INSTALL_DIR)
26 mkdir -p $(PKG_INSTALL_DIR)
27 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
28 ./configure \
29 --target=$(GNU_HOST_NAME) \
30 --host=$(GNU_HOST_NAME) \
31 --build=$(GNU_HOST_NAME) \
32 --program-prefix="" \
33 --program-suffix="" \
34 --prefix=/usr \
35 --exec-prefix=/usr \
36 --bindir=/usr/bin \
37 --datadir=/usr/share \
38 --includedir=/usr/include \
39 --infodir=/usr/share/info \
40 --libdir=/usr/lib \
41 --libexecdir=/usr/lib \
42 --localstatedir=/var \
43 --mandir=/usr/share/man \
44 --sbindir=/usr/sbin \
45 --sysconfdir=/etc \
46 $(DISABLE_NLS) \
47 $(DISABLE_LARGEFILE) \
48 --enable-echo \
49 --enable-const \
50 --enable-overwrite \
51 --disable-rpath \
52 --without-ada \
53 --without-cxx \
54 --without-cxx-binding \
55 --without-debug \
56 --without-profile \
57 --with-progs \
58 --with-normal \
59 --without-shared \
60 --with-terminfo-dirs=/usr/share/terminfo \
61 --with-default-terminfo-dir=/usr/share/terminfo \
62 );
63 $(MAKE) -C $(PKG_BUILD_DIR) \
64 DESTDIR="$(PKG_INSTALL_DIR)" \
65 libs install.progs
66 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
67 $(TARGET_CONFIGURE_OPTS) \
68 CFLAGS="$(TARGET_CFLAGS)" \
69 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
70 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
71 ac_cv_linux_vers="2" \
72 ./configure \
73 --target=$(GNU_TARGET_NAME) \
74 --host=$(GNU_TARGET_NAME) \
75 --build=$(GNU_HOST_NAME) \
76 --program-prefix="" \
77 --program-suffix="" \
78 --prefix=/usr \
79 --exec-prefix=/usr \
80 --bindir=/usr/bin \
81 --datadir=/usr/share \
82 --includedir=/usr/include \
83 --infodir=/usr/share/info \
84 --libdir=/usr/lib \
85 --libexecdir=/usr/lib \
86 --localstatedir=/var \
87 --mandir=/usr/share/man \
88 --sbindir=/usr/sbin \
89 --sysconfdir=/etc \
90 $(DISABLE_NLS) \
91 $(DISABLE_LARGEFILE) \
92 --enable-echo \
93 --enable-const \
94 --enable-overwrite \
95 --disable-rpath \
96 --without-ada \
97 --without-cxx \
98 --without-cxx-binding \
99 --without-debug \
100 --without-profile \
101 --without-progs \
102 --with-normal \
103 --with-shared \
104 --with-terminfo-dirs=/usr/share/terminfo \
105 --with-default-terminfo-dir=/usr/share/terminfo \
106 );
107 $(MAKE) -C $(PKG_BUILD_DIR) \
108 $(TARGET_CONFIGURE_OPTS) \
109 BUILD_CC="$(TARGET_CC)" \
110 HOSTCC="$(HOSTCC)" \
111 HOSTCCFLAGS="\$$(CPPFLAGS)" \
112 DESTDIR="$(PKG_INSTALL_DIR)" \
113 libs install.libs install.data
114 touch $@
115
116 $(IPKG_LIBNCURSES):
117 install -d -m0755 $(IDIR_LIBNCURSES)/usr/lib
118 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu}*.so.* $(IDIR_LIBNCURSES)/usr/lib/
119 install -d -m0755 $(IDIR_LIBNCURSES)/usr/share/terminfo
120 for f in a/ansi d/dumb l/linux r/rxvt s/screen v/vt100 v/vt102 x/xterm x/xterm-color; do \
121 install -d -m0755 $(IDIR_LIBNCURSES)/usr/share/terminfo/`dirname $${f}`; \
122 $(CP) $(PKG_INSTALL_DIR)/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: $(PKG_BUILD_DIR)/.built
129 mkdir -p $(STAGING_DIR)/usr/include
130 $(CP) $(PKG_INSTALL_DIR)/usr/include/curses.h $(STAGING_DIR)/usr/include/
131 $(CP) $(PKG_INSTALL_DIR)/usr/include/{ncurses,panel}.h $(STAGING_DIR)/usr/include/
132 $(CP) $(PKG_INSTALL_DIR)/usr/include/panel.h $(STAGING_DIR)/usr/include/
133 $(CP) $(PKG_INSTALL_DIR)/usr/include/term{,cap}.h $(STAGING_DIR)/usr/include/
134 $(CP) $(PKG_INSTALL_DIR)/usr/include/unctrl.h $(STAGING_DIR)/usr/include/
135 $(CP) $(PKG_INSTALL_DIR)/usr/include/menu.h $(STAGING_DIR)/usr/include/
136 mkdir -p $(STAGING_DIR)/usr/lib
137 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurses.so $(STAGING_DIR)/usr/lib/
138 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu}.{a,so*} $(STAGING_DIR)/usr/lib/
139 touch $@
140
141 install-dev: $(STAGING_DIR)/usr/lib/libncurses.so
142
143 uninstall-dev:
144 rm -rf \
145 $(STAGING_DIR)/usr/include/curses.h \
146 $(STAGING_DIR)/usr/include/{ncurses,panel}.h \
147 $(STAGING_DIR)/usr/include/menu.h \
148 $(STAGING_DIR)/usr/include/panel.h \
149 $(STAGING_DIR)/usr/include/term{,cap}.h \
150 $(STAGING_DIR)/usr/include/unctrl.h \
151 $(STAGING_DIR)/usr/lib/libcurses.so \
152 $(STAGING_DIR)/usr/lib/lib{ncurses,panel}.{a,so*} \
153
154 compile-targets: install-dev
155 clean-targets: uninstall-dev
156
This page took 0.042662 seconds and 5 git commands to generate.