Merge pull request #11915 from BKPepe/less-add-alternatives
less: add ALTERNATIVES
This commit is contained in:
commit
19d9bfdec7
1 changed files with 4 additions and 15 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=less
|
PKG_NAME:=less
|
||||||
PKG_VERSION:=530
|
PKG_VERSION:=530
|
||||||
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,6 +30,7 @@ define Package/less/Default
|
||||||
CATEGORY:=Utilities
|
CATEGORY:=Utilities
|
||||||
TITLE:=Pager program similar to more
|
TITLE:=Pager program similar to more
|
||||||
URL:=http://www.greenwoodsoftware.com/less/
|
URL:=http://www.greenwoodsoftware.com/less/
|
||||||
|
ALTERNATIVES:=200:/bin/less:/usr/bin/less
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/less/Default/description
|
define Package/less/Default/description
|
||||||
|
@ -69,20 +70,8 @@ ifeq ($(BUILD_VARIANT),wide)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
define Package/less/install
|
define Package/less/install
|
||||||
$(INSTALL_DIR) $(1)/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/less $(1)/bin/less
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/less $(1)/usr/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
|
||||||
|
|
||||||
Package/less-wide/install = $(Package/less/install)
|
Package/less-wide/install = $(Package/less/install)
|
||||||
|
|
Loading…
Reference in a new issue