-$(STAGING_DIR)/usr/lib/libncurses.so: $(PKG_BUILD_DIR)/.built
- mkdir -p $(STAGING_DIR)/usr/include
- cp -fpR $(PKG_INSTALL_DIR)/usr/include/curses.h $(STAGING_DIR)/usr/include/
- cp -fpR $(PKG_INSTALL_DIR)/usr/include/{ncurses,panel}.h $(STAGING_DIR)/usr/include/
- cp -fpR $(PKG_INSTALL_DIR)/usr/include/panel.h $(STAGING_DIR)/usr/include/
- cp -fpR $(PKG_INSTALL_DIR)/usr/include/term{,cap}.h $(STAGING_DIR)/usr/include/
- cp -fpR $(PKG_INSTALL_DIR)/usr/include/unctrl.h $(STAGING_DIR)/usr/include/
- mkdir -p $(STAGING_DIR)/usr/lib
- cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libcurses.so $(STAGING_DIR)/usr/lib/
- cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel}.{a,so*} $(STAGING_DIR)/usr/lib/
-
-install-dev: $(STAGING_DIR)/usr/lib/libncurses.so
-
-uninstall-dev:
- rm -rf \
- $(PKG_INSTALL_DIR)/usr/include/curses.h \
- $(PKG_INSTALL_DIR)/usr/include/{ncurses,panel}.h \
- $(PKG_INSTALL_DIR)/usr/include/panel.h \
- $(PKG_INSTALL_DIR)/usr/include/term{,cap}.h \
- $(PKG_INSTALL_DIR)/usr/include/unctrl.h \
- $(PKG_INSTALL_DIR)/usr/lib/libcurses.so \
- $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel}.{a,so*} \
+define Package/libncurses/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu,form}*.so.* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/share/terminfo
+ (cd $(PKG_INSTALL_DIR)/usr/share/terminfo; \
+ for dir in ??; do \
+ [ -d "$$$$dir" ] || continue; \
+ mv $$$$dir $$$$(echo -ne "\x$$$$dir"); \
+ done \
+ )
+ for file in a/ansi d/dumb l/linux r/rxvt s/screen v/vt100 v/vt102 x/xterm x/xterm-color; do \
+ $(INSTALL_DIR) $(1)/usr/share/terminfo/`dirname $$$$file`; \
+ $(CP) $(PKG_INSTALL_DIR)/usr/share/terminfo/$$$$file \
+ $(1)/usr/share/terminfo/$$$$file; \
+ done
+endef