image_optim_pack 0.9.1.20221127-x86-linux → 0.9.1.20221210-x86-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/docker-build.yml +8 -1
- data/CHANGELOG.markdown +4 -0
- data/Dockerfile.debian +179 -0
- data/Makefile +9 -7
- data/checksums.mk +1 -1
- data/image_optim_pack.gemspec +1 -1
- data/script/platform_downloads +2 -2
- data/vendor/linux-i686/oxipng +0 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa12c4d3f2f0d08ce6a5373a57e218191d46a1887a63e66bca7b778aa25aa736
|
4
|
+
data.tar.gz: e41e197e5ca89113b726c4964c6352eddef1abe7a632350f99b0d5baf227accd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89c7df2840e7c64cd53e01f3b207e69ecd40457b0ab38f2ace9e9a60c14769a914837f4221a794d37388bc289f8dc315409364ff4092b096bf3ac2ae8ba78e27
|
7
|
+
data.tar.gz: c3eff3feb1dcb9259a07c145f80eb98551ce9a2378f4a85cba9cd83bdf86a52e6c872b6cd58dfc58024459aad205d8167693448ce467925b6afe6bb9826f438c
|
@@ -3,9 +3,16 @@ on:
|
|
3
3
|
push:
|
4
4
|
tags:
|
5
5
|
- '*'
|
6
|
+
workflow_dispatch:
|
6
7
|
jobs:
|
7
8
|
docker-build:
|
8
9
|
runs-on: ubuntu-latest
|
10
|
+
strategy:
|
11
|
+
matrix:
|
12
|
+
params:
|
13
|
+
- ''
|
14
|
+
- DOCKER_FILE=Dockerfile.debian DOCKER_TAG_SUFFIX=-debian
|
15
|
+
fail-fast: false
|
9
16
|
steps:
|
10
17
|
- uses: actions/checkout@v2
|
11
18
|
- uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
@@ -13,4 +20,4 @@ jobs:
|
|
13
20
|
registry: ghcr.io
|
14
21
|
username: ${{ github.actor }}
|
15
22
|
password: ${{ secrets.GITHUB_TOKEN }}
|
16
|
-
- run: make docker-push
|
23
|
+
- run: make docker-push ${{ matrix.params }}
|
data/CHANGELOG.markdown
CHANGED
data/Dockerfile.debian
ADDED
@@ -0,0 +1,179 @@
|
|
1
|
+
FROM debian as base
|
2
|
+
ENV LD_LIBRARY_PATH=/usr/local/lib
|
3
|
+
WORKDIR /tmp
|
4
|
+
|
5
|
+
FROM base as build
|
6
|
+
RUN apt-get update && apt-get install -y build-essential cmake nasm bash findutils
|
7
|
+
COPY script/extract ./
|
8
|
+
ENV CPATH=/usr/local/include
|
9
|
+
|
10
|
+
FROM build as libz
|
11
|
+
ARG LIBZ_VER
|
12
|
+
ARG LIBZ_SHA256
|
13
|
+
COPY download/libz-$LIBZ_VER.tar.gz download/
|
14
|
+
RUN ./extract libz && \
|
15
|
+
cd build/libz && \
|
16
|
+
./configure && \
|
17
|
+
make install
|
18
|
+
|
19
|
+
FROM libz as libpng
|
20
|
+
ARG LIBPNG_VER
|
21
|
+
ARG LIBPNG_SHA256
|
22
|
+
COPY download/libpng-$LIBPNG_VER.tar.gz download/
|
23
|
+
RUN ./extract libpng && \
|
24
|
+
cd build/libpng && \
|
25
|
+
./configure --with-zlib-prefix=/usr/local && \
|
26
|
+
make install
|
27
|
+
|
28
|
+
FROM libpng as liblcms
|
29
|
+
ARG LIBLCMS_VER
|
30
|
+
ARG LIBLCMS_SHA256
|
31
|
+
COPY download/liblcms-$LIBLCMS_VER.tar.gz download/
|
32
|
+
RUN ./extract liblcms && \
|
33
|
+
cd build/liblcms && \
|
34
|
+
./configure && \
|
35
|
+
make install
|
36
|
+
|
37
|
+
FROM build as libjpeg
|
38
|
+
ARG LIBJPEG_VER
|
39
|
+
ARG LIBJPEG_SHA256
|
40
|
+
COPY download/libjpeg-$LIBJPEG_VER.tar.gz download/
|
41
|
+
RUN ./extract libjpeg && \
|
42
|
+
cd build/libjpeg && \
|
43
|
+
./configure && \
|
44
|
+
make install
|
45
|
+
|
46
|
+
FROM build as libmozjpeg
|
47
|
+
ARG LIBMOZJPEG_VER
|
48
|
+
ARG LIBMOZJPEG_SHA256
|
49
|
+
COPY download/libmozjpeg-$LIBMOZJPEG_VER.tar.gz download/
|
50
|
+
RUN ./extract libmozjpeg && \
|
51
|
+
cd build/libmozjpeg && \
|
52
|
+
cmake -DPNG_SUPPORTED=0 . && \
|
53
|
+
make install
|
54
|
+
|
55
|
+
FROM libpng as advancecomp
|
56
|
+
ARG ADVANCECOMP_VER
|
57
|
+
ARG ADVANCECOMP_SHA256
|
58
|
+
COPY download/advancecomp-$ADVANCECOMP_VER.tar.gz download/
|
59
|
+
RUN ./extract advancecomp && \
|
60
|
+
cd build/advancecomp && \
|
61
|
+
./configure && \
|
62
|
+
make install
|
63
|
+
|
64
|
+
FROM build as gifsicle
|
65
|
+
ARG GIFSICLE_VER
|
66
|
+
ARG GIFSICLE_SHA256
|
67
|
+
COPY download/gifsicle-$GIFSICLE_VER.tar.gz download/
|
68
|
+
RUN ./extract gifsicle && \
|
69
|
+
cd build/gifsicle && \
|
70
|
+
./configure && \
|
71
|
+
make install
|
72
|
+
|
73
|
+
FROM build as jhead
|
74
|
+
ARG JHEAD_VER
|
75
|
+
ARG JHEAD_SHA256
|
76
|
+
COPY download/jhead-$JHEAD_VER.tar.gz download/
|
77
|
+
RUN ./extract jhead && \
|
78
|
+
cd build/jhead && \
|
79
|
+
make && \
|
80
|
+
install -c jhead /usr/local/bin
|
81
|
+
|
82
|
+
FROM libmozjpeg as jpegarchive
|
83
|
+
ARG JPEGARCHIVE_VER
|
84
|
+
ARG JPEGARCHIVE_SHA256
|
85
|
+
COPY download/jpegarchive-$JPEGARCHIVE_VER.tar.gz download/
|
86
|
+
RUN ./extract jpegarchive && \
|
87
|
+
cd build/jpegarchive && \
|
88
|
+
CFLAGS=-fcommon make install
|
89
|
+
|
90
|
+
FROM libjpeg as jpegoptim
|
91
|
+
ARG JPEGOPTIM_VER
|
92
|
+
ARG JPEGOPTIM_SHA256
|
93
|
+
COPY download/jpegoptim-$JPEGOPTIM_VER.tar.gz download/
|
94
|
+
RUN ./extract jpegoptim && \
|
95
|
+
cd build/jpegoptim && \
|
96
|
+
./configure && \
|
97
|
+
make install
|
98
|
+
|
99
|
+
FROM libpng as optipng
|
100
|
+
ARG OPTIPNG_VER
|
101
|
+
ARG OPTIPNG_SHA256
|
102
|
+
COPY download/optipng-$OPTIPNG_VER.tar.gz download/
|
103
|
+
RUN ./extract optipng && \
|
104
|
+
cd build/optipng && \
|
105
|
+
./configure && \
|
106
|
+
make install
|
107
|
+
|
108
|
+
FROM rust:1 as oxipng
|
109
|
+
RUN apt-get update && apt-get install -y build-essential
|
110
|
+
COPY script/extract ./
|
111
|
+
ARG OXIPNG_VER
|
112
|
+
ARG OXIPNG_SHA256
|
113
|
+
COPY download/oxipng-$OXIPNG_VER.tar.gz download/
|
114
|
+
RUN ./extract oxipng && \
|
115
|
+
cd build/oxipng && \
|
116
|
+
cargo build --release && \
|
117
|
+
install -c target/release/oxipng /usr/local/bin
|
118
|
+
|
119
|
+
FROM libpng as pngcrush
|
120
|
+
ARG PNGCRUSH_VER
|
121
|
+
ARG PNGCRUSH_SHA256
|
122
|
+
COPY download/pngcrush-$PNGCRUSH_VER.tar.gz download/
|
123
|
+
RUN ./extract pngcrush && \
|
124
|
+
cd build/pngcrush && \
|
125
|
+
make && \
|
126
|
+
install -c pngcrush /usr/local/bin
|
127
|
+
|
128
|
+
FROM build as pngout
|
129
|
+
ARG PNGOUT_LINUX_STATIC_VER
|
130
|
+
ARG PNGOUT_LINUX_STATIC_SHA256
|
131
|
+
COPY download/pngout_linux_static-$PNGOUT_LINUX_STATIC_VER.tar.gz download/
|
132
|
+
RUN ./extract pngout_linux_static && \
|
133
|
+
cd build/pngout_linux_static && \
|
134
|
+
cp amd64/pngout-static /usr/local/bin/pngout
|
135
|
+
|
136
|
+
FROM liblcms as pngquant
|
137
|
+
ARG PNGQUANT_VER
|
138
|
+
ARG PNGQUANT_SHA256
|
139
|
+
COPY download/pngquant-$PNGQUANT_VER.tar.gz download/
|
140
|
+
RUN ./extract pngquant && \
|
141
|
+
cd build/pngquant && \
|
142
|
+
make install
|
143
|
+
|
144
|
+
# FROM build as [name]
|
145
|
+
# ARG [NAME]_VER
|
146
|
+
# ARG [NAME]_SHA256
|
147
|
+
# COPY download/[name]-$[NAME]_VER.tar.gz download/
|
148
|
+
# RUN ./extract [name] && \
|
149
|
+
# cd build/[name] && \
|
150
|
+
# ./configure && \
|
151
|
+
# make install
|
152
|
+
|
153
|
+
FROM base as image_optim
|
154
|
+
RUN apt-get update && apt-get install -y ruby npm perl-base dumb-init
|
155
|
+
|
156
|
+
COPY README.markdown /
|
157
|
+
COPY acknowledgements /acknowledgements
|
158
|
+
|
159
|
+
COPY --from=advancecomp /usr/local/bin/advpng /usr/local/bin/
|
160
|
+
COPY --from=gifsicle /usr/local/bin/gifsicle /usr/local/bin/
|
161
|
+
COPY --from=jhead /usr/local/bin/jhead /usr/local/bin/
|
162
|
+
COPY --from=jpegarchive /usr/local/bin/jpeg-recompress /usr/local/bin/
|
163
|
+
COPY --from=jpegoptim /usr/local/bin/jpegoptim /usr/local/bin/
|
164
|
+
COPY --from=libjpeg /usr/local/bin/jpegtran /usr/local/bin/
|
165
|
+
COPY --from=optipng /usr/local/bin/optipng /usr/local/bin/
|
166
|
+
COPY --from=oxipng /usr/local/bin/oxipng /usr/local/bin/
|
167
|
+
COPY --from=pngcrush /usr/local/bin/pngcrush /usr/local/bin/
|
168
|
+
COPY --from=pngout /usr/local/bin/pngout /usr/local/bin/
|
169
|
+
COPY --from=pngquant /usr/local/bin/pngquant /usr/local/bin/
|
170
|
+
|
171
|
+
COPY --from=libjpeg /usr/local/lib/libjpeg.so.9 /usr/local/lib/
|
172
|
+
COPY --from=libpng /usr/local/lib/libpng16.so.16 /usr/local/lib/
|
173
|
+
COPY --from=libz /usr/local/lib/libz.so.1 /usr/local/lib/
|
174
|
+
COPY --from=liblcms /usr/local/lib/liblcms2.so.2 /usr/local/lib/
|
175
|
+
|
176
|
+
RUN npm -g install svgo
|
177
|
+
RUN gem install --no-document image_optim
|
178
|
+
ENTRYPOINT ["dumb-init", "image_optim"]
|
179
|
+
CMD ["--help"]
|
data/Makefile
CHANGED
@@ -13,7 +13,7 @@ LIBMOZJPEG_VER := 4.1.1
|
|
13
13
|
LIBPNG_VER := 1.6.39
|
14
14
|
LIBZ_VER := 1.2.11
|
15
15
|
OPTIPNG_VER := 0.7.7
|
16
|
-
OXIPNG_VER :=
|
16
|
+
OXIPNG_VER := 7.0.0
|
17
17
|
PNGCRUSH_VER := 1.8.13
|
18
18
|
PNGOUT_VER := 20200115
|
19
19
|
PNGOUT_LINUX_VER := $(PNGOUT_VER)
|
@@ -277,28 +277,30 @@ update-versions :
|
|
277
277
|
|
278
278
|
DOCKER_IMAGE := ghcr.io/toy/image_optim
|
279
279
|
DOCKER_TAG := $(shell date +%Y%m%d)
|
280
|
+
DOCKER_FILE := Dockerfile
|
280
281
|
|
281
282
|
docker-build : download
|
282
283
|
@docker build \
|
283
284
|
--pull \
|
284
285
|
$(foreach archive,$(ARCHIVES),--build-arg $(archive)_VER=$($(archive)_VER) --build-arg $(archive)_SHA256=$($(archive)_SHA256)) \
|
285
|
-
-t $(DOCKER_IMAGE):latest \
|
286
|
+
-t $(DOCKER_IMAGE):latest$(DOCKER_TAG_SUFFIX) \
|
287
|
+
-f $(DOCKER_FILE) \
|
286
288
|
.
|
287
289
|
@docker tag \
|
288
|
-
$(DOCKER_IMAGE):latest \
|
289
|
-
$(DOCKER_IMAGE):$(DOCKER_TAG)
|
290
|
+
$(DOCKER_IMAGE):latest$(DOCKER_TAG_SUFFIX) \
|
291
|
+
$(DOCKER_IMAGE):$(DOCKER_TAG)$(DOCKER_TAG_SUFFIX)
|
290
292
|
.PHONY : docker-build
|
291
293
|
|
292
294
|
docker-test : docker-build
|
293
295
|
@docker run \
|
294
296
|
--rm \
|
295
|
-
$(DOCKER_IMAGE):latest \
|
297
|
+
$(DOCKER_IMAGE):latest$(DOCKER_TAG_SUFFIX) \
|
296
298
|
--info
|
297
299
|
.PHONY : docker-test
|
298
300
|
|
299
301
|
docker-push : docker-test
|
300
|
-
@docker push $(DOCKER_IMAGE):latest
|
301
|
-
@docker push $(DOCKER_IMAGE):$(DOCKER_TAG)
|
302
|
+
@docker push $(DOCKER_IMAGE):latest$(DOCKER_TAG_SUFFIX)
|
303
|
+
@docker push $(DOCKER_IMAGE):$(DOCKER_TAG)$(DOCKER_TAG_SUFFIX)
|
302
304
|
.PHONY : docker-push
|
303
305
|
|
304
306
|
# ====== CLEAN ======
|
data/checksums.mk
CHANGED
@@ -9,7 +9,7 @@ LIBMOZJPEG_SHA256 := 66b1b8d6b55d263f35f27f55acaaa3234df2a401232de99b6d099e2bb0a
|
|
9
9
|
LIBPNG_SHA256 := af4fb7f260f839919e5958e5ab01a275d4fe436d45442a36ee62f73e5beb75ba
|
10
10
|
LIBZ_SHA256 := c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
|
11
11
|
OPTIPNG_SHA256 := 4f32f233cef870b3f95d3ad6428bfe4224ef34908f1b42b0badf858216654452
|
12
|
-
OXIPNG_SHA256 :=
|
12
|
+
OXIPNG_SHA256 := 2a669c9b966cb54f8247c0accc9d90502944359abdd4143d9162d64e0acbaf76
|
13
13
|
PNGCRUSH_SHA256 := fed0aaf5c098aa8c7f78c75365cd18d7341417326ecbdba547876b7b4f3df4be
|
14
14
|
PNGOUT_LINUX_SHA256 := ac38bba6f0de29033de866538c3afa64341319b695bbe388efbc5fd9e830e928
|
15
15
|
PNGOUT_LINUX_STATIC_SHA256 := 7a78ea475d65a00981bf418e5dfa3b34e42d6460fb992340802873bb14b08597
|
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.9.1.
|
5
|
+
s.version = '0.9.1.20221210'
|
6
6
|
s.summary = %q{Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpeg-recompress, jpegoptim, jpegtran, optipng, pngcrush, pngquant}
|
7
7
|
s.homepage = "https://github.com/toy/#{s.name}"
|
8
8
|
s.authors = ['Ivan Kuchin']
|
data/script/platform_downloads
CHANGED
@@ -45,7 +45,7 @@ table = Terminal::Table.new
|
|
45
45
|
|
46
46
|
table.headings = ['version', 'days', 'base dls'] + platforms.map do |platform|
|
47
47
|
platform.split('-').reverse.join("\n")
|
48
|
-
end
|
48
|
+
end + ['total']
|
49
49
|
|
50
50
|
versions.group_by(&:number).each do |version_n, platform_versions|
|
51
51
|
next if platform_versions.length == 1
|
@@ -65,7 +65,7 @@ versions.group_by(&:number).each do |version_n, platform_versions|
|
|
65
65
|
version_n,
|
66
66
|
(version_time[version_n] / (24 * 60 * 60)).round,
|
67
67
|
base_downloads,
|
68
|
-
] + platform_values
|
68
|
+
] + platform_values + [downloads_by_platform.values.sum]
|
69
69
|
end
|
70
70
|
|
71
71
|
(1...table.number_of_columns).each do |column|
|
data/vendor/linux-i686/oxipng
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: image_optim_pack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.1.
|
4
|
+
version: 0.9.1.20221210
|
5
5
|
platform: x86-linux
|
6
6
|
authors:
|
7
7
|
- Ivan Kuchin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: image_optim
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- ".rubocop.yml"
|
108
108
|
- CHANGELOG.markdown
|
109
109
|
- Dockerfile
|
110
|
+
- Dockerfile.debian
|
110
111
|
- Gemfile
|
111
112
|
- LICENSE.txt
|
112
113
|
- Makefile
|
@@ -180,7 +181,7 @@ licenses:
|
|
180
181
|
metadata:
|
181
182
|
bug_tracker_uri: https://github.com/toy/image_optim_pack/issues
|
182
183
|
changelog_uri: https://github.com/toy/image_optim_pack/blob/master/CHANGELOG.markdown
|
183
|
-
documentation_uri: https://www.rubydoc.info/gems/image_optim_pack/0.9.1.
|
184
|
+
documentation_uri: https://www.rubydoc.info/gems/image_optim_pack/0.9.1.20221210
|
184
185
|
source_code_uri: https://github.com/toy/image_optim_pack
|
185
186
|
post_install_message:
|
186
187
|
rdoc_options: []
|