diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2016-02-27 22:59:13 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2016-02-27 22:59:13 +0000 |
commit | 832251a616b626f834a11ca3f81f30c3fec592d0 (patch) | |
tree | 61d7657b6eb2cadfd41a09cb425a2bb472b18b36 /package/utils/bsdiff/Makefile | |
parent | 9a945382724f61880fcb7df9e6cb2db4be645598 (diff) | |
download | mtk-20170518-832251a616b626f834a11ca3f81f30c3fec592d0.zip mtk-20170518-832251a616b626f834a11ca3f81f30c3fec592d0.tar.gz mtk-20170518-832251a616b626f834a11ca3f81f30c3fec592d0.tar.bz2 |
bsdiff: add bsdiff and bspatch tool package
This will be used to create a diff between the Lantiq annex A and the
annex B firmware.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 48810
Diffstat (limited to 'package/utils/bsdiff/Makefile')
-rw-r--r-- | package/utils/bsdiff/Makefile | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/package/utils/bsdiff/Makefile b/package/utils/bsdiff/Makefile new file mode 100644 index 0000000..9904b7e --- /dev/null +++ b/package/utils/bsdiff/Makefile @@ -0,0 +1,78 @@ +# +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=bsdiff +PKG_VERSION:=4.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.daemonology.net/bsdiff/ +PKG_MD5SUM:=e6d812394f0e0ecc8d5df255aa1db22a +PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de> + +PKG_LICENSE:=BSD-2-Clause + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/package.mk + +define Package/bsdiff + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libbz2 + TITLE:=Binary diff tool + URL:=http://www.daemonology.net/bsdiff/ +endef + +define Package/bspatch + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libbz2 + TITLE:=Binary patch tool + URL:=http://www.daemonology.net/bsdiff/ +endef + + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ + -o $(PKG_BUILD_DIR)/bsdiff \ + $(PKG_BUILD_DIR)/bsdiff.c -lbz2 + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ + -o $(PKG_BUILD_DIR)/bspatch \ + $(PKG_BUILD_DIR)/bspatch.c -lbz2 +endef + +define Package/bsdiff/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bsdiff $(1)/usr/bin/bsdiff +endef + +define Package/bspatch/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bspatch $(1)/usr/bin/bspatch +endef + +define Host/Install + $(INSTALL_DIR) $(STAGING_DIR)/host/bin/ + $(MAKE) -C $(HOST_BUILD_DIR) PREFIX=$(STAGING_DIR)/host/ install +endef + +define Host/Compile + $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \ + -o $(HOST_BUILD_DIR)/bsdiff \ + $(HOST_BUILD_DIR)/bsdiff.c -lbz2 +endef + +define Host/Install + $(INSTALL_BIN) $(HOST_BUILD_DIR)/bsdiff $(STAGING_DIR)/host/bin/ +endef + +$(eval $(call HostBuild)) + +$(eval $(call BuildPackage,bsdiff)) +$(eval $(call BuildPackage,bspatch)) |