comparison 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
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 #!/bin/bash
2
3 REV=$(git describe --tags)
4 STEM=mupdf-$REV-source
5 CSTEM=mupdf-$REV-source-commercial
6
7 echo git archive $STEM.tar
8 git archive --format=tar --prefix=$STEM/ -o $STEM.tar HEAD
9
10 function make_submodule_archive {
11 # Make tarballs for submodules, stripped of unnecessary files.
12 M=$1
13 shift
14 echo git archive submodule-$M.tar
15 git archive --format=tar --remote=thirdparty/$M --prefix=$STEM/thirdparty/$M/ -o submodule-$M.tar HEAD
16 for DIR in $*
17 do
18 tar f submodule-$M.tar --wildcards --delete "*/$DIR"
19 done
20 tar Af $STEM.tar submodule-$M.tar
21 rm -f submodule-$M.tar
22 }
23
24 # Remove test files from thirdparty source archives.
25
26 make_submodule_archive brotli tests
27 make_submodule_archive curl tests
28 make_submodule_archive extract test
29 make_submodule_archive freeglut
30 make_submodule_archive freetype tests
31 make_submodule_archive gumbo-parser benchmarks tests
32 make_submodule_archive harfbuzz test perf
33 make_submodule_archive jbig2dec
34 make_submodule_archive lcms2 testbed plugins/fast_float
35 make_submodule_archive leptonica prog
36 make_submodule_archive libjpeg libjpeg/test*
37 make_submodule_archive mujs
38 make_submodule_archive openjpeg
39 make_submodule_archive tesseract unittest
40 make_submodule_archive zint
41 make_submodule_archive zlib test contrib
42 make_submodule_archive zxing-cpp test
43
44 # Generate commercial tarball
45 cp $STEM.tar $CSTEM.tar
46 tar f $CSTEM.tar --wildcards --delete ${STEM}/COPYING
47 tar -r -f $CSTEM.tar --owner=0 --group=0 --mode=664 --transform=s,$(dirname "$0")/customer\.txt,${STEM}/LICENSE, "$(dirname "$0")/customer.txt"
48
49 echo gzip $CSTEM.tar
50 pigz -f -k -11 $CSTEM.tar
51 rm -f $CSTEM.tar
52
53 echo gzip $STEM.tar
54 pigz -f -k -11 $STEM.tar
55
56 echo lzip $STEM.tar
57 plzip -9 -f -k $STEM.tar
58 rm -f $STEM.tar