image_optim_pack 0.8.0.20220418-x86_64-darwin → 0.9.0-x86_64-darwin

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c75c687741ddd7f94556e89dbedc8b05d6ccae7566901ba131be39a2e89913af
4
- data.tar.gz: 3018490db89f4365191bc580f065e081847b2555fbf7a1b32cbbfe23cd2d2b4d
3
+ metadata.gz: 1debf887770d2e0e97a9d42d4d907c934f646dfaf78f3a1b6964b43ea3d293bc
4
+ data.tar.gz: cf80ed8d51b4982fdd29c0957b915293ff21b06edd2010e9f116200a0633e5b7
5
5
  SHA512:
6
- metadata.gz: a3c44398e92a662e10a264e818a64d8e9f50d6009bdc9bb8767ab93e2a0b2ba53e5cd08d511f386f40cb3d8c791348aac8edbaa6275087cb588f91b075bc6e6a
7
- data.tar.gz: bf086f20d9bc61116e93e977a6b1030ae10cd154d2a17c39af4bf994d92fea2acb8e2c6efff07b1b238475340dc1aec03aaa97231703f28c516558f0d68e063b
6
+ metadata.gz: 2489c56b8ec07387b1394febf17a486ad257239ca7673dc7ecaa46c40b28c490606d69491fe4f2bac0d22e9fde95a7a22dd7998daf9de8eb37d1a3f04e000630
7
+ data.tar.gz: 4a5efbcbabd9d6c6984589fda870fe105a84752a87d39218d58f6a0d8301dc990e45792e3ca0da9e4af65e4e30231992d62dcbdd5dae60409a31f21adafbf1a1
data/CHANGELOG.markdown CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## unreleased
4
4
 
5
+ ## v0.9.0 (2022-06-11)
6
+
7
+ * Add [pngout](http://advsys.net/ken/utils.htm) (since January 2021 license allows redistrubition for freely distributed non-commercial projects) [#24](https://github.com/toy/image_optim_pack/issues/24) [@toy](https://github.com/toy)
8
+
5
9
  ## v0.8.0.20220418 (2022-04-18)
6
10
 
7
11
  * advancecomp 2.3 and jpegoptim 1.4.7 [@toy](https://github.com/toy)
data/Dockerfile CHANGED
@@ -125,6 +125,14 @@ RUN ./extract pngcrush && \
125
125
  make && \
126
126
  install -c pngcrush /usr/local/bin
127
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
+
128
136
  FROM liblcms as pngquant
129
137
  ARG PNGQUANT_VER
130
138
  ARG PNGQUANT_SHA256
@@ -145,6 +153,9 @@ RUN ./extract pngquant && \
145
153
  FROM base as image_optim
146
154
  RUN apk add --no-cache libstdc++ ruby npm perl dumb-init
147
155
 
156
+ COPY README.markdown /
157
+ COPY acknowledgements /acknowledgements
158
+
148
159
  COPY --from=advancecomp /usr/local/bin/advpng /usr/local/bin/
149
160
  COPY --from=gifsicle /usr/local/bin/gifsicle /usr/local/bin/
150
161
  COPY --from=jhead /usr/local/bin/jhead /usr/local/bin/
@@ -154,6 +165,7 @@ COPY --from=libjpeg /usr/local/bin/jpegtran /usr/local/bin/
154
165
  COPY --from=optipng /usr/local/bin/optipng /usr/local/bin/
155
166
  COPY --from=oxipng /usr/local/bin/oxipng /usr/local/bin/
156
167
  COPY --from=pngcrush /usr/local/bin/pngcrush /usr/local/bin/
168
+ COPY --from=pngout /usr/local/bin/pngout /usr/local/bin/
157
169
  COPY --from=pngquant /usr/local/bin/pngquant /usr/local/bin/
158
170
 
159
171
  COPY --from=libjpeg /usr/local/lib/libjpeg.so.9 /usr/local/lib/
@@ -163,5 +175,5 @@ COPY --from=liblcms /usr/local/lib/liblcms2.so.2 /usr/local/lib/
163
175
 
164
176
  RUN npm -g install svgo
165
177
  RUN gem install --no-document image_optim
166
- ENTRYPOINT ["dumb-init", "image_optim", "--skip-missing-workers"]
178
+ ENTRYPOINT ["dumb-init", "image_optim"]
167
179
  CMD ["--help"]
data/Makefile CHANGED
@@ -15,6 +15,10 @@ LIBZ_VER := 1.2.11
15
15
  OPTIPNG_VER := 0.7.7
16
16
  OXIPNG_VER := 5.0.1
17
17
  PNGCRUSH_VER := 1.8.13
18
+ PNGOUT_VER := 20200115
19
+ PNGOUT_LINUX_VER := $(PNGOUT_VER)
20
+ PNGOUT_LINUX_STATIC_VER := $(PNGOUT_VER)
21
+ PNGOUT_DARWIN_VER := $(PNGOUT_VER)
18
22
  PNGQUANT_VER := 2.17.0
19
23
 
20
24
  # ====== CHECKSUMS ======
@@ -57,12 +61,13 @@ sha256sum := $(shell if command -v sha256sum >/dev/null 2>&1; then echo sha256su
57
61
  ARCHIVES :=
58
62
 
59
63
  # $1 - name of archive
64
+ # $2 - extension to use (instead of default tar.gz)
60
65
  define archive
61
66
  ARCHIVES += $1
62
67
  $1_DIR := $(BUILD_DIR)/$(call downcase,$1)
63
- $1_TGZ := $(DL_DIR)/$(call downcase,$1)-$($1_VER).tar.gz
64
- $1_EXTRACTED := $$($1_DIR)/__$$(notdir $$($1_TGZ))__
65
- $$($1_EXTRACTED) : $$($1_TGZ)
68
+ $1_ARC := $(DL_DIR)/$(call downcase,$1)-$($1_VER).$(or $2,tar.gz)
69
+ $1_EXTRACTED := $$($1_DIR)/__$$(notdir $$($1_ARC))__
70
+ $$($1_EXTRACTED) : $$($1_ARC)
66
71
  mkdir -p $(BUILD_DIR)
67
72
  rm -rf $$(@D)
68
73
  echo "$$($1_SHA256) $$<" | $(sha256sum) -c
@@ -73,10 +78,11 @@ endef
73
78
 
74
79
  # $1 - name of archive
75
80
  # $2 - url of archive with [VER] for replace with version
81
+ # $3 - extension to use
76
82
  define archive-dl
77
- $(call archive,$1)
83
+ $(call archive,$1,$3)
78
84
  # download archive from url
79
- $$($1_TGZ) :
85
+ $$($1_ARC) :
80
86
  mkdir -p $(DL_DIR)
81
87
  test -w $(DL_DIR)
82
88
  while ! mkdir $$@.lock 2> /dev/null; do sleep 1; done
@@ -98,25 +104,28 @@ $(eval $(call archive-dl,LIBZ, https://prdownloads.sourceforge.net/libpng
98
104
  $(eval $(call archive-dl,OPTIPNG, https://prdownloads.sourceforge.net/optipng/optipng-[VER].tar.gz?download))
99
105
  $(eval $(call archive-dl,OXIPNG, https://github.com/shssoichiro/oxipng/archive/refs/tags/v[VER].tar.gz))
100
106
  $(eval $(call archive-dl,PNGCRUSH, https://prdownloads.sourceforge.net/pmt/pngcrush-[VER]-nolib.tar.gz?download))
107
+ $(eval $(call archive-dl,PNGOUT_LINUX,http://www.jonof.id.au/files/kenutils/pngout-[VER]-linux.tar.gz))
108
+ $(eval $(call archive-dl,PNGOUT_LINUX_STATIC,http://www.jonof.id.au/files/kenutils/pngout-[VER]-linux-static.tar.gz))
109
+ $(eval $(call archive-dl,PNGOUT_DARWIN,http://www.jonof.id.au/files/kenutils/pngout-[VER]-macos.zip,zip))
101
110
  $(eval $(call archive-dl,PNGQUANT, https://pngquant.org/pngquant-[VER]-src.tar.gz))
102
111
 
103
- download : $(foreach archive,$(ARCHIVES),$($(archive)_TGZ))
112
+ download : $(foreach archive,$(ARCHIVES),$($(archive)_ARC))
104
113
  .PHONY : download
105
114
 
106
115
  download-tidy-up :
107
- rm -f $(filter-out $(foreach archive,$(ARCHIVES),$($(archive)_TGZ)),$(wildcard $(DL_DIR)/*.*))
116
+ rm -f $(filter-out $(foreach archive,$(ARCHIVES),$($(archive)_ARC)),$(wildcard $(DL_DIR)/*.*))
108
117
  .PHONY : download-tidy-up
109
118
 
110
119
  checksum : download
111
- @$(sha256sum) $(foreach archive,$(ARCHIVES),$($(archive)_TGZ))
120
+ @$(sha256sum) $(foreach archive,$(ARCHIVES),$($(archive)_ARC))
112
121
  .PHONY : checksum
113
122
 
114
123
  checksum-verify : download
115
- @printf '%s %s\n' $(foreach archive,$(ARCHIVES),$($(archive)_SHA256) $($(archive)_TGZ)) | $(sha256sum) -c
124
+ @printf '%s %s\n' $(foreach archive,$(ARCHIVES),$($(archive)_SHA256) $($(archive)_ARC)) | $(sha256sum) -c
116
125
  .PHONY : checksum-verify
117
126
 
118
127
  checksum-update : download
119
- @printf '%s := %s\n' $(foreach archive,$(ARCHIVES),$(archive)_SHA256 $(shell $(sha256sum) $($(archive)_TGZ) | cut -d ' ' -f 1)) > checksums.mk
128
+ @printf '%s := %s\n' $(foreach archive,$(ARCHIVES),$(archive)_SHA256 $(shell $(sha256sum) $($(archive)_ARC) | cut -d ' ' -f 1)) > checksums.mk
120
129
  .PHONY : checksum-update
121
130
 
122
131
  # ====== PRODUCTS ======
@@ -130,7 +139,7 @@ define target-build
130
139
  $1_PATH := $(or $3,$(call downcase,$1))
131
140
  $1_BASENAME := $$(notdir $$($1_PATH))
132
141
  $1_DIR := $($(or $2,$1)_DIR)
133
- $1_TGZ := $($(or $2,$1)_TGZ)
142
+ $1_ARC := $($(or $2,$1)_ARC)
134
143
  $1_EXTRACTED := $($(or $2,$1)_EXTRACTED)
135
144
  $1_TARGET := $$($1_DIR)/$$($1_PATH)
136
145
  $$($1_TARGET) : DIR := $$($1_DIR)
@@ -140,6 +149,7 @@ endef
140
149
  # $1 - product name
141
150
  # $2 - archive name ($1 if empty)
142
151
  # $3 - basename ($1 if empty)
152
+ # $4 - don't strip the target
143
153
  define target
144
154
  $(call target-build,$1,$2,$3)
145
155
  PRODUCTS += $1
@@ -148,7 +158,7 @@ $1_DESTINATION := $$(OUTPUT_DIR)/$$($1_BASENAME)
148
158
  $$($1_DESTINATION) : $$($1_TARGET)
149
159
  mkdir -p $(OUTPUT_DIR)
150
160
  temppath=`mktemp "$(BUILD_DIR)"/tmp.XXXXXXXXXX` && \
151
- strip $$< -Sx -o "$$$$temppath" && \
161
+ $(if $4,cp $$< "$$$$temppath",strip $$< -Sx -o "$$$$temppath") && \
152
162
  chmod 755 "$$$$temppath" && \
153
163
  mv "$$$$temppath" $$@
154
164
  # short name target
@@ -169,6 +179,11 @@ $(eval $(call target,LIBZ,,libz$(DLEXT)))
169
179
  $(eval $(call target,OPTIPNG,,src/optipng/optipng))
170
180
  $(eval $(call target,OXIPNG,,target/release/oxipng))
171
181
  $(eval $(call target,PNGCRUSH))
182
+ ifdef IS_DARWIN
183
+ $(eval $(call target,PNGOUT,PNGOUT_DARWIN,,NOSTRIP))
184
+ else
185
+ $(eval $(call target,PNGOUT,PNGOUT_LINUX,,NOSTRIP))
186
+ endif
172
187
  $(eval $(call target,PNGQUANT))
173
188
 
174
189
  # ====== TARGETS ======
@@ -195,7 +210,7 @@ define check_exists
195
210
  endef
196
211
 
197
212
  define check_version
198
- @$(OUTPUT_DIR)/$1 $2 | fgrep -q $3 || \
213
+ @$(OUTPUT_DIR)/$1 $2 | fgrep -q "$3" || \
199
214
  { printf "$1: $(ANSI_RED)Expected $3, got $$($(OUTPUT_DIR)/$1 $2)$(ANSI_RESET)\n"; exit 1; }
200
215
  endef
201
216
 
@@ -249,6 +264,7 @@ test :
249
264
  $(call check_bin,optipng,--version,$(OPTIPNG_VER))
250
265
  $(call check_bin,oxipng,--version,$(OXIPNG_VER))
251
266
  $(call check_bin,pngcrush,-version 2>&1,$(PNGCRUSH_VER))
267
+ $(call check_bin,pngout,2>&1,$(shell perl -mTime::Piece -e 'print Time::Piece->strptime("$(PNGOUT_VER)", "%Y%m%d")->strftime("%b %e %Y")'))
252
268
  $(call check_bin,pngquant,--help,$(PNGQUANT_VER))
253
269
  .PHONY : test
254
270
 
@@ -271,15 +287,19 @@ docker-build : download
271
287
  $(foreach archive,$(ARCHIVES),--build-arg $(archive)_VER=$($(archive)_VER) --build-arg $(archive)_SHA256=$($(archive)_SHA256)) \
272
288
  -t $(DOCKER_IMAGE):latest \
273
289
  .
274
- .PHONY : docker-build
275
-
276
- docker-tag : docker-build
277
290
  @docker tag \
278
291
  $(DOCKER_IMAGE):latest \
279
292
  $(DOCKER_IMAGE):$(DOCKER_TAG)
280
- .PHONY : docker-tag
293
+ .PHONY : docker-build
281
294
 
282
- docker-push : docker-tag
295
+ docker-test : docker-build
296
+ @docker run \
297
+ --rm \
298
+ $(DOCKER_IMAGE):latest \
299
+ --info
300
+ .PHONY : docker-test
301
+
302
+ docker-push : docker-test
283
303
  @docker push $(DOCKER_IMAGE):latest
284
304
  @docker push $(DOCKER_IMAGE):$(DOCKER_TAG)
285
305
  .PHONY : docker-push
@@ -487,6 +507,13 @@ $(PNGCRUSH_TARGET) :
487
507
  LDFLAGS="$(XORIGIN) $(LDFLAGS)"
488
508
  $(call chrpath_origin,$@)
489
509
 
510
+ ## pngout
511
+ $(PNGOUT_TARGET) :
512
+ ifdef IS_LINUX
513
+ cd $(DIR) && ln -sf $(ARCH:x86_64=amd64)/pngout .
514
+ endif
515
+ cd $(DIR) && touch pngout
516
+
490
517
  ## pngquant
491
518
  $(eval $(call depend,PNGQUANT,LIBLCMS LIBPNG LIBZ))
492
519
  $(PNGQUANT_TARGET) :
data/README.markdown CHANGED
@@ -38,6 +38,9 @@ A test application with latest `image_optim` and `image_optim_pack` is available
38
38
  * [oxipng](https://github.com/shssoichiro/oxipng) by Joshua Holmer ([license](acknowledgements/oxipng.txt))
39
39
  * [pngcrush](https://pmt.sourceforge.io/pngcrush/) by Glenn Randers-Pehrson, portions by Greg Roelofs ([license](acknowledgements/pngcrush.txt))
40
40
  * contains [cexcept](http://www.nicemice.net/cexcept/) interface by Adam M. Costello and Cosmin Truta ([license](acknowledgements/cexcept.txt))
41
+ * [pngout](http://advsys.net/ken/utils.htm) by Ken Silverman ([license](acknowledgements/pngout.txt))
42
+ * Linux and BSD ports by Jonathon Fowler (http://www.jonof.id.au/pngout)
43
+ * Mac OS X port by Ken Silverman, with assistance by Jonathon Fowler
41
44
  * [pngquant](https://pngquant.org/) by Kornel Lesiński based on code by Greg Roelofs and Jef Poskanzer after an idea by Stefan Schneider ([license](acknowledgements/pngquant.txt))
42
45
  * [zlib](https://zlib.net/) by Jean-Loup Gailly and Mark Adler ([license](acknowledgements/zlib.txt))
43
46
 
@@ -0,0 +1,9 @@
1
+ PNGOUT / KZIP license:
2
+
3
+ I have gotten a lot of requests about bundling the command line executables, or releasing the source code to KZIP and PNGOUT. This is my license (updated 01/16/2021):
4
+
5
+ * The command line versions of PNGOUT.EXE and KZIP.EXE are free for use, as are the Mac and Linux ports.
6
+ * You may use PNGOUT- or KZIP-compressed content for non-commercial or commercial purposes.
7
+ * Redistributing, repackaging, or reusing the PNGOUT or KZIP executable is permitted for non-commercial projects that are distributed freely.
8
+ * For commercial requests (such as bundling with a commercial product), please write to my business partner, David Blake.
9
+ * When bundling, my credit (both my name and website) must be clearly displayed in some reasonable fashion that can be seen by an average user.
data/checksums.mk CHANGED
@@ -11,4 +11,7 @@ LIBZ_SHA256 := c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
11
11
  OPTIPNG_SHA256 := 4f32f233cef870b3f95d3ad6428bfe4224ef34908f1b42b0badf858216654452
12
12
  OXIPNG_SHA256 := aff72d2f627617f3f36d9796e65b83eb34f24d2c94f3a55612ade2df8ab8d946
13
13
  PNGCRUSH_SHA256 := fed0aaf5c098aa8c7f78c75365cd18d7341417326ecbdba547876b7b4f3df4be
14
+ PNGOUT_LINUX_SHA256 := ac38bba6f0de29033de866538c3afa64341319b695bbe388efbc5fd9e830e928
15
+ PNGOUT_LINUX_STATIC_SHA256 := 7a78ea475d65a00981bf418e5dfa3b34e42d6460fb992340802873bb14b08597
16
+ PNGOUT_DARWIN_SHA256 := 3272fa947eeafc1ac0086e1f14935f9efa21d090a555e6892255fe5c88f6686e
14
17
  PNGQUANT_SHA256 := a27cf0e64db499ccb3ddae9b36036e881f78293e46ec27a9e7a86a3802fcda66
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'image_optim_pack'
5
- s.version = '0.8.0.20220418'
5
+ s.version = '0.9.0'
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/livecheck CHANGED
@@ -208,6 +208,9 @@ oxipng:
208
208
  pngcrush:
209
209
  url: https://sourceforge.net/projects/pmt/rss?path=/pngcrush
210
210
  regexp: /pngcrush/(\d+(?:\.\d+)*)/
211
+ pngout:
212
+ url: http://www.jonof.id.au/kenutils.html
213
+ regexp: /files/kenutils/pngout-(\d{8})-linux.tar.gz
211
214
  pngquant:
212
215
  url: https://pngquant.org/releases.html
213
216
  regexp: <span itemprop='version'>(\d+(?:\.\d+)*)</span>
@@ -36,9 +36,9 @@ version_time = begin
36
36
  end.sort
37
37
  time_pairs << [nil, Time.now]
38
38
 
39
- time_pairs.each_cons(2).map do |(version_n, created_at), (_, next_created_at)|
39
+ time_pairs.each_cons(2).to_h do |(version_n, created_at), (_, next_created_at)|
40
40
  [version_n, next_created_at - created_at]
41
- end.to_h
41
+ end
42
42
  end
43
43
 
44
44
  table = Terminal::Table.new
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.8.0.20220418
4
+ version: 0.9.0
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Ivan Kuchin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-18 00:00:00.000000000 Z
11
+ date: 2022-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: image_optim
@@ -131,6 +131,7 @@ files:
131
131
  - acknowledgements/optipng.txt
132
132
  - acknowledgements/oxipng.txt
133
133
  - acknowledgements/pngcrush.txt
134
+ - acknowledgements/pngout.txt
134
135
  - acknowledgements/pngquant.txt
135
136
  - acknowledgements/smallfry.txt
136
137
  - acknowledgements/zlib.txt
@@ -170,6 +171,7 @@ files:
170
171
  - vendor/darwin-x86_64/optipng
171
172
  - vendor/darwin-x86_64/oxipng
172
173
  - vendor/darwin-x86_64/pngcrush
174
+ - vendor/darwin-x86_64/pngout
173
175
  - vendor/darwin-x86_64/pngquant
174
176
  homepage: https://github.com/toy/image_optim_pack
175
177
  licenses:
@@ -177,7 +179,7 @@ licenses:
177
179
  metadata:
178
180
  bug_tracker_uri: https://github.com/toy/image_optim_pack/issues
179
181
  changelog_uri: https://github.com/toy/image_optim_pack/blob/master/CHANGELOG.markdown
180
- documentation_uri: https://www.rubydoc.info/gems/image_optim_pack/0.8.0.20220418
182
+ documentation_uri: https://www.rubydoc.info/gems/image_optim_pack/0.9.0
181
183
  source_code_uri: https://github.com/toy/image_optim_pack
182
184
  post_install_message:
183
185
  rdoc_options: []