From: Erik Kapfer Date: Mon, 22 Jan 2018 18:04:59 +0000 (+0100) Subject: LZ4: New compression library. X-Git-Tag: v2.19-core118~3^2~17 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=adf3f4f4fe1a067544661a884c50c12b0eb89c65 LZ4: New compression library. New lossless data compression algorithm. Signed-off-by: Erik Kapfer Signed-off-by: Michael Tremer --- diff --git a/config/rootfiles/common/lz4 b/config/rootfiles/common/lz4 new file mode 100644 index 0000000000..0902a47fed --- /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 0000000000..06d192e3cb --- /dev/null +++ b/lfs/lz4 @@ -0,0 +1,83 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2018 IPFire Team # +# # +# 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 . # +# # +############################################################################### + +############################################################################### +# 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 + +############################################################################### +# 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 3f10ffaec5..530186c2ea 100755 --- a/make.sh +++ b/make.sh @@ -1282,6 +1282,7 @@ buildipfire() { lfsmake2 wireless lfsmake2 pakfire lfsmake2 spandsp + lfsmake2 lz4 lfsmake2 lzo lfsmake2 openvpn lfsmake2 pammysql 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 0000000000..8b9646e1c0 --- /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