mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
contrib: add BATCH_MODE env var to reduce log size
If BATCH_MODE is set to a non-empty string, downloads and uncompress tools are silented to reduce the size of the output console log. This is not enable by default to let manual usage fully verbose. This is useful in case of automatic builds. Change-Id: I7efa6c0f9e8a2edf991030cb7e30d25227ea6674 Reviewed-by: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
This commit is contained in:

committed by
Stepan Salenikovich

parent
bcc4c172e4
commit
c398f8167e
@ -184,7 +184,7 @@ $(TARBALLS)/ffmpeg-$(FFMPEG_HASH).tar.xz:
|
||||
ffmpeg: ffmpeg-$(FFMPEG_HASH).tar.xz .sum-ffmpeg
|
||||
rm -Rf $@ $@-$(FFMPEG_HASH)
|
||||
mkdir -p $@-$(FFMPEG_HASH)
|
||||
(cd $@-$(FFMPEG_HASH) && tar xv --strip-components=1 -f ../$<)
|
||||
(cd $@-$(FFMPEG_HASH) && tar x $(if ${BATCH_MODE},,-v) --strip-components=1 -f ../$<)
|
||||
$(UPDATE_AUTOCONFIG)
|
||||
$(APPLY) $(SRC)/ffmpeg/0004-avformat-fix-find_stream_info-not-considering-extradata.patch
|
||||
$(MOVE)
|
||||
|
@ -182,7 +182,7 @@ $(TARBALLS)/libav-$(LIBAV_HASH).tar.xz:
|
||||
libav: libav-$(LIBAV_HASH).tar.xz .sum-libav
|
||||
rm -Rf $@ $@-$(LIBAV_HASH)
|
||||
mkdir -p $@-$(LIBAV_HASH)
|
||||
(cd $@-$(LIBAV_HASH) && tar xv --strip-components=1 -f ../$<)
|
||||
(cd $@-$(LIBAV_HASH) && tar x $(if ${BATCH_MODE},,-v) --strip-components=1 -f ../$<)
|
||||
$(UPDATE_AUTOCONFIG)
|
||||
ifdef HAVE_MACOSX
|
||||
$(APPLY) $(SRC)/libav/0005-avfoundation-simple-capture.patch
|
||||
|
@ -33,6 +33,9 @@ PKGS_ALL := $(patsubst $(SRC)/%/rules.mak,%,$(wildcard $(SRC)/*/rules.mak))
|
||||
DATE := $(shell date +%Y%m%d)
|
||||
VPATH := $(TARBALLS)
|
||||
|
||||
# Set following to non-empty to remove uneeded progression reports (i.e. with automatics builds)
|
||||
# BATCH_MODE = 1
|
||||
|
||||
# Common download locations
|
||||
GNU := http://ftpmirror.gnu.org/
|
||||
SF := http://heanet.dl.sourceforge.net/sourceforge
|
||||
@ -235,10 +238,10 @@ SVN ?= $(error subversion client (svn) not found!)
|
||||
ifeq ($(DISABLE_CONTRIB_DOWNLOADS),TRUE)
|
||||
download = $(error Trying to download $(1) but DISABLE_CONTRIB_DOWNLOADS is TRUE, aborting.)
|
||||
else ifeq ($(shell curl --version >/dev/null 2>&1 || echo FAIL),)
|
||||
download = curl -f -L --retry-delay 10 --retry 2 -- "$(1)" > "$@"
|
||||
download = curl $(if ${BATCH_MODE},-sS) -f -L --retry-delay 10 --retry 2 -- "$(1)" > "$@"
|
||||
else ifeq ($(shell wget --version >/dev/null 2>&1 || echo FAIL),)
|
||||
download = rm -f $@.tmp && \
|
||||
wget --passive -t 2 -w 10 -c -p -O $@.tmp "$(1)" && \
|
||||
wget $(if ${BATCH_MODE},-nv) --passive -t 2 -w 10 -c -p -O $@.tmp "$(1)" && \
|
||||
touch $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
else ifeq ($(which fetch >/dev/null 2>&1 || echo FAIL),)
|
||||
@ -343,10 +346,10 @@ else
|
||||
CHECK_SHA512 = $(call checksum,$(SHA512SUM),SHA512)
|
||||
endif
|
||||
UNPACK = $(RM) -R $@ \
|
||||
$(foreach f,$(filter %.tar.gz %.tgz,$^), && tar xvzf $(f)) \
|
||||
$(foreach f,$(filter %.tar.bz2,$^), && tar xvjf $(f)) \
|
||||
$(foreach f,$(filter %.tar.xz,$^), && tar xvJf $(f)) \
|
||||
$(foreach f,$(filter %.zip,$^), && unzip $(f))
|
||||
$(foreach f,$(filter %.tar.gz %.tgz,$^), && tar xzf $(f) $(if ${BATCH_MODE},,-v)) \
|
||||
$(foreach f,$(filter %.tar.bz2,$^), && tar xjf $(f) $(if ${BATCH_MODE},,-v)) \
|
||||
$(foreach f,$(filter %.tar.xz,$^), && tar xJf $(f) $(if ${BATCH_MODE},,-v)) \
|
||||
$(foreach f,$(filter %.zip,$^), && unzip $(if ${BATCH_MODE},-q) $(f))
|
||||
UNPACK_DIR = $(basename $(basename $(notdir $<)))
|
||||
APPLY = (cd $(UNPACK_DIR) && patch -fp1) <
|
||||
APPLY_BIN = (cd $(UNPACK_DIR) && patch --binary -flp1) <
|
||||
|
@ -19,7 +19,7 @@ $(TARBALLS)/speex-git.tar.gz:
|
||||
speex: speex-$(SPEEX_VERSION).tar.gz .sum-speex
|
||||
rm -Rf $@-git $@
|
||||
mkdir -p $@-git
|
||||
$(ZCAT) "$<" | (cd $@-git && tar xv --strip-components=1)
|
||||
$(ZCAT) "$<" | (cd $@-git && tar x $(if ${BATCH_MODE},,-v) --strip-components=1)
|
||||
$(MOVE)
|
||||
|
||||
SPEEX_CONF := --disable-binaries
|
||||
|
@ -19,7 +19,7 @@ $(TARBALLS)/speexdsp-git.tar.gz:
|
||||
speexdsp: speexdsp-$(SPEEXDSP_VERSION).tar.gz .sum-speexdsp
|
||||
rm -Rf $@-git $@
|
||||
mkdir -p $@-git
|
||||
$(ZCAT) "$<" | (cd $@-git && tar xv --strip-components=1)
|
||||
$(ZCAT) "$<" | (cd $@-git && tar x $(if ${BATCH_MODE},,-v) --strip-components=1)
|
||||
$(MOVE)
|
||||
|
||||
SPEEXDSP_CONF := --enable-resample-full-sinc-table --disable-examples
|
||||
|
@ -19,7 +19,7 @@ $(TARBALLS)/libvpx-$(VPX_HASH).tar.gz:
|
||||
libvpx: libvpx-$(VPX_HASH).tar.gz .sum-vpx
|
||||
rm -Rf $@-$(VPX_HASH)
|
||||
mkdir -p $@-$(VPX_HASH)
|
||||
(cd $@-$(VPX_HASH) && tar xv --strip-components=1 -f ../$<)
|
||||
(cd $@-$(VPX_HASH) && tar x $(if ${BATCH_MODE},,-v) --strip-components=1 -f ../$<)
|
||||
$(MOVE)
|
||||
|
||||
DEPS_vpx =
|
||||
|
@ -38,7 +38,7 @@ $(TARBALLS)/x264-$(X264_HASH).tar.xz:
|
||||
x264: x264-$(X264_HASH).tar.xz .sum-x264
|
||||
rm -Rf $@-$(X264_HASH)
|
||||
mkdir -p $@-$(X264_HASH)
|
||||
(cd $@-$(X264_HASH) && tar xv --strip-components=1 -f ../$<)
|
||||
(cd $@-$(X264_HASH) && tar x $(if ${BATCH_MODE},,-v) --strip-components=1 -f ../$<)
|
||||
$(APPLY) $(SRC)/x264/remove-align.patch
|
||||
$(UPDATE_AUTOCONFIG)
|
||||
$(MOVE)
|
||||
|
@ -25,10 +25,10 @@ AUTOCONF=$(PREFIX)/bin/autoconf
|
||||
export AUTOCONF
|
||||
|
||||
ifeq ($(shell curl --version >/dev/null 2>&1 || echo FAIL),)
|
||||
download = curl -f -L -- "$(1)" > "$@"
|
||||
download = curl $(if ${BATCH_MODE},-sS) -f -L --retry-delay 10 --retry 2 -- "$(1)" > "$@"
|
||||
else ifeq ($(shell wget --version >/dev/null 2>&1 || echo FAIL),)
|
||||
download = rm -f $@.tmp && \
|
||||
wget --passive -c -p -O $@.tmp "$(1)" && \
|
||||
wget $(if ${BATCH_MODE},-nv) --passive -t 2 -w 10 -c -p -O $@.tmp "$(1)" && \
|
||||
touch $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
else ifeq ($(which fetch >/dev/null 2>&1 || echo FAIL),)
|
||||
@ -41,10 +41,10 @@ download = $(error Neither curl nor wget found!)
|
||||
endif
|
||||
|
||||
UNPACK = $(RM) -R $@ \
|
||||
$(foreach f,$(filter %.tar.gz %.tgz,$^), && tar xvzf $(f)) \
|
||||
$(foreach f,$(filter %.tar.bz2,$^), && tar xvjf $(f)) \
|
||||
$(foreach f,$(filter %.tar.xz,$^), && tar xvJf $(f)) \
|
||||
$(foreach f,$(filter %.zip,$^), && unzip $(f))
|
||||
$(foreach f,$(filter %.tar.gz %.tgz,$^), && tar xzf $(f) $(if ${BATCH_MODE},,-v)) \
|
||||
$(foreach f,$(filter %.tar.bz2,$^), && tar xjf $(f) $(if ${BATCH_MODE},,-v)) \
|
||||
$(foreach f,$(filter %.tar.xz,$^), && tar xJf $(f) $(if ${BATCH_MODE},,-v)) \
|
||||
$(foreach f,$(filter %.zip,$^), && unzip $(if ${BATCH_MODE},-q) $(f))
|
||||
|
||||
UNPACK_DIR = $(basename $(basename $(notdir $<)))
|
||||
APPLY = (cd $(UNPACK_DIR) && patch -p1) <
|
||||
|
Reference in New Issue
Block a user