Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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.3
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/diffutils
  13. PKG_MD5SUM:=99180208ec2a82ce71f55b0d7389f1b3
  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. ac_cv_func_mempcpy=n
  31. TARGET_CFLAGS += --std=gnu99
  32. define Package/diffutils/install
  33. $(INSTALL_DIR) $(1)/usr/bin
  34. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sdiff,diff3,diff,cmp} $(1)/usr/bin/
  35. endef
  36. define Package/diffutils/preinst
  37. #!/bin/sh
  38. for x in sdiff diff3 diff cmp; do
  39. [ -L "$${IPKG_INSTROOT}/usr/bin/$$x" ] && rm -f "$${IPKG_INSTROOT}/usr/bin/$$x"
  40. done
  41. exit 0
  42. endef
  43. define Package/diffutils/postrm
  44. #!/bin/sh
  45. for x in sdiff diff3 diff cmp; do
  46. /bin/busybox $$x -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/bin/$$x
  47. done
  48. exit 0
  49. endef
  50. $(eval $(call BuildPackage,diffutils))