summaryrefslogtreecommitdiffstats
path: root/calibre
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2023-04-02 19:37:42 +0000
committer Eric Hameleers <alien@slackware.com>2023-04-02 19:37:42 +0000
commitb12892ab8fba6e8799f1becd2cebf845326645a4 (patch)
treefa6a93b9e1122d9a8609cfe99e7cb9be51c21997 /calibre
parent82a48a3b4d17af9d88739ed095eab7dd2fa86bc9 (diff)
downloadasb-b12892ab8fba6e8799f1becd2cebf845326645a4.tar.gz
asb-b12892ab8fba6e8799f1becd2cebf845326645a4.tar.xz
calibre: sometimes we need to generate a newer user-agent-data.json file
Diffstat (limited to 'calibre')
-rwxr-xr-xcalibre/build/calibre.SlackBuild7
1 files changed, 5 insertions, 2 deletions
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