1
0

Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #
  2. # Copyright (C) 2016 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:=bsdiff
  9. PKG_VERSION:=4.3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://www.daemonology.net/bsdiff/
  13. PKG_HASH:=18821588b2dc5bf159aa37d3bcb7b885d85ffd1e19f23a0c57a58723fea85f48
  14. PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
  15. HOST_BUILD_DEPENDS:=bzip2/host
  16. PKG_LICENSE:=BSD-2-Clause
  17. include $(INCLUDE_DIR)/host-build.mk
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/bsdiff
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. DEPENDS:=+libbz2
  23. TITLE:=Binary diff tool
  24. URL:=http://www.daemonology.net/bsdiff/
  25. endef
  26. define Package/bspatch
  27. SECTION:=utils
  28. CATEGORY:=Utilities
  29. DEPENDS:=+libbz2
  30. TITLE:=Binary patch tool
  31. URL:=http://www.daemonology.net/bsdiff/
  32. endef
  33. define Build/Compile
  34. $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
  35. -o $(PKG_BUILD_DIR)/bsdiff \
  36. $(PKG_BUILD_DIR)/bsdiff.c -lbz2
  37. $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
  38. -o $(PKG_BUILD_DIR)/bspatch \
  39. $(PKG_BUILD_DIR)/bspatch.c -lbz2
  40. endef
  41. define Package/bsdiff/install
  42. $(INSTALL_DIR) $(1)/usr/bin/
  43. $(INSTALL_BIN) $(PKG_BUILD_DIR)/bsdiff $(1)/usr/bin/bsdiff
  44. endef
  45. define Package/bspatch/install
  46. $(INSTALL_DIR) $(1)/usr/bin/
  47. $(INSTALL_BIN) $(PKG_BUILD_DIR)/bspatch $(1)/usr/bin/bspatch
  48. endef
  49. define Host/Install
  50. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
  51. $(MAKE) -C $(HOST_BUILD_DIR) PREFIX=$(STAGING_DIR_HOSTPKG)/ install
  52. endef
  53. define Host/Compile
  54. $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
  55. -o $(HOST_BUILD_DIR)/bsdiff \
  56. $(HOST_BUILD_DIR)/bsdiff.c -lbz2
  57. endef
  58. define Host/Install
  59. $(INSTALL_BIN) $(HOST_BUILD_DIR)/bsdiff $(STAGING_DIR_HOSTPKG)/bin/
  60. endef
  61. $(eval $(call HostBuild))
  62. $(eval $(call BuildPackage,bsdiff))
  63. $(eval $(call BuildPackage,bspatch))