[packages] less: fix clash with Busybox (#11042)
[openwrt/svn-archive/archive.git] / utils / less / Makefile
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:=436
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.greenwoodsoftware.com/less
16 PKG_MD5SUM:=817bf051953ad2dea825a1cdf460caa4
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/less
21 SECTION:=utils
22 CATEGORY:=Utilities
23 TITLE:=Pager program similar to more
24 DEPENDS:= +libncurses
25 URL:=http://www.greenwoodsoftware.com/less/
26 endef
27
28 define Package/less/description
29 Full version of GNU less utility
30 endef
31
32 define Package/less/install
33 $(INSTALL_DIR) $(1)/bin
34 $(CP) $(PKG_BUILD_DIR)/less $(1)/bin/less
35 endef
36
37 define Package/less/postinst
38 #!/bin/sh
39 [ -L "$${IPKG_INSTROOT}/usr/bin/less" ] && rm -f "$${IPKG_INSTROOT}/usr/bin/less"
40 exit 0
41 endef
42
43 define Package/less/postrm
44 #!/bin/sh
45 /bin/busybox less -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/bin/less
46 exit 0
47 endef
48
49 $(eval $(call BuildPackage,less))