]> 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 a45b76b995d00e1ca0688180427639ef089bd51f..a726f171d7bdbf5436b2cf3130290638070df922 100644 (file)
@@ -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.
 #
@@ -203,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 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 \