[packages] less: fix clash with Busybox (#11042)

git-svn-id: svn://svn.openwrt.org/openwrt/packages@30720 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2012-02-25 14:54:58 +00:00
parent ffd23dbbbc
commit 390ac9d680

View File

@ -1,5 +1,5 @@
# #
# Copyright (C) 2010 OpenWrt.org # Copyright (C) 2010-2012 OpenWrt.org
# #
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=less PKG_NAME:=less
PKG_VERSION:=436 PKG_VERSION:=436
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.greenwoodsoftware.com/less PKG_SOURCE_URL:=http://www.greenwoodsoftware.com/less
@ -30,8 +30,20 @@ define Package/less/description
endef endef
define Package/less/install define Package/less/install
$(INSTALL_DIR) $(1)/usr/bin $(INSTALL_DIR) $(1)/bin
$(CP) $(PKG_BUILD_DIR)/less $(1)/usr/bin/less $(CP) $(PKG_BUILD_DIR)/less $(1)/bin/less
endef
define Package/less/postinst
#!/bin/sh
[ -L "$${IPKG_INSTROOT}/usr/bin/less" ] && rm -f "$${IPKG_INSTROOT}/usr/bin/less"
exit 0
endef
define Package/less/postrm
#!/bin/sh
/bin/busybox less -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/bin/less
exit 0
endef endef
$(eval $(call BuildPackage,less)) $(eval $(call BuildPackage,less))