source: packages/utils/less/Makefile @ 30896

Last change on this file since 30896 was 30896, checked in by swalker, 4 years ago

[packages] less: update to 444, add wide variant (#8787), use PKG_INSTALL

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