forked from kleisauke/libvips-packaging
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwin.sh
More file actions
executable file
·65 lines (51 loc) · 1.41 KB
/
Copy pathwin.sh
File metadata and controls
executable file
·65 lines (51 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env bash
set -e
## Copyright 2017 Lovell Fuller and others.
## SPDX-License-Identifier: Apache-2.0
# Dependency version numbers
source /packaging/versions.properties
VERSION_VIPS_SHORT=${VERSION_VIPS%.[[:digit:]]*}
# Common options for curl
CURL="curl --silent --location --retry 3 --retry-max-time 30"
# Fetch and unzip
mkdir /vips
cd /vips
VARIANT=static
case "${PLATFORM#*-}" in
x64) ARCH=x64 ;;
x64.net462)
ARCH=x64
VARIANT=static-ffi
;;
x86) ARCH=x86 ;;
x86.net462)
ARCH=x86
VARIANT=static-ffi
;;
arm64) ARCH=arm64 ;;
arm64.net481)
ARCH=arm64
VARIANT=static-ffi
;;
esac
FILENAME="vips-dev-${ARCH}-web-${VERSION_VIPS}-${VARIANT}.zip"
URL="https://github.com/libvips/build-win64-mxe/releases/download/v${VERSION_VIPS}/${FILENAME}"
echo "Downloading $URL"
$CURL -O $URL
unzip $FILENAME
cd /vips/vips-dev-${VERSION_VIPS_SHORT}
# Move DLLs to the lib directory
cp bin/*.dll lib/
# Add third-party notices
$CURL -O https://github.com/@raw/kleisauke/libvips-packaging/main/THIRD-PARTY-NOTICES.md
# Create tarball
tar czf /packaging/libvips-${VERSION_VIPS}-${PLATFORM}.tar.gz \
include \
lib/glib-2.0 \
lib/*.{dll,lib} \
versions.json \
THIRD-PARTY-NOTICES.md
# Allow tarballs to be read outside container
chmod 644 /packaging/libvips-${VERSION_VIPS}-${PLATFORM}.tar.gz
# Remove working directories
rm -rf lib include versions.json THIRD-PARTY-NOTICES.md