From b12892ab8fba6e8799f1becd2cebf845326645a4 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sun, 2 Apr 2023 19:37:42 +0000 Subject: calibre: sometimes we need to generate a newer user-agent-data.json file --- calibre/build/calibre.SlackBuild | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'calibre/build/calibre.SlackBuild') diff --git a/calibre/build/calibre.SlackBuild b/calibre/build/calibre.SlackBuild index 80fb37d7..4733141a 100755 --- a/calibre/build/calibre.SlackBuild +++ b/calibre/build/calibre.SlackBuild @@ -264,6 +264,9 @@ BUILD_PYTHON="YES" # allows us to be independant of Slackware's ImageMagick upgrades. BUILD_MAGICK=${BUILD_MAGICK:-NO} +# Sometimes we need to generate a new user-agent-strings file: +BUILD_NEWUAS=${BUILD_NEWUAS:-NO} + # Allow the package builder to override BUILD_QT: if [ -z "$BUILD_QT" ]; then if pkg-config --exists "Qt6Core >= $REQUIRED_QT" && pkg-config --exists "Qt6Core <= $INT_QT" ; @@ -2355,13 +2358,13 @@ make_calibre () { LANG='en_US.UTF-8' \ python3 setup.py gui \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log - if [ ! -f $SRCDIR/sources/user-agent-data.json ]; then + if [ ! -f $SRCDIR/sources/user-agent-data.json ] || [ "${BUILD_NEWUAS}" != "NO" ]; then # Generate the UserAgent-strings file by collecting online data: LANG='en_US.UTF-8' \ python3 setup.py recent_uas \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log # For later re-use: - cp -a resources/user-agent-data.json $OUTPUT/ + cp -a resources/user-agent-data.json $SRCDIR/sources/ else install -m0644 $SRCDIR/sources/user-agent-data.json \ resources/user-agent-data.json -- cgit v1.2.3-80-g2a13