image_optim_pack 0.13.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +3 -1
- data/CHANGELOG.markdown +6 -0
- data/Dockerfile +63 -63
- data/Dockerfile.debian +72 -66
- data/Makefile +5 -6
- data/checksums.mk +1 -1
- data/image_optim_pack-linux-aarch64.gemspec +3 -0
- data/image_optim_pack-linux-x86_64.gemspec +3 -0
- data/image_optim_pack.gemspec +29 -21
- data/script/platform_downloads +6 -2
- data/vendor/darwin-arm64/libpng.dylib +0 -0
- data/vendor/darwin-arm64/optipng +0 -0
- data/vendor/darwin-arm64/oxipng +0 -0
- data/vendor/darwin-arm64/pngcrush +0 -0
- data/vendor/darwin-arm64/pngquant +0 -0
- data/vendor/darwin-x86_64/libpng.dylib +0 -0
- data/vendor/darwin-x86_64/optipng +0 -0
- data/vendor/darwin-x86_64/pngcrush +0 -0
- data/vendor/darwin-x86_64/pngquant +0 -0
- data/vendor/linux-aarch64-gnu/libpng.so +0 -0
- data/vendor/linux-aarch64-gnu/optipng +0 -0
- data/vendor/linux-aarch64-gnu/pngcrush +0 -0
- data/vendor/linux-aarch64-gnu/pngquant +0 -0
- data/vendor/linux-aarch64-musl/libpng.so +0 -0
- data/vendor/linux-aarch64-musl/optipng +0 -0
- data/vendor/linux-aarch64-musl/pngcrush +0 -0
- data/vendor/linux-aarch64-musl/pngquant +0 -0
- data/vendor/linux-x86_64-gnu/libpng.so +0 -0
- data/vendor/linux-x86_64-gnu/optipng +0 -0
- data/vendor/linux-x86_64-gnu/pngcrush +0 -0
- data/vendor/linux-x86_64-gnu/pngquant +0 -0
- data/vendor/linux-x86_64-musl/libpng.so +0 -0
- data/vendor/linux-x86_64-musl/optipng +0 -0
- data/vendor/linux-x86_64-musl/pngcrush +0 -0
- data/vendor/linux-x86_64-musl/pngquant +0 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7a81ae61f728c591eba70ec2aee4b6f979e297c13a76f3023a06149ff854d173
|
|
4
|
+
data.tar.gz: 8a11d77aa571c600b1392bf236cc3e43761bfae0718bd2b69d14d353bb73dc76
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ebc8894904563dc3d35f0eca936a99e8c953ea7b60e48e28e6dde07dc0eb6632e48347dbae9dd8e9a2307799127f779adc0afb5d59f3b7cac00b9c205ab444e7
|
|
7
|
+
data.tar.gz: c146caf1f824f1645783f6877e558b88bbf61dfa228491a3b6690e30e5a46dff4b3b4ded5797908b3698985232801e526fbc6371d45d37c3e1e2df8b9333aaea
|
data/.github/dependabot.yml
CHANGED
data/CHANGELOG.markdown
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## unreleased
|
|
4
4
|
|
|
5
|
+
## v0.13.1 (2026-04-12)
|
|
6
|
+
|
|
7
|
+
* Add linux-x86_64 and linux-aarch64 platforms including two vendor dirs each [@toy](https://github.com/toy)
|
|
8
|
+
* libpng 1.6.57 [@toy](https://github.com/toy)
|
|
9
|
+
* Don't require presence of `git` in gemspec [@toy](https://github.com/toy)
|
|
10
|
+
|
|
5
11
|
## v0.13.0 (2026-04-04)
|
|
6
12
|
|
|
7
13
|
* Add linux-x86_64-musl and linux-aarch64-musl builds [@toy](https://github.com/toy)
|
data/Dockerfile
CHANGED
|
@@ -15,145 +15,145 @@ FROM cargo AS libz
|
|
|
15
15
|
ARG LIBZ_VER
|
|
16
16
|
ARG LIBZ_SHA256
|
|
17
17
|
COPY download/libz-$LIBZ_VER.tar.gz download/
|
|
18
|
-
RUN ./extract libz
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
RUN ./extract libz \
|
|
19
|
+
&& cd build/libz \
|
|
20
|
+
&& ./configure \
|
|
21
|
+
&& make install
|
|
22
22
|
|
|
23
23
|
FROM libz AS libpng
|
|
24
24
|
ARG LIBPNG_VER
|
|
25
25
|
ARG LIBPNG_SHA256
|
|
26
26
|
COPY download/libpng-$LIBPNG_VER.tar.gz download/
|
|
27
|
-
RUN ./extract libpng
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
RUN ./extract libpng \
|
|
28
|
+
&& cd build/libpng \
|
|
29
|
+
&& ./configure --with-zlib-prefix=/usr/local \
|
|
30
|
+
&& make install
|
|
31
31
|
|
|
32
32
|
FROM libpng AS liblcms2
|
|
33
33
|
ARG LIBLCMS2_VER
|
|
34
34
|
ARG LIBLCMS2_SHA256
|
|
35
35
|
COPY download/liblcms2-$LIBLCMS2_VER.tar.gz download/
|
|
36
|
-
RUN ./extract liblcms2
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
RUN ./extract liblcms2 \
|
|
37
|
+
&& cd build/liblcms2 \
|
|
38
|
+
&& ./configure \
|
|
39
|
+
&& make install
|
|
40
40
|
|
|
41
41
|
FROM build AS libjpeg
|
|
42
42
|
ARG LIBJPEG_VER
|
|
43
43
|
ARG LIBJPEG_SHA256
|
|
44
44
|
COPY download/libjpeg-$LIBJPEG_VER.tar.gz download/
|
|
45
|
-
RUN ./extract libjpeg
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
RUN ./extract libjpeg \
|
|
46
|
+
&& cd build/libjpeg \
|
|
47
|
+
&& ./configure \
|
|
48
|
+
&& make install
|
|
49
49
|
|
|
50
50
|
FROM build AS libmozjpeg
|
|
51
51
|
ARG LIBMOZJPEG_VER
|
|
52
52
|
ARG LIBMOZJPEG_SHA256
|
|
53
53
|
COPY download/libmozjpeg-$LIBMOZJPEG_VER.tar.gz download/
|
|
54
|
-
RUN ./extract libmozjpeg
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
RUN ./extract libmozjpeg \
|
|
55
|
+
&& cd build/libmozjpeg \
|
|
56
|
+
&& cmake -DPNG_SUPPORTED=0 -DCMAKE_POLICY_VERSION_MINIMUM=3.5 . \
|
|
57
|
+
&& make install
|
|
58
58
|
|
|
59
59
|
FROM libpng AS advancecomp
|
|
60
60
|
ARG ADVANCECOMP_VER
|
|
61
61
|
ARG ADVANCECOMP_SHA256
|
|
62
62
|
COPY download/advancecomp-$ADVANCECOMP_VER.tar.gz download/
|
|
63
|
-
RUN ./extract advancecomp
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
RUN ./extract advancecomp \
|
|
64
|
+
&& cd build/advancecomp \
|
|
65
|
+
&& ./configure \
|
|
66
|
+
&& make install
|
|
67
67
|
|
|
68
68
|
FROM build AS gifsicle
|
|
69
69
|
ARG GIFSICLE_VER
|
|
70
70
|
ARG GIFSICLE_SHA256
|
|
71
71
|
COPY download/gifsicle-$GIFSICLE_VER.tar.gz download/
|
|
72
|
-
RUN ./extract gifsicle
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
RUN ./extract gifsicle \
|
|
73
|
+
&& cd build/gifsicle \
|
|
74
|
+
&& ./configure \
|
|
75
|
+
&& make install
|
|
76
76
|
|
|
77
77
|
FROM build AS jhead
|
|
78
78
|
ARG JHEAD_VER
|
|
79
79
|
ARG JHEAD_SHA256
|
|
80
80
|
COPY download/jhead-$JHEAD_VER.tar.gz download/
|
|
81
|
-
RUN ./extract jhead
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
RUN ./extract jhead \
|
|
82
|
+
&& cd build/jhead \
|
|
83
|
+
&& make \
|
|
84
|
+
&& install -c jhead /usr/local/bin
|
|
85
85
|
|
|
86
86
|
FROM libmozjpeg AS jpegarchive
|
|
87
87
|
ARG JPEGARCHIVE_VER
|
|
88
88
|
ARG JPEGARCHIVE_SHA256
|
|
89
89
|
COPY download/jpegarchive-$JPEGARCHIVE_VER.tar.gz download/
|
|
90
|
-
RUN ./extract jpegarchive
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
RUN ./extract jpegarchive \
|
|
91
|
+
&& cd build/jpegarchive \
|
|
92
|
+
&& CFLAGS=-fcommon make install
|
|
93
93
|
|
|
94
94
|
FROM libjpeg AS jpegoptim
|
|
95
95
|
ARG JPEGOPTIM_VER
|
|
96
96
|
ARG JPEGOPTIM_SHA256
|
|
97
97
|
COPY download/jpegoptim-$JPEGOPTIM_VER.tar.gz download/
|
|
98
|
-
RUN ./extract jpegoptim
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
RUN ./extract jpegoptim \
|
|
99
|
+
&& cd build/jpegoptim \
|
|
100
|
+
&& ./configure \
|
|
101
|
+
&& make install
|
|
102
102
|
|
|
103
103
|
FROM libpng AS optipng
|
|
104
104
|
ARG OPTIPNG_VER
|
|
105
105
|
ARG OPTIPNG_SHA256
|
|
106
106
|
COPY download/optipng-$OPTIPNG_VER.tar.gz download/
|
|
107
|
-
RUN ./extract optipng
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
RUN ./extract optipng \
|
|
108
|
+
&& cd build/optipng \
|
|
109
|
+
&& ./configure \
|
|
110
|
+
&& make install
|
|
111
111
|
|
|
112
112
|
FROM cargo AS oxipng
|
|
113
113
|
ARG OXIPNG_VER
|
|
114
114
|
ARG OXIPNG_SHA256
|
|
115
115
|
COPY download/oxipng-$OXIPNG_VER.tar.gz download/
|
|
116
|
-
RUN ./extract oxipng
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
RUN ./extract oxipng \
|
|
117
|
+
&& cd build/oxipng \
|
|
118
|
+
&& cargo build --release \
|
|
119
|
+
&& install -c target/release/oxipng /usr/local/bin
|
|
120
120
|
|
|
121
121
|
FROM libpng AS pngcrush
|
|
122
122
|
ARG PNGCRUSH_VER
|
|
123
123
|
ARG PNGCRUSH_SHA256
|
|
124
124
|
COPY download/pngcrush-$PNGCRUSH_VER.tar.gz download/
|
|
125
125
|
COPY patches/pngcrush.patch patches/
|
|
126
|
-
RUN ./extract pngcrush
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
RUN ./extract pngcrush \
|
|
127
|
+
&& cd build/pngcrush \
|
|
128
|
+
&& patch < ../../patches/pngcrush.patch \
|
|
129
|
+
&& make \
|
|
130
|
+
&& install -c pngcrush /usr/local/bin
|
|
131
131
|
|
|
132
132
|
FROM build AS pngout
|
|
133
133
|
ARG PNGOUT_LINUX_STATIC_VER
|
|
134
134
|
ARG PNGOUT_LINUX_STATIC_SHA256
|
|
135
135
|
COPY download/pngout_linux_static-$PNGOUT_LINUX_STATIC_VER.tar.gz download/
|
|
136
|
-
RUN ./extract pngout_linux_static
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
RUN ./extract pngout_linux_static \
|
|
137
|
+
&& cd build/pngout_linux_static \
|
|
138
|
+
&& cp amd64/pngout-static /usr/local/bin/pngout
|
|
139
139
|
|
|
140
140
|
FROM liblcms2 AS pngquant
|
|
141
141
|
ARG PNGQUANT_VER
|
|
142
142
|
ARG PNGQUANT_SHA256
|
|
143
143
|
COPY download/pngquant-$PNGQUANT_VER.tar.gz download/
|
|
144
|
-
RUN ./extract pngquant
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
144
|
+
RUN ./extract pngquant \
|
|
145
|
+
&& cd build/pngquant \
|
|
146
|
+
&& cargo build --release \
|
|
147
|
+
&& install -c target/release/pngquant /usr/local/bin
|
|
148
148
|
|
|
149
149
|
# FROM build AS [name]
|
|
150
150
|
# ARG [NAME]_VER
|
|
151
151
|
# ARG [NAME]_SHA256
|
|
152
152
|
# COPY download/[name]-$[NAME]_VER.tar.gz download/
|
|
153
|
-
# RUN ./extract [name]
|
|
154
|
-
#
|
|
155
|
-
#
|
|
156
|
-
#
|
|
153
|
+
# RUN ./extract [name] \
|
|
154
|
+
# && cd build/[name] \
|
|
155
|
+
# && ./configure \
|
|
156
|
+
# && make install
|
|
157
157
|
|
|
158
158
|
FROM base AS image_optim
|
|
159
159
|
RUN apk add --no-cache libstdc++ ruby npm perl dumb-init
|
data/Dockerfile.debian
CHANGED
|
@@ -3,160 +3,166 @@ ENV LD_LIBRARY_PATH=/usr/local/lib
|
|
|
3
3
|
WORKDIR /tmp
|
|
4
4
|
|
|
5
5
|
FROM base AS build
|
|
6
|
-
RUN apt-get update
|
|
6
|
+
RUN apt-get update \
|
|
7
|
+
&& apt-get install -y --no-install-recommends build-essential cmake nasm bash findutils \
|
|
8
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
7
9
|
COPY script/extract ./
|
|
8
10
|
ENV CPATH=/usr/local/include
|
|
9
11
|
|
|
10
12
|
FROM rust:1 AS cargo
|
|
11
|
-
RUN apt-get update
|
|
13
|
+
RUN apt-get update \
|
|
14
|
+
&& apt-get install -y --no-install-recommends build-essential \
|
|
15
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
12
16
|
COPY script/extract ./
|
|
13
17
|
|
|
14
18
|
FROM cargo AS libz
|
|
15
19
|
ARG LIBZ_VER
|
|
16
20
|
ARG LIBZ_SHA256
|
|
17
21
|
COPY download/libz-$LIBZ_VER.tar.gz download/
|
|
18
|
-
RUN ./extract libz
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
RUN ./extract libz \
|
|
23
|
+
&& cd build/libz \
|
|
24
|
+
&& ./configure \
|
|
25
|
+
&& make install
|
|
22
26
|
|
|
23
27
|
FROM libz AS libpng
|
|
24
28
|
ARG LIBPNG_VER
|
|
25
29
|
ARG LIBPNG_SHA256
|
|
26
30
|
COPY download/libpng-$LIBPNG_VER.tar.gz download/
|
|
27
|
-
RUN ./extract libpng
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
RUN ./extract libpng \
|
|
32
|
+
&& cd build/libpng \
|
|
33
|
+
&& ./configure --with-zlib-prefix=/usr/local \
|
|
34
|
+
&& make install
|
|
31
35
|
|
|
32
36
|
FROM libpng AS liblcms2
|
|
33
37
|
ARG LIBLCMS2_VER
|
|
34
38
|
ARG LIBLCMS2_SHA256
|
|
35
39
|
COPY download/liblcms2-$LIBLCMS2_VER.tar.gz download/
|
|
36
|
-
RUN ./extract liblcms2
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
RUN ./extract liblcms2 \
|
|
41
|
+
&& cd build/liblcms2 \
|
|
42
|
+
&& ./configure \
|
|
43
|
+
&& make install
|
|
40
44
|
|
|
41
45
|
FROM build AS libjpeg
|
|
42
46
|
ARG LIBJPEG_VER
|
|
43
47
|
ARG LIBJPEG_SHA256
|
|
44
48
|
COPY download/libjpeg-$LIBJPEG_VER.tar.gz download/
|
|
45
|
-
RUN ./extract libjpeg
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
RUN ./extract libjpeg \
|
|
50
|
+
&& cd build/libjpeg \
|
|
51
|
+
&& ./configure \
|
|
52
|
+
&& make install
|
|
49
53
|
|
|
50
54
|
FROM build AS libmozjpeg
|
|
51
55
|
ARG LIBMOZJPEG_VER
|
|
52
56
|
ARG LIBMOZJPEG_SHA256
|
|
53
57
|
COPY download/libmozjpeg-$LIBMOZJPEG_VER.tar.gz download/
|
|
54
|
-
RUN ./extract libmozjpeg
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
RUN ./extract libmozjpeg \
|
|
59
|
+
&& cd build/libmozjpeg \
|
|
60
|
+
&& cmake -DPNG_SUPPORTED=0 -DCMAKE_POLICY_VERSION_MINIMUM=3.5 . \
|
|
61
|
+
&& make install
|
|
58
62
|
|
|
59
63
|
FROM libpng AS advancecomp
|
|
60
64
|
ARG ADVANCECOMP_VER
|
|
61
65
|
ARG ADVANCECOMP_SHA256
|
|
62
66
|
COPY download/advancecomp-$ADVANCECOMP_VER.tar.gz download/
|
|
63
|
-
RUN ./extract advancecomp
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
RUN ./extract advancecomp \
|
|
68
|
+
&& cd build/advancecomp \
|
|
69
|
+
&& ./configure \
|
|
70
|
+
&& make install
|
|
67
71
|
|
|
68
72
|
FROM build AS gifsicle
|
|
69
73
|
ARG GIFSICLE_VER
|
|
70
74
|
ARG GIFSICLE_SHA256
|
|
71
75
|
COPY download/gifsicle-$GIFSICLE_VER.tar.gz download/
|
|
72
|
-
RUN ./extract gifsicle
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
RUN ./extract gifsicle \
|
|
77
|
+
&& cd build/gifsicle \
|
|
78
|
+
&& ./configure \
|
|
79
|
+
&& make install
|
|
76
80
|
|
|
77
81
|
FROM build AS jhead
|
|
78
82
|
ARG JHEAD_VER
|
|
79
83
|
ARG JHEAD_SHA256
|
|
80
84
|
COPY download/jhead-$JHEAD_VER.tar.gz download/
|
|
81
|
-
RUN ./extract jhead
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
+
RUN ./extract jhead \
|
|
86
|
+
&& cd build/jhead \
|
|
87
|
+
&& make \
|
|
88
|
+
&& install -c jhead /usr/local/bin
|
|
85
89
|
|
|
86
90
|
FROM libmozjpeg AS jpegarchive
|
|
87
91
|
ARG JPEGARCHIVE_VER
|
|
88
92
|
ARG JPEGARCHIVE_SHA256
|
|
89
93
|
COPY download/jpegarchive-$JPEGARCHIVE_VER.tar.gz download/
|
|
90
|
-
RUN ./extract jpegarchive
|
|
91
|
-
|
|
92
|
-
|
|
94
|
+
RUN ./extract jpegarchive \
|
|
95
|
+
&& cd build/jpegarchive \
|
|
96
|
+
&& CFLAGS=-fcommon make install
|
|
93
97
|
|
|
94
98
|
FROM libjpeg AS jpegoptim
|
|
95
99
|
ARG JPEGOPTIM_VER
|
|
96
100
|
ARG JPEGOPTIM_SHA256
|
|
97
101
|
COPY download/jpegoptim-$JPEGOPTIM_VER.tar.gz download/
|
|
98
|
-
RUN ./extract jpegoptim
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
RUN ./extract jpegoptim \
|
|
103
|
+
&& cd build/jpegoptim \
|
|
104
|
+
&& ./configure \
|
|
105
|
+
&& make install
|
|
102
106
|
|
|
103
107
|
FROM libpng AS optipng
|
|
104
108
|
ARG OPTIPNG_VER
|
|
105
109
|
ARG OPTIPNG_SHA256
|
|
106
110
|
COPY download/optipng-$OPTIPNG_VER.tar.gz download/
|
|
107
|
-
RUN ./extract optipng
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
+
RUN ./extract optipng \
|
|
112
|
+
&& cd build/optipng \
|
|
113
|
+
&& ./configure \
|
|
114
|
+
&& make install
|
|
111
115
|
|
|
112
116
|
FROM cargo AS oxipng
|
|
113
117
|
ARG OXIPNG_VER
|
|
114
118
|
ARG OXIPNG_SHA256
|
|
115
119
|
COPY download/oxipng-$OXIPNG_VER.tar.gz download/
|
|
116
|
-
RUN ./extract oxipng
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
+
RUN ./extract oxipng \
|
|
121
|
+
&& cd build/oxipng \
|
|
122
|
+
&& cargo build --release \
|
|
123
|
+
&& install -c target/release/oxipng /usr/local/bin
|
|
120
124
|
|
|
121
125
|
FROM libpng AS pngcrush
|
|
122
126
|
ARG PNGCRUSH_VER
|
|
123
127
|
ARG PNGCRUSH_SHA256
|
|
124
128
|
COPY download/pngcrush-$PNGCRUSH_VER.tar.gz download/
|
|
125
129
|
COPY patches/pngcrush.patch patches/
|
|
126
|
-
RUN ./extract pngcrush
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
RUN ./extract pngcrush \
|
|
131
|
+
&& cd build/pngcrush \
|
|
132
|
+
&& patch < ../../patches/pngcrush.patch \
|
|
133
|
+
&& make \
|
|
134
|
+
&& install -c pngcrush /usr/local/bin
|
|
131
135
|
|
|
132
136
|
FROM build AS pngout
|
|
133
137
|
ARG PNGOUT_LINUX_VER
|
|
134
138
|
ARG PNGOUT_LINUX_SHA256
|
|
135
139
|
COPY download/pngout_linux-$PNGOUT_LINUX_VER.tar.gz download/
|
|
136
|
-
RUN ./extract pngout_linux
|
|
137
|
-
|
|
138
|
-
|
|
140
|
+
RUN ./extract pngout_linux \
|
|
141
|
+
&& cd build/pngout_linux \
|
|
142
|
+
&& cp amd64/pngout /usr/local/bin/pngout
|
|
139
143
|
|
|
140
144
|
FROM liblcms2 AS pngquant
|
|
141
145
|
ARG PNGQUANT_VER
|
|
142
146
|
ARG PNGQUANT_SHA256
|
|
143
147
|
COPY download/pngquant-$PNGQUANT_VER.tar.gz download/
|
|
144
|
-
RUN ./extract pngquant
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
+
RUN ./extract pngquant \
|
|
149
|
+
&& cd build/pngquant \
|
|
150
|
+
&& cargo build --release \
|
|
151
|
+
&& install -c target/release/pngquant /usr/local/bin
|
|
148
152
|
|
|
149
153
|
# FROM build AS [name]
|
|
150
154
|
# ARG [NAME]_VER
|
|
151
155
|
# ARG [NAME]_SHA256
|
|
152
156
|
# COPY download/[name]-$[NAME]_VER.tar.gz download/
|
|
153
|
-
# RUN ./extract [name]
|
|
154
|
-
#
|
|
155
|
-
#
|
|
156
|
-
#
|
|
157
|
+
# RUN ./extract [name] \
|
|
158
|
+
# && cd build/[name] \
|
|
159
|
+
# && ./configure \
|
|
160
|
+
# && make install
|
|
157
161
|
|
|
158
162
|
FROM base AS image_optim
|
|
159
|
-
RUN apt-get update
|
|
163
|
+
RUN apt-get update \
|
|
164
|
+
&& apt-get install -y --no-install-recommends ruby npm perl-base dumb-init \
|
|
165
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
160
166
|
|
|
161
167
|
COPY README.markdown /
|
|
162
168
|
COPY acknowledgements /acknowledgements
|
data/Makefile
CHANGED
|
@@ -15,7 +15,7 @@ JPEGOPTIM_VER := 1.5.6
|
|
|
15
15
|
LIBJPEG_VER := 9f
|
|
16
16
|
LIBLCMS2_VER := 2.17
|
|
17
17
|
LIBMOZJPEG_VER := 4.1.5
|
|
18
|
-
LIBPNG_VER := 1.6.
|
|
18
|
+
LIBPNG_VER := 1.6.57
|
|
19
19
|
LIBZ_VER := 1.3.2
|
|
20
20
|
OPTIPNG_VER := 7.9.1
|
|
21
21
|
OXIPNG_VER := 10.1.0
|
|
@@ -101,7 +101,6 @@ endef
|
|
|
101
101
|
# $1 - name of archive
|
|
102
102
|
# $2 - url of archive with [VER] for replace with version
|
|
103
103
|
# $3 - extension to use
|
|
104
|
-
# $4 - extra arguments to wget
|
|
105
104
|
define archive-dl
|
|
106
105
|
$(call archive,$1,$3)
|
|
107
106
|
# download archive from url
|
|
@@ -109,7 +108,7 @@ $$($1_ARC) :
|
|
|
109
108
|
mkdir -p $(DL_DIR)
|
|
110
109
|
test -w $(DL_DIR)
|
|
111
110
|
tmpfile=`mktemp "$$@.XXXXXXXXXX"` && \
|
|
112
|
-
wget -O "$$$$tmpfile" --no-use-server-timestamps
|
|
111
|
+
wget -O "$$$$tmpfile" --no-use-server-timestamps "$(subst [VER],$($1_VER),$(strip $2))" && \
|
|
113
112
|
chmod 644 "$$$$tmpfile" && \
|
|
114
113
|
mv "$$$$tmpfile" "$$@"
|
|
115
114
|
endef
|
|
@@ -127,9 +126,9 @@ $(eval $(call archive-dl,LIBZ, https://github.com/madler/zlib/archive/v[V
|
|
|
127
126
|
$(eval $(call archive-dl,OPTIPNG, https://prdownloads.sourceforge.net/optipng/optipng-[VER].tar.gz?download))
|
|
128
127
|
$(eval $(call archive-dl,OXIPNG, https://github.com/oxipng/oxipng/archive/v[VER].tar.gz))
|
|
129
128
|
$(eval $(call archive-dl,PNGCRUSH, https://prdownloads.sourceforge.net/pmt/pngcrush-[VER]-nolib.tar.gz?download))
|
|
130
|
-
$(eval $(call archive-dl,PNGOUT_LINUX,https://www.jonof.id.au/files/kenutils/pngout-[VER]-linux.tar.gz
|
|
131
|
-
$(eval $(call archive-dl,PNGOUT_LINUX_STATIC,https://www.jonof.id.au/files/kenutils/pngout-[VER]-linux-static.tar.gz
|
|
132
|
-
$(eval $(call archive-dl,PNGOUT_DARWIN,https://www.jonof.id.au/files/kenutils/pngout-[VER]-mac.zip,zip
|
|
129
|
+
$(eval $(call archive-dl,PNGOUT_LINUX,https://www.jonof.id.au/files/kenutils/pngout-[VER]-linux.tar.gz))
|
|
130
|
+
$(eval $(call archive-dl,PNGOUT_LINUX_STATIC,https://www.jonof.id.au/files/kenutils/pngout-[VER]-linux-static.tar.gz))
|
|
131
|
+
$(eval $(call archive-dl,PNGOUT_DARWIN,https://www.jonof.id.au/files/kenutils/pngout-[VER]-mac.zip,zip))
|
|
133
132
|
$(eval $(call archive-dl,PNGQUANT, https://crates.io/api/v1/crates/pngquant/[VER]/download))
|
|
134
133
|
|
|
135
134
|
download : $(foreach archive,$(ARCHIVES),$($(archive)_ARC))
|
data/checksums.mk
CHANGED
|
@@ -6,7 +6,7 @@ JPEGOPTIM_SHA256 := 661a808dfffa933d78c6beb47a2937d572b9f03e94cbaaab3d4c0d72f410
|
|
|
6
6
|
LIBJPEG_SHA256 := 04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b
|
|
7
7
|
LIBLCMS2_SHA256 := d11af569e42a1baa1650d20ad61d12e41af4fead4aa7964a01f93b08b53ab074
|
|
8
8
|
LIBMOZJPEG_SHA256 := 9fcbb7171f6ac383f5b391175d6fb3acde5e64c4c4727274eade84ed0998fcc1
|
|
9
|
-
LIBPNG_SHA256 :=
|
|
9
|
+
LIBPNG_SHA256 := 01fdab044cdc575c74a9ef62a4042fbe24fea8bedfe8aa5c89f4467b781bbb60
|
|
10
10
|
LIBZ_SHA256 := b99a0b86c0ba9360ec7e78c4f1e43b1cbdf1e6936c8fa0f6835c0cd694a495a1
|
|
11
11
|
OPTIPNG_SHA256 := c2579be58c2c66dae9d63154edcb3d427fef64cb00ec0aff079c9d156ec46f29
|
|
12
12
|
OXIPNG_SHA256 := 6c5e1d021a844ba730193943ab63ad99e7d9f1089c36f3db59014517ea99cf99
|
data/image_optim_pack.gemspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = 'image_optim_pack'
|
|
5
|
-
s.version = '0.13.
|
|
5
|
+
s.version = '0.13.1'
|
|
6
6
|
s.summary = %q{Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpeg-recompress, jpegoptim, jpegtran, optipng, oxipng, pngcrush, pngout, pngquant}
|
|
7
7
|
s.homepage = "https://github.com/toy/#{s.name}"
|
|
8
8
|
s.authors = ['Ivan Kuchin']
|
|
@@ -17,38 +17,46 @@ Gem::Specification.new do |s|
|
|
|
17
17
|
'source_code_uri' => "https://github.com/toy/#{s.name}",
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
s.files
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
s.files = Dir[*%w[
|
|
21
|
+
.dockerignore
|
|
22
|
+
.gitignore
|
|
23
|
+
.rubocop.yml
|
|
24
|
+
checksums.mk
|
|
25
|
+
Gemfile
|
|
26
|
+
LICENSE.txt
|
|
27
|
+
Makefile
|
|
28
|
+
*.markdown
|
|
29
|
+
Dockerfile*
|
|
30
|
+
*.gemspec
|
|
31
|
+
{.github,acknowledgements,lib,patches,script,spec,vendor}/**/*
|
|
32
|
+
]].reject(&File.method(:directory?))
|
|
23
33
|
|
|
24
|
-
|
|
34
|
+
if defined?(gemspec_path)
|
|
35
|
+
platform_parts = File.basename(gemspec_path, File.extname(gemspec_path)).split('-').drop(1)
|
|
36
|
+
s.platform = Gem::Platform.new(platform_parts.values_at(1, 0, 2))
|
|
25
37
|
|
|
26
|
-
|
|
27
|
-
'
|
|
28
|
-
|
|
38
|
+
all_vendor_dirs = s.files.filter_map do |path|
|
|
39
|
+
parts = path.split('/')
|
|
40
|
+
parts[1] if parts[0] == 'vendor'
|
|
41
|
+
end.uniq
|
|
29
42
|
|
|
30
|
-
|
|
31
|
-
|
|
43
|
+
vendor_dirs = all_vendor_dirs.select do |vendor_dir|
|
|
44
|
+
s.platform =~ Gem::Platform.new(vendor_dir.split('-').values_at(1, 0, 2))
|
|
32
45
|
end
|
|
33
46
|
|
|
34
|
-
|
|
35
|
-
File.directory?(File.join('vendor', vendor_dir))
|
|
36
|
-
end
|
|
47
|
+
expected_vendor_dirs = s.platform.os == 'linux' && !s.platform.version ? 2 : 1
|
|
37
48
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
else
|
|
41
|
-
message = existing_vendor_dirs.empty? ? 'no vendor dir' : 'multiple vendor dirs'
|
|
42
|
-
fail "#{message} found for os #{gem_os} and arch #{gem_arch} out of: #{possible_vendor_dirs.join(', ')}"
|
|
49
|
+
unless vendor_dirs.length == expected_vendor_dirs
|
|
50
|
+
fail "expected #{expected_vendor_dirs}, got #{vendor_dirs.length} (#{vendor_dirs.join(', ')}) for #{s.platform}"
|
|
43
51
|
end
|
|
44
52
|
|
|
45
53
|
s.files.reject! do |path|
|
|
46
54
|
parts = path.split('/')
|
|
47
|
-
parts[0] == 'vendor' && parts[1]
|
|
55
|
+
parts[0] == 'vendor' && !vendor_dirs.include?(parts[1])
|
|
48
56
|
end
|
|
49
57
|
end
|
|
50
|
-
|
|
51
|
-
s.
|
|
58
|
+
|
|
59
|
+
s.test_files = Dir['spec/**/*.*']
|
|
52
60
|
s.require_paths = %w[lib]
|
|
53
61
|
|
|
54
62
|
s.add_dependency 'image_optim', '~> 0.19'
|
data/script/platform_downloads
CHANGED
|
@@ -5,13 +5,17 @@ require 'gems'
|
|
|
5
5
|
require 'ostruct'
|
|
6
6
|
require 'terminal-table'
|
|
7
7
|
|
|
8
|
+
def platform_parts(platform)
|
|
9
|
+
platform.split('-', 3).values_at(1, 0, 2).compact
|
|
10
|
+
end
|
|
11
|
+
|
|
8
12
|
versions = Gems.versions('image_optim_pack').map do |attributes|
|
|
9
13
|
attributes['number'] = Gem::Version.new(attributes['number'])
|
|
10
14
|
OpenStruct.new(attributes) # rubocop:disable Style/OpenStructUse
|
|
11
15
|
end
|
|
12
16
|
|
|
13
17
|
platforms = versions.map(&:platform).uniq.sort_by do |platform|
|
|
14
|
-
platform
|
|
18
|
+
platform_parts(platform)
|
|
15
19
|
end
|
|
16
20
|
|
|
17
21
|
version_time = begin
|
|
@@ -28,7 +32,7 @@ end
|
|
|
28
32
|
table = Terminal::Table.new
|
|
29
33
|
|
|
30
34
|
table.headings = ['version', 'days', 'base dls'] + platforms.map do |platform|
|
|
31
|
-
platform
|
|
35
|
+
platform_parts(platform).join("\n")
|
|
32
36
|
end + ['total']
|
|
33
37
|
|
|
34
38
|
versions.group_by(&:number).each do |version_n, platform_versions|
|
|
Binary file
|
data/vendor/darwin-arm64/optipng
CHANGED
|
Binary file
|
data/vendor/darwin-arm64/oxipng
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: image_optim_pack
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.13.
|
|
4
|
+
version: 0.13.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ivan Kuchin
|
|
@@ -142,8 +142,10 @@ files:
|
|
|
142
142
|
- image_optim_pack-darwin-x86_64.gemspec
|
|
143
143
|
- image_optim_pack-linux-aarch64-gnu.gemspec
|
|
144
144
|
- image_optim_pack-linux-aarch64-musl.gemspec
|
|
145
|
+
- image_optim_pack-linux-aarch64.gemspec
|
|
145
146
|
- image_optim_pack-linux-x86_64-gnu.gemspec
|
|
146
147
|
- image_optim_pack-linux-x86_64-musl.gemspec
|
|
148
|
+
- image_optim_pack-linux-x86_64.gemspec
|
|
147
149
|
- image_optim_pack.gemspec
|
|
148
150
|
- lib/image_optim/pack.rb
|
|
149
151
|
- lib/image_optim_pack.rb
|
|
@@ -251,7 +253,7 @@ licenses:
|
|
|
251
253
|
metadata:
|
|
252
254
|
bug_tracker_uri: https://github.com/toy/image_optim_pack/issues
|
|
253
255
|
changelog_uri: https://github.com/toy/image_optim_pack/blob/master/CHANGELOG.markdown
|
|
254
|
-
documentation_uri: https://www.rubydoc.info/gems/image_optim_pack/0.13.
|
|
256
|
+
documentation_uri: https://www.rubydoc.info/gems/image_optim_pack/0.13.1
|
|
255
257
|
source_code_uri: https://github.com/toy/image_optim_pack
|
|
256
258
|
rdoc_options: []
|
|
257
259
|
require_paths:
|