You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.4 KiB

  1. #
  2. # Copyright (C) 2008-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=diffutils
  9. PKG_VERSION:=3.6
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/diffutils
  13. PKG_HASH:=d621e8bdd4b573918c8145f7ae61817d1be9deb4c8d2328a65cea8e11d783bd6
  14. PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
  15. PKG_LICENSE:=GPL-3.0
  16. PKG_INSTALL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/diffutils
  19. SECTION:=devel
  20. CATEGORY:=Development
  21. DEPENDS:=+USE_GLIBC:librt
  22. TITLE:=diffutils
  23. URL:=http://www.gnu.org/software/diffutils/
  24. endef
  25. define Package/diffutils/description
  26. The Diffutils package contains programs that show the differences between
  27. files or directories.
  28. endef
  29. CONFIGURE_VARS += \
  30. gl_cv_func_getopt_gnu=yes \
  31. ac_cv_func_mempcpy=n
  32. TARGET_CFLAGS += --std=gnu99
  33. define Package/diffutils/install
  34. $(INSTALL_DIR) $(1)/usr/bin
  35. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sdiff,diff3,diff,cmp} $(1)/usr/bin/
  36. endef
  37. define Package/diffutils/preinst
  38. #!/bin/sh
  39. for x in sdiff diff3 diff cmp; do
  40. [ -L "$${IPKG_INSTROOT}/usr/bin/$$x" ] && rm -f "$${IPKG_INSTROOT}/usr/bin/$$x"
  41. done
  42. exit 0
  43. endef
  44. define Package/diffutils/postrm
  45. #!/bin/sh
  46. for x in sdiff diff3 diff cmp; do
  47. /bin/busybox $$x -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/bin/$$x
  48. done
  49. exit 0
  50. endef
  51. $(eval $(call BuildPackage,diffutils))