[packages] diffutils: update to 3.0, use PKG_INSTALL, handle the busybox diff applet on preinst and postrm, cleanup
git-svn-id: svn://svn.openwrt.org/openwrt/packages@22354 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
793cafa295
commit
81d7813ad3
@ -8,11 +8,14 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=diffutils
|
PKG_NAME:=diffutils
|
||||||
PKG_VERSION:=2.8.1
|
PKG_VERSION:=3.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_MD5SUM:=71f9c5ae19b60608f6c7f162da86a428
|
|
||||||
PKG_SOURCE_URL:=@GNU/diffutils
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=@GNU/diffutils
|
||||||
|
PKG_MD5SUM:=684aaba1baab743a2a90e52162ff07da
|
||||||
|
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
@ -24,21 +27,30 @@ define Package/diffutils
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/diffutils/description
|
define Package/diffutils/description
|
||||||
The Diffutils package contains programs that show the differences between files or directories.
|
The Diffutils package contains programs that show the differences between
|
||||||
|
files or directories.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Configure
|
CONFIGURE_VARS += \
|
||||||
$(CP) $(SCRIPT_DIR)/config.* $(PKG_BUILD_DIR)/config/
|
ac_cv_func_mempcpy=n \
|
||||||
$(call Build/Configure/Default,ac_cv_func_mempcpy=n)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
$(MAKE_VARS) $(MAKE) $(MAKE_ARGS) -C $(PKG_BUILD_DIR) all
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/diffutils/install
|
define Package/diffutils/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/{sdiff,diff3,diff,cmp} $(1)/usr/bin/
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sdiff,diff3,diff,cmp} $(1)/usr/bin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/diffutils/preinst
|
||||||
|
#!/bin/sh
|
||||||
|
if [ -e $${IPKG_INSTROOT}/usr/bin/diff ]; then
|
||||||
|
rm $${IPKG_INSTROOT}/usr/bin/diff;
|
||||||
|
fi
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/diffutils/postrm
|
||||||
|
#!/bin/sh
|
||||||
|
ln -sf ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/diff
|
||||||
|
$${IPKG_INSTROOT}/usr/bin/diff 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/diff
|
||||||
|
exit 0
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,diffutils))
|
$(eval $(call BuildPackage,diffutils))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user