###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
+# Copyright (C) 2007-2021 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 #
unexport XZ_OPT
PARALLELISM = $(shell echo $$( \
- if [ -n "$(MAX_PARALLELISM)" ] && [ $(MAX_PARALLELISM) -lt $(DEFAULT_PARALLELISM) ]; then \
+ if [ -n "$(MAX_PARALLELISM)" ] && [ $(MAX_PARALLELISM) -lt 1 ]; then \
+ echo 1 ; \
+ elif [ -n "$(MAX_PARALLELISM)" ] && [ $(MAX_PARALLELISM) -lt $(DEFAULT_PARALLELISM) ]; then \
echo $(MAX_PARALLELISM); \
else \
echo $(DEFAULT_PARALLELISM); \
IS_32BIT = 1
endif
-ifeq "$(BUILD_ARCH)" "armv5tel"
+ifeq "$(BUILD_ARCH)" "armv6l"
IS_32BIT = 1
endif
IS_32BIT = 1
endif
+ifeq "$(BUILD_ARCH)" "riscv64"
+ IS_64BIT = 1
+endif
+
ifeq "$(TOOLCHAIN)" "1"
PREFIX = $(TOOLS_DIR)
else
--acls \
--xattrs --xattrs-include='*'
+ZSTD_OPTIONS = \
+ -T$(PARALLELISM) \
+ -19 \
+ --long
+
# 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.
#
rm -rf $(DIR_TMP_PAK)/root && mkdir -p $(DIR_TMP_PAK)/root
tar -c --exclude='#*' --exclude='proc/*' --exclude='dev/pts/*' --exclude='tmp/*' \
--exclude='__pycache__' \
- -C / --files-from=$(DIR_TMP_PAK)/ROOTFILES | tar -x -C $(DIR_TMP_PAK)/root
+ -C / --files-from=$(DIR_TMP_PAK)/ROOTFILES | tar -x -C $(DIR_TMP_PAK)/root; \
+ exit $${PIPESTATUS[0]}
# Compress tarball
cd $(DIR_TMP_PAK)/root && tar cf - * | xz $(XZ_OPT) > $(DIR_TMP_PAK)/files.tar.xz
ifeq "$(BUILD_ARCH)" "$(filter $(BUILD_ARCH),aarch64 riscv64)"
define UPDATE_AUTOMAKE
for i in $$(find $(DIR_APP) -name config.guess -o -name config.sub); do \
- cp -vf /usr/share/automake*/$$(basename $${i}) $${i}; \
+ cp -vf /usr/share/automake*/$$(basename $${i}) $${i} || \
+ cp -vf $(TOOLS_DIR)/share/automake*/$$(basename $${i}) $${i}; \
done
endef
endif