Module: check_mk
Branch: master
Commit: f3bc7674a09a4f192a07b6411763e7944b00149b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f3bc7674a09a4f…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Mon May 28 10:23:29 2018 +0200
Use .tar.gz instead of .7z for snap7.
Change-Id: Ie78ce47ce2c62e7f2a80683db061b69e65903b1c
---
omd/packages/snap7/Makefile | 18 ++++++++++++++----
omd/packages/snap7/snap7-full-1.4.2.7z | Bin 20591252 -> 0 bytes
omd/packages/snap7/snap7-full-1.4.2.tar.gz | Bin 0 -> 877241 bytes
3 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/omd/packages/snap7/Makefile b/omd/packages/snap7/Makefile
index 854caaa..52fb590 100644
--- a/omd/packages/snap7/Makefile
+++ b/omd/packages/snap7/Makefile
@@ -10,11 +10,11 @@ ifeq ($(ARCH),i686)
ARCH=i386
endif
-.PHONY: build install skel clean
+.PHONY: build install skel clean repackage
build: check-python
- 7z x $(DIR).7z
- cd $(DIR)/build/unix && $(MAKE) -f $(ARCH)_linux.mk
+ tar xzf $(DIR).tar.gz
+ $(MAKE) -C $(DIR)/build/unix -f $(ARCH)_linux.mk
install:
mkdir -p $(DESTDIR)$(OMD_ROOT)/lib
@@ -23,4 +23,14 @@ install:
skel:
clean:
- rm -rf $(DIR) $(PY_DIR)
+ rm -rf $(DIR) $(DIR).7z
+
+# The original 7z file is quite large (20MB), because it contains tons of
+# executables, but we don't need any of them. An equivalent .tar.gz would almost
+# be 60MB. Furthermore, requiring a 7z command at build time on a ton of
+# platforms is annoying (adding repos, varying names, etc.), so we repackage the
+# 7z file to a standard gzipped tar file.
+repackage: clean
+ wget
https://sourceforge.net/projects/snap7/files/$(VERSION)/$(DIR).7z
+ 7z x $(DIR).7z
+ GZIP=-9 tar cvzf $(DIR).tar.gz $(DIR)/build $(DIR)/src $(DIR)/*.txt
diff --git a/omd/packages/snap7/snap7-full-1.4.2.7z
b/omd/packages/snap7/snap7-full-1.4.2.7z
deleted file mode 100644
index 96d4565..0000000
Binary files a/omd/packages/snap7/snap7-full-1.4.2.7z and /dev/null differ
diff --git a/omd/packages/snap7/snap7-full-1.4.2.tar.gz
b/omd/packages/snap7/snap7-full-1.4.2.tar.gz
new file mode 100644
index 0000000..4ecb82f
Binary files /dev/null and b/omd/packages/snap7/snap7-full-1.4.2.tar.gz differ