From: Huangbin Zhan Date: Tue, 23 Jun 2020 14:37:43 +0000 (+0800) Subject: gzip: alternatives instead of postinst X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=77cc3464386b20bc25396d8fe6faed61b7b45eee;p=feed%2Fpackages.git gzip: alternatives instead of postinst Signed-off-by: Huangbin Zhan --- diff --git a/utils/gzip/Makefile b/utils/gzip/Makefile index 0b64553e3f..6a6eede46b 100644 --- a/utils/gzip/Makefile +++ b/utils/gzip/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gzip PKG_VERSION:=1.10 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gzip @@ -29,6 +29,10 @@ define Package/gzip TITLE:=gzip (GNU zip) is a compression utility. URL:=https://www.gnu.org/software/gzip/ MAINTAINER:=Christian Beier + ALTERNATIVES:=\ + 300:/bin/gunzip:/usr/libexec/gunzip-gnu \ + 300:/bin/gzip:/usr/libexec/gzip-gnu \ + 300:/bin/zcat:/usr/libexec/zcat-gnu endef define Package/gzip/description @@ -42,25 +46,10 @@ CONFIGURE_VARS += \ define Package/gzip/install $(SED) 's,/bin/bash,/bin/sh,g' $(PKG_INSTALL_DIR)/usr/bin/{gunzip,zcat} - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{gunzip,gzip,zcat} $(1)/usr/bin/ -endef - -define Package/gzip/postinst -#!/bin/sh -for app in gunzip gzip zcat; do - ln -sf ../usr/bin/$$app $${IPKG_INSTROOT}/bin/$$app -done -endef - -define Package/gzip/postrm -#!/bin/sh -for app in gunzip gzip zcat; do - ln -sf busybox $${IPKG_INSTROOT}/bin/$$app - $${IPKG_INSTROOT}/bin/$$app 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/bin/$$app -done -exit 0 + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gunzip $(1)/usr/libexec/gunzip-gnu + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gzip $(1)/usr/libexec/gzip-gnu + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/zcat $(1)/usr/libexec/zcat-gnu endef $(eval $(call BuildPackage,gzip)) -