]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - lfs/Config
xz: Performance and compression tuning (V2) - fine tuning
[people/pmueller/ipfire-2.x.git] / lfs / Config
index d2ac8e4237633b7ec96bda6605bcadefad545204..a726f171d7bdbf5436b2cf3130290638070df922 100644 (file)
@@ -31,7 +31,7 @@
 ###############################################################################
 
 # Cleanup environment from any variables
-unexport BUILD_ARCH BUILD_PLATFORM BUILDTARGET CROSSTARGET TOOLCHAIN
+unexport BUILD_ARCH BUILD_PLATFORM BUILDTARGET CROSSTARGET TOOLCHAIN TOOLS_DIR
 
 ifeq "$(BUILD_ARCH)" "aarch64"
        IS_64BIT = 1
@@ -41,6 +41,14 @@ ifeq "$(BUILD_ARCH)" "x86_64"
        IS_64BIT = 1
 endif
 
+ifeq "$(TOOLCHAIN)" "1"
+       PREFIX = $(TOOLS_DIR)
+else
+       PREFIX = /usr
+endif
+
+TAR_OPTIONS = --xz
+
 # URLs that are common sources of downloads.  If you're having trouble with
 # a site you should change its URL to that of a suitable mirror site.
 #
@@ -80,7 +88,7 @@ CCACHE_COMPILERCHECK += $(shell gcc -dumpspecs 2>/dev/null | md5sum | cut -d ' '
 #
 define FIND_FILES
        cd $(ROOT)/ && find -mount \
-               \( -path './tools' -or -path './tmp' -or -path './usr/src' \
+               \( -path '.$(TOOLS_DIR)' -or -path './tmp' -or -path './usr/src' \
                -or -path './run' -or -path './dev' -or -path './proc' \
                -or -path './install' \) -prune -or -print | sort
 endef
@@ -175,7 +183,6 @@ define MD5
        # error mean file signature don't match the one in lfs script
        [ "$($@_MD5)" = `md5sum $(DIR_DL)/$@ | awk '{ print $$1 }'` ]
        echo "$@ checksum OK"
-       echo "$@" >>$(DIR_INFO)/_build.othersrc-list.log
 endef
 
 define PAK
@@ -204,11 +211,11 @@ define PAK
        tar xf /install/packages/package/files.tmp -C /install/packages/package/tmp/ \
                -p --numeric-owner
        rm -f /install/packages/package/files.tmp
-       cd /install/packages/package/tmp/ && XZ_OPT="-T0 --best" tar -c -p --numeric-owner -J -f /install/packages/package/files.tar.xz *
+       cd /install/packages/package/tmp/ && XZ_OPT="$(XZ_OPT)" tar -c -p --numeric-owner -J -f /install/packages/package/files.tar.xz $(TAR_OPTIONS) *
        rm -r /install/packages/package/tmp
        -cat /install/packages/package/ROOTFILES | grep -v "#" > /install/packages/package/ROOTFILES.tmp
        mv /install/packages/package/ROOTFILES.tmp /install/packages/package/ROOTFILES
-       cd /install/packages/package && tar cf ../$(PROG)-$(VER)-$(PAK_VER).ipfire --files-from=/usr/src/src/paks/files
+       cd /install/packages/package && XZ_OPT="$(XZ_OPT)" tar cf ../$(PROG)-$(VER)-$(PAK_VER).ipfire $(TAR_OPTIONS) --files-from=/usr/src/src/paks/files
        rm -rf /install/packages/package
        sed -e s/NAME/$(PROG)/g \
                        -e s/VER/$(VER)/g \