New lossless data compression algorithm.
Signed-off-by: Erik Kapfer erik.kapfer@ipfire.org --- config/rootfiles/common/lz4 | 17 +++++ lfs/lz4 | 87 ++++++++++++++++++++++++++ make.sh | 1 + src/patches/lz4-1.8.1.2_mod_install_path.patch | 36 +++++++++++ 4 files changed, 141 insertions(+) create mode 100644 config/rootfiles/common/lz4 create mode 100644 lfs/lz4 create mode 100644 src/patches/lz4-1.8.1.2_mod_install_path.patch
diff --git a/config/rootfiles/common/lz4 b/config/rootfiles/common/lz4 new file mode 100644 index 0000000..3b8bc2f --- /dev/null +++ b/config/rootfiles/common/lz4 @@ -0,0 +1,17 @@ +usr/bin/lz4 +#usr/bin/lz4c +#usr/bin/lz4cat +#usr/bin/unlz4 +#usr/include/lz4.h +#usr/include/lz4frame.h +#usr/include/lz4frame_static.h +#usr/include/lz4hc.h +#usr/lib/liblz4.a +usr/lib/liblz4.so +usr/lib/liblz4.so.1 +usr/lib/liblz4.so.1.8.1 +#usr/lib/pkgconfig/liblz4.pc +#usr/share/man/man1/lz4.1 +#usr/share/man/man1/lz4c.1 +#usr/share/man/man1/lz4cat.1 +#usr/share/man/man1/unlz4.1 diff --git a/lfs/lz4 b/lfs/lz4 new file mode 100644 index 0000000..6f2bef2 --- /dev/null +++ b/lfs/lz4 @@ -0,0 +1,87 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2018 IPFire Team info@ipfire.org # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 1.8.1.2 + +THISAPP = lz4-$(VER) +DL_FILE = $(THISAPP).tar.gz +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) +PROG = lz4 + +DEPS = "" + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = 343538e69ba752a386c669b1a28111e2 + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +dist: + @$(PAK) + +############################################################################### +# Downloading, checking, md5sum +############################################################################### + +$(patsubst %,$(DIR_CHK)/%,$(objects)) : + @$(CHECK) + +$(patsubst %,$(DIR_DL)/%,$(objects)) : + @$(LOAD) + +$(subst %,%_MD5,$(objects)) : + @$(MD5) + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/lz4-1.8.1.2_mod_install_path.patch + + cd $(DIR_APP) && make $(MAKETUNING) + cd $(DIR_APP) && make install + + @rm -rf $(DIR_APP) + @$(POSTBUILD) + + diff --git a/make.sh b/make.sh index 3f10ffa..21b928d 100755 --- a/make.sh +++ b/make.sh @@ -1032,6 +1032,7 @@ buildipfire() { export LOGFILE lfsmake2 configroot lfsmake2 initscripts + lfsmake2 lz4 lfsmake2 backup lfsmake2 pkg-config lfsmake2 libusb diff --git a/src/patches/lz4-1.8.1.2_mod_install_path.patch b/src/patches/lz4-1.8.1.2_mod_install_path.patch new file mode 100644 index 0000000..8b9646e --- /dev/null +++ b/src/patches/lz4-1.8.1.2_mod_install_path.patch @@ -0,0 +1,36 @@ +diff -Nur lz4-1.8.1.2.orig/lib/Makefile lz4-1.8.1.2/lib/Makefile +--- lz4-1.8.1.2.orig/lib/Makefile 2018-01-21 07:24:41.881357925 +0000 ++++ lz4-1.8.1.2/lib/Makefile 2018-01-21 07:25:44.823444081 +0000 +@@ -120,7 +120,7 @@ + # directory variables : GNU conventions prefer lowercase + # see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html + # support both lower and uppercase (BSD), use uppercase in script +-prefix ?= /usr/local ++prefix ?= /usr + PREFIX ?= $(prefix) + exec_prefix ?= $(PREFIX) + libdir ?= $(exec_prefix)/lib +diff -Nur lz4-1.8.1.2.orig/NEWS lz4-1.8.1.2/NEWS +--- lz4-1.8.1.2.orig/NEWS 2018-01-21 07:24:41.809360114 +0000 ++++ lz4-1.8.1.2/NEWS 2018-01-21 07:26:00.838957106 +0000 +@@ -96,7 +96,7 @@ + New : lz4 cli supports long commands (suggested by Takayuki Matsuoka) + New : lz4frame & lz4cli frame content size support + New : lz4frame supports skippable frames, as requested by Sergey Cherepanov +-Changed: Default "make install" directory is /usr/local, as notified by Ron Johnson ++Changed: Default "make install" directory is /usr, as notified by Ron Johnson + New : lz4 cli supports "pass-through" mode, requested by Neil Wilson + New : datagen can generate sparse files + New : scan-build tests, thanks to kind help by Takayuki Matsuoka +diff -Nur lz4-1.8.1.2.orig/programs/Makefile lz4-1.8.1.2/programs/Makefile +--- lz4-1.8.1.2.orig/programs/Makefile 2018-01-21 07:24:41.881357925 +0000 ++++ lz4-1.8.1.2/programs/Makefile 2018-01-21 07:26:24.562235766 +0000 +@@ -121,7 +121,7 @@ + # directory variables : GNU conventions prefer lowercase + # see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html + # support both lower and uppercase (BSD), use uppercase in script +-prefix ?= /usr/local ++prefix ?= /usr + PREFIX ?= $(prefix) + exec_prefix ?= $(PREFIX) + bindir ?= $(exec_prefix)/bin