mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
less: add ALTERNATIVES
This package can not be installed if you have installed less from
busybox.
Collected errors:
* check_data_file_clashes: Package less wants to install file /bin/less
But that file is already provided by package * busybox
* opkg_install_cmd: Cannot install package less.
To avoid this error, I moved it from /bin/less to /usr/bin/less.
If you install it now, it changes symlink from busybox to /usr/bin/less
/bin/less -> busybox*
/bin/less -> /usr/bin/less*
When you remove it, it changes symlink back to busybox.
That's why postint and postrm scripts are no longer needed.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
This commit is contained in:
+4
-15
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user