You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.1 KiB

  1. #
  2. # Copyright (C) 2010-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=less
  9. PKG_VERSION:=481
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://www.greenwoodsoftware.com/less
  13. PKG_HASH:=3fa38f2cf5e9e040bb44fffaa6c76a84506e379e47f5a04686ab78102090dda5
  14. PKG_LICENSE:=GPL-3.0
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_MAINTAINER:=Julen Landa Alustiza <julen@zokormazo.info>
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/less/Default
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. TITLE:=Pager program similar to more
  25. URL:=http://www.greenwoodsoftware.com/less/
  26. endef
  27. define Package/less/Default/description
  28. Full version of GNU less utility
  29. endef
  30. define Package/less
  31. $(call Package/less/Default)
  32. DEPENDS:=+libncurses
  33. VARIANT:=narrow
  34. endef
  35. define Package/less/description
  36. $(call Package/less/Default/description)
  37. endef
  38. define Package/less-wide
  39. $(call Package/less/Default)
  40. TITLE+= (Unicode)
  41. DEPENDS:=+libncursesw
  42. VARIANT:=wide
  43. endef
  44. define Package/less-wide/description
  45. $(call Package/less/Default/description)
  46. This package contains the Unicode enabled version of less.
  47. endef
  48. ifeq ($(BUILD_VARIANT),narrow)
  49. CONFIGURE_VARS += \
  50. ac_cv_lib_ncursesw_initscr=no
  51. endif
  52. ifeq ($(BUILD_VARIANT),wide)
  53. CONFIGURE_VARS += \
  54. ac_cv_lib_ncursesw_initscr=yes
  55. endif
  56. define Package/less/install
  57. $(INSTALL_DIR) $(1)/bin
  58. $(CP) $(PKG_INSTALL_DIR)/usr/bin/less $(1)/bin/less
  59. endef
  60. define Package/less/postinst
  61. #!/bin/sh
  62. [ -L "$${IPKG_INSTROOT}/usr/bin/less" ] && rm -f "$${IPKG_INSTROOT}/usr/bin/less"
  63. exit 0
  64. endef
  65. define Package/less/postrm
  66. #!/bin/sh
  67. /bin/busybox less -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/bin/less
  68. exit 0
  69. endef
  70. Package/less-wide/install = $(Package/less/install)
  71. Package/less-wide/postinst = $(Package/less/postinst)
  72. Package/less-wide/postrm = $(Package/less/postrm)
  73. $(eval $(call BuildPackage,less))
  74. $(eval $(call BuildPackage,less-wide))