3 ifneq ($(strip ${IPKG_RULES_INC}),)
4 include $(IPKG_RULES_INC
)
9 PKG_VERSION
:= $(shell cat .
/ipkg
/version
)
10 CURRENT_DIR
:= $(shell pwd
)
11 INSTALL_DIR ?
= $(CURRENT_DIR
)/ipkg-install
15 I_LIBNCURSES
:= ipkg
/libncurses
16 I_LIBNCURSES_DEV
:= ipkg
/libncurses-dev
17 I_NCURSES_TERM
:= ipkg
/ncurses-term
22 --with-terminfo-dirs
=/usr
/share
/terminfo \
23 --with-default-terminfo-dir
=/usr
/share
/terminfo \
26 --without-cxx-binding \
41 .stamp-configured
: $(BUILD_DEPS
)
44 $(TARGET_CONFIGURE_OPTS
) \
45 CFLAGS
="$(TARGET_CFLAGS)" \
46 ac_cv_linux_vers
="2" \
48 --target
=$(GNU_TARGET_NAME
) \
49 --host
=$(GNU_TARGET_NAME
) \
50 --build
=$(GNU_HOST_NAME
) \
56 --datadir=/usr
/share \
57 --includedir=/usr
/include \
58 --infodir=/usr
/share
/info \
60 --libexecdir
=/usr
/lib \
61 --localstatedir
=/var \
62 --mandir=/usr
/share
/man \
65 $(DISABLE_LARGEFILE
) \
69 touch .stamp-configured
72 .stamp-built
: .stamp-configured
75 $(TARGET_CONFIGURE_OPTS
) \
76 BUILD_CC
="$(TARGET_CROSS)gcc" \
78 HOSTCCFLAGS
="\$$(CPPFLAGS)" \
83 $(INSTALL_DIR
)/usr
/include/ncurses.h
: .stamp-built
85 mkdir
-p
$(INSTALL_DIR
)
88 DESTDIR
="$(INSTALL_DIR)" \
92 configure
: .stamp-configured
98 install: $(INSTALL_DIR
)/usr
/include/ncurses.h
101 package
: $(INSTALL_DIR
)/usr
/include/ncurses.h
103 mkdir
-p
$(I_LIBNCURSES
)/usr
/lib
104 cp
-fpR
$(INSTALL_DIR
)/usr
/lib
/libncurses
*.so.
* $(I_LIBNCURSES
)/usr
/lib
/
105 cp
-fpR
$(INSTALL_DIR
)/usr
/lib
/libpanel
*.so.
* $(I_LIBNCURSES
)/usr
/lib
/
106 $(STRIP
) $(I_LIBNCURSES
)/usr
/lib
/*
108 mkdir
-p
$(I_LIBNCURSES_DEV
)/usr
/include
109 cp
-fpR
$(INSTALL_DIR
)/usr
/include/curses.h
$(I_LIBNCURSES_DEV
)/usr
/include/
110 cp
-fpR
$(INSTALL_DIR
)/usr
/include/ncurses.h
$(I_LIBNCURSES_DEV
)/usr
/include/
111 cp
-fpR
$(INSTALL_DIR
)/usr
/include/panel.h
$(I_LIBNCURSES_DEV
)/usr
/include/
112 mkdir
-p
$(I_LIBNCURSES_DEV
)/usr
/lib
113 cp
-fpR
$(INSTALL_DIR
)/usr
/lib
/libncurses.a
$(I_LIBNCURSES_DEV
)/usr
/lib
/
114 cp
-fpR
$(INSTALL_DIR
)/usr
/lib
/libpanel.a
$(I_LIBNCURSES_DEV
)/usr
/lib
/
115 cp
-fpR
$(INSTALL_DIR
)/usr
/lib
/libncurses
*.so
* $(I_LIBNCURSES_DEV
)/usr
/lib
/
116 cp
-fpR
$(INSTALL_DIR
)/usr
/lib
/libpanel
*.so
* $(I_LIBNCURSES_DEV
)/usr
/lib
/
118 mkdir
-p
$(I_NCURSES_TERM
)/usr
/share
/terminfo
119 for f in a
/ansi d
/dumb l
/linux s
/screen v
/vt100
; do \
120 mkdir
-p
$(I_NCURSES_TERM
)/usr
/share
/terminfo
/`dirname $${f}`; \
122 $(INSTALL_DIR
)/usr
/share
/terminfo
/$${f} \
123 $(I_NCURSES_TERM
)/usr
/share
/terminfo
/$${f}; \
126 chmod
0755 ipkg
/*/CONTROL
/
127 chmod
0644 ipkg
/*/CONTROL
/control
129 perl
-pi
-e
"s/^Arch.*:.*/Architecture: $(ARCH)/g" ipkg
/*/CONTROL
/control
130 ifneq ($(strip $(PKG_VERSION
)),)
131 perl
-pi
-e
"s/^Vers.*:.*/Version: $(PKG_VERSION)/g" ipkg
/*/CONTROL
/control
134 $(IPKG_BUILD
) $(I_LIBNCURSES
) $(IPKG_TARGET_DIR
)
135 $(IPKG_BUILD
) $(I_LIBNCURSES_DEV
) $(IPKG_TARGET_DIR
)
136 $(IPKG_BUILD
) $(I_NCURSES_TERM
) $(IPKG_TARGET_DIR
)
142 DESTDIR
="$(INSTALL_DIR)" \
146 $(I_LIBNCURSES
)/usr \
147 $(I_LIBNCURSES_DEV
)/usr \
148 $(I_NCURSES_TERM
)/usr \
153 @cat
$(I_LIBNCURSES
)/CONTROL
/control
155 @cat
$(I_LIBNCURSES_DEV
)/CONTROL
/control
157 @cat
$(I_NCURSES_TERM
)/CONTROL
/control
161 .PHONY
: configure build
install package
clean control