Browse Source

less: import from oldpackages.

Current oldpackages version is latest stable.
Added myself as maintainer.
Signed-off-by: Julen Landa Alustiza <julen@zokormazo.info>
Julen Landa Alustiza 10 years ago
parent
commit
e16770df9a
1 changed files with 93 additions and 0 deletions
  1. 93
    0
      utils/less/Makefile

+ 93
- 0
utils/less/Makefile View File

@@ -0,0 +1,93 @@
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
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=less
11
+PKG_VERSION:=458
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=http://www.greenwoodsoftware.com/less
16
+PKG_MD5SUM:=935b38aa2e73c888c210dedf8fd94f49
17
+
18
+PKG_LICENSE:=GPL-3.0
19
+PKG_LICENSE_FILES:=COPYING
20
+PKG_MAINTAINER:=Julen Landa Alustiza <julen@zokormazo.info>
21
+
22
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
23
+PKG_INSTALL:=1
24
+PKG_BUILD_PARALLEL:=1
25
+
26
+include $(INCLUDE_DIR)/package.mk
27
+
28
+define Package/less/Default
29
+  SECTION:=utils
30
+  CATEGORY:=Utilities
31
+  TITLE:=Pager program similar to more
32
+  URL:=http://www.greenwoodsoftware.com/less/
33
+endef
34
+
35
+define Package/less/Default/description
36
+  Full version of GNU less utility
37
+endef
38
+
39
+define Package/less
40
+  $(call Package/less/Default)
41
+  DEPENDS:=+libncurses
42
+  VARIANT:=narrow
43
+endef
44
+
45
+define Package/less/description
46
+  $(call Package/less/Default/description)
47
+endef
48
+
49
+define Package/less-wide
50
+  $(call Package/less/Default)
51
+  TITLE+= (Unicode)
52
+  DEPENDS:=+libncursesw
53
+  VARIANT:=wide
54
+endef
55
+
56
+define Package/less-wide/description
57
+  $(call Package/less/Default/description)
58
+  This package contains the Unicode enabled version of less.
59
+endef
60
+
61
+ifeq ($(BUILD_VARIANT),narrow)
62
+	CONFIGURE_VARS += \
63
+		ac_cv_lib_ncursesw_initscr=no		
64
+endif
65
+
66
+ifeq ($(BUILD_VARIANT),wide)
67
+	CONFIGURE_VARS += \
68
+		ac_cv_lib_ncursesw_initscr=yes
69
+endif
70
+
71
+define Package/less/install
72
+	$(INSTALL_DIR) $(1)/bin
73
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/less $(1)/bin/less
74
+endef
75
+
76
+define Package/less/postinst
77
+#!/bin/sh
78
+[ -L "$${IPKG_INSTROOT}/usr/bin/less" ] && rm -f "$${IPKG_INSTROOT}/usr/bin/less"
79
+exit 0
80
+endef
81
+
82
+define Package/less/postrm
83
+#!/bin/sh
84
+/bin/busybox less -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/bin/less
85
+exit 0
86
+endef
87
+
88
+Package/less-wide/install = $(Package/less/install)
89
+Package/less-wide/postinst = $(Package/less/postinst)
90
+Package/less-wide/postrm = $(Package/less/postrm)
91
+
92
+$(eval $(call BuildPackage,less))
93
+$(eval $(call BuildPackage,less-wide))