Mercurial > hgrepos > Python2 > PyMuPDF
diff mupdf-source/scripts/archive.sh @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mupdf-source/scripts/archive.sh Mon Sep 15 11:43:07 2025 +0200 @@ -0,0 +1,58 @@ +#!/bin/bash + +REV=$(git describe --tags) +STEM=mupdf-$REV-source +CSTEM=mupdf-$REV-source-commercial + +echo git archive $STEM.tar +git archive --format=tar --prefix=$STEM/ -o $STEM.tar HEAD + +function make_submodule_archive { + # Make tarballs for submodules, stripped of unnecessary files. + M=$1 + shift + echo git archive submodule-$M.tar + git archive --format=tar --remote=thirdparty/$M --prefix=$STEM/thirdparty/$M/ -o submodule-$M.tar HEAD + for DIR in $* + do + tar f submodule-$M.tar --wildcards --delete "*/$DIR" + done + tar Af $STEM.tar submodule-$M.tar + rm -f submodule-$M.tar +} + +# Remove test files from thirdparty source archives. + +make_submodule_archive brotli tests +make_submodule_archive curl tests +make_submodule_archive extract test +make_submodule_archive freeglut +make_submodule_archive freetype tests +make_submodule_archive gumbo-parser benchmarks tests +make_submodule_archive harfbuzz test perf +make_submodule_archive jbig2dec +make_submodule_archive lcms2 testbed plugins/fast_float +make_submodule_archive leptonica prog +make_submodule_archive libjpeg libjpeg/test* +make_submodule_archive mujs +make_submodule_archive openjpeg +make_submodule_archive tesseract unittest +make_submodule_archive zint +make_submodule_archive zlib test contrib +make_submodule_archive zxing-cpp test + +# Generate commercial tarball +cp $STEM.tar $CSTEM.tar +tar f $CSTEM.tar --wildcards --delete ${STEM}/COPYING +tar -r -f $CSTEM.tar --owner=0 --group=0 --mode=664 --transform=s,$(dirname "$0")/customer\.txt,${STEM}/LICENSE, "$(dirname "$0")/customer.txt" + +echo gzip $CSTEM.tar +pigz -f -k -11 $CSTEM.tar +rm -f $CSTEM.tar + +echo gzip $STEM.tar +pigz -f -k -11 $STEM.tar + +echo lzip $STEM.tar +plzip -9 -f -k $STEM.tar +rm -f $STEM.tar
