image_optim_pack 0.7.0.20210511 → 0.8.0.20220117

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.dockerignore +10 -0
  3. data/.github/workflows/check.yml +36 -0
  4. data/.github/workflows/rubocop.yml +16 -0
  5. data/.rubocop.yml +1 -0
  6. data/CHANGELOG.markdown +19 -0
  7. data/Dockerfile +167 -0
  8. data/Gemfile +0 -4
  9. data/LICENSE.txt +1 -1
  10. data/Makefile +54 -11
  11. data/README.markdown +27 -6
  12. data/Vagrantfile +26 -14
  13. data/acknowledgements/liblcms2.txt +21 -0
  14. data/acknowledgements/oxipng.txt +20 -0
  15. data/checksums.mk +5 -3
  16. data/image_optim_pack.gemspec +3 -3
  17. data/script/extract +19 -0
  18. data/script/livecheck +7 -1
  19. data/script/platform_downloads +23 -4
  20. data/script/run +2 -2
  21. data/vendor/darwin-x86_64/advpng +0 -0
  22. data/vendor/darwin-x86_64/gifsicle +0 -0
  23. data/vendor/darwin-x86_64/jhead +0 -0
  24. data/vendor/darwin-x86_64/jpeg-recompress +0 -0
  25. data/vendor/darwin-x86_64/jpegoptim +0 -0
  26. data/vendor/darwin-x86_64/jpegtran +0 -0
  27. data/vendor/darwin-x86_64/libjpeg.dylib +0 -0
  28. data/vendor/darwin-x86_64/liblcms2.dylib +0 -0
  29. data/vendor/darwin-x86_64/libpng.dylib +0 -0
  30. data/vendor/darwin-x86_64/libz.dylib +0 -0
  31. data/vendor/darwin-x86_64/optipng +0 -0
  32. data/vendor/darwin-x86_64/oxipng +0 -0
  33. data/vendor/darwin-x86_64/pngcrush +0 -0
  34. data/vendor/darwin-x86_64/pngquant +0 -0
  35. data/vendor/linux-i686/advpng +0 -0
  36. data/vendor/linux-i686/gifsicle +0 -0
  37. data/vendor/linux-i686/jhead +0 -0
  38. data/vendor/linux-i686/jpeg-recompress +0 -0
  39. data/vendor/linux-i686/jpegoptim +0 -0
  40. data/vendor/linux-i686/jpegtran +0 -0
  41. data/vendor/linux-i686/libjpeg.so +0 -0
  42. data/vendor/linux-i686/liblcms2.so +0 -0
  43. data/vendor/linux-i686/libpng.so +0 -0
  44. data/vendor/linux-i686/libz.so +0 -0
  45. data/vendor/linux-i686/optipng +0 -0
  46. data/vendor/linux-i686/oxipng +0 -0
  47. data/vendor/linux-i686/pngcrush +0 -0
  48. data/vendor/linux-i686/pngquant +0 -0
  49. data/vendor/linux-x86_64/advpng +0 -0
  50. data/vendor/linux-x86_64/gifsicle +0 -0
  51. data/vendor/linux-x86_64/jhead +0 -0
  52. data/vendor/linux-x86_64/jpeg-recompress +0 -0
  53. data/vendor/linux-x86_64/jpegoptim +0 -0
  54. data/vendor/linux-x86_64/jpegtran +0 -0
  55. data/vendor/linux-x86_64/libjpeg.so +0 -0
  56. data/vendor/linux-x86_64/liblcms2.so +0 -0
  57. data/vendor/linux-x86_64/optipng +0 -0
  58. data/vendor/linux-x86_64/oxipng +0 -0
  59. data/vendor/linux-x86_64/pngcrush +0 -0
  60. data/vendor/linux-x86_64/pngquant +0 -0
  61. metadata +25 -9
  62. data/.travis.yml +0 -41
  63. data/boxes/definitions/centos-i386/definition.rb +0 -32
  64. data/boxes/definitions/centos-i386/ks.cfg +0 -37
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7852ea59f176e968548022056385c61b560834f049a0a8b073add0a54d9b2e96
4
- data.tar.gz: 572a8d7816118f8d31faf52582972ab5f3fa554388a49436803c1d95252f6722
3
+ metadata.gz: 0d1affa7d357e4bd85586aceb99bfca732b3f2759f2def1fbb0cd2394b9df2ab
4
+ data.tar.gz: 65c502671f91d0e10275b3737e45f6840df1c1592b429aaab13c208dc3bfbb81
5
5
  SHA512:
6
- metadata.gz: 26800ec1838e187ed6a24db054c21d3a8f0d32660cff9e3b325382e58da3cf6c411dbc4a9364b32dd5cea81108a1e0e9efd13349d5b42c3202f174860550d839
7
- data.tar.gz: eed2a1cb3ad85466a57b9a8db63e6ea764cd872b8c979cc1cbadfc8b7708d9ff254b8763bb17f148ee8e56f8ccae32a5c9eaa04a4f83dc5263c1aae8b524b1bd
6
+ metadata.gz: 43a24bb40fb8c3409e53ca3988936bdc6d11768fcb3f05f7679c2a524c239cef4dd314f85c96c9f9659cd88c85ac37bc4e7b1940b38ad70c409cb4992a99963f
7
+ data.tar.gz: 575be068d79f068297371fc81b703fb3cc5d29e962cf4251d2c51fe878c34f4f4199058e16afcf8e0cabca3baaea93b658b958a2190cee41a6e2f92a9e367f33
data/.dockerignore ADDED
@@ -0,0 +1,10 @@
1
+ /boxes/
2
+ /.git/
3
+
4
+ /build/
5
+ /.vagrant/
6
+
7
+ Gemfile.lock
8
+ /*.gem
9
+ /.bundle
10
+ /tmp/
@@ -0,0 +1,36 @@
1
+ name: check
2
+ on:
3
+ push:
4
+ pull_request:
5
+ schedule:
6
+ - cron: 45 4 * * 0
7
+ jobs:
8
+ check:
9
+ runs-on: "${{ matrix.os }}"
10
+ strategy:
11
+ matrix:
12
+ os:
13
+ - ubuntu-latest
14
+ - macos-latest
15
+ ruby:
16
+ - '2.0'
17
+ - '2.1'
18
+ - '2.2'
19
+ - '2.3'
20
+ - '2.4'
21
+ - '2.5'
22
+ - '2.6'
23
+ - '2.7'
24
+ - '3.0'
25
+ - '3.1'
26
+ - jruby-9.2
27
+ fail-fast: false
28
+ steps:
29
+ - uses: actions/checkout@v2
30
+ - uses: ruby/setup-ruby@v1
31
+ with:
32
+ ruby-version: "${{ matrix.ruby }}"
33
+ bundler-cache: true
34
+ - run: make test
35
+ - run: bundle exec image_optim --info
36
+ - run: bundle exec rspec
@@ -0,0 +1,16 @@
1
+ name: rubocop
2
+ on:
3
+ push:
4
+ pull_request:
5
+ schedule:
6
+ - cron: 45 4 * * 0
7
+ jobs:
8
+ rubocop:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v2
12
+ - uses: ruby/setup-ruby@v1
13
+ with:
14
+ ruby-version: '3.1'
15
+ bundler-cache: true
16
+ - run: bundle exec rubocop
data/.rubocop.yml CHANGED
@@ -3,6 +3,7 @@ AllCops:
3
3
  - '*.gemspec'
4
4
  - 'build/**/*'
5
5
  - 'download/**/*'
6
+ - 'vendor/bundle/**/*'
6
7
  - Vagrantfile
7
8
  NewCops: enable
8
9
 
data/CHANGELOG.markdown CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  ## unreleased
4
4
 
5
+ ## v0.8.0.20220117 (2022-01-17)
6
+
7
+ * libjpeg 9e and pngquant 2.17.0 [@toy](https://github.com/toy)
8
+
9
+ ## v0.8.0.20211116 (2021-11-16)
10
+
11
+ * oxipng 5.0.1 [@toy](https://github.com/toy)
12
+
13
+ ## v0.8.0 (2021-10-20)
14
+
15
+ * Add [lcms2](https://littlecms.com) colour management library for pngquant [@toy](https://github.com/toy)
16
+ * Add [oxipng](https://github.com/shssoichiro/oxipng) (v5.0.0), switch to ubuntu/xenial32 for 32 bit [@toy](https://github.com/toy)
17
+
18
+ ## v0.7.0.20211002 (2021-10-02)
19
+
20
+ * pngquant 2.16.0 [@toy](https://github.com/toy)
21
+ * gifsicle 1.93 [@toy](https://github.com/toy)
22
+ * pngquant 2.15.1 [@toy](https://github.com/toy)
23
+
5
24
  ## v0.7.0.20210511 (2021-05-11)
6
25
 
7
26
  * pngquant 2.15.0 [@toy](https://github.com/toy)
data/Dockerfile ADDED
@@ -0,0 +1,167 @@
1
+ FROM alpine:3.12 as base
2
+ ENV LD_LIBRARY_PATH=/usr/local/lib
3
+ WORKDIR /tmp
4
+
5
+ FROM base as build
6
+ RUN apk add --no-cache build-base 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
+ 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.55-alpine3.13 as oxipng
109
+ RUN apk add --no-cache build-base
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 liblcms as pngquant
129
+ ARG PNGQUANT_VER
130
+ ARG PNGQUANT_SHA256
131
+ COPY download/pngquant-$PNGQUANT_VER.tar.gz download/
132
+ RUN ./extract pngquant && \
133
+ cd build/pngquant && \
134
+ make install
135
+
136
+ # FROM build as [name]
137
+ # ARG [NAME]_VER
138
+ # ARG [NAME]_SHA256
139
+ # COPY download/[name]-$[NAME]_VER.tar.gz download/
140
+ # RUN ./extract [name] && \
141
+ # cd build/[name] && \
142
+ # ./configure && \
143
+ # make install
144
+
145
+ FROM base as image_optim
146
+ RUN apk add --no-cache libstdc++ ruby npm perl dumb-init
147
+
148
+ COPY --from=advancecomp /usr/local/bin/advpng /usr/local/bin/
149
+ COPY --from=gifsicle /usr/local/bin/gifsicle /usr/local/bin/
150
+ COPY --from=jhead /usr/local/bin/jhead /usr/local/bin/
151
+ COPY --from=jpegarchive /usr/local/bin/jpeg-recompress /usr/local/bin/
152
+ COPY --from=jpegoptim /usr/local/bin/jpegoptim /usr/local/bin/
153
+ COPY --from=libjpeg /usr/local/bin/jpegtran /usr/local/bin/
154
+ COPY --from=optipng /usr/local/bin/optipng /usr/local/bin/
155
+ COPY --from=oxipng /usr/local/bin/oxipng /usr/local/bin/
156
+ COPY --from=pngcrush /usr/local/bin/pngcrush /usr/local/bin/
157
+ COPY --from=pngquant /usr/local/bin/pngquant /usr/local/bin/
158
+
159
+ COPY --from=libjpeg /usr/local/lib/libjpeg.so.9 /usr/local/lib/
160
+ COPY --from=libpng /usr/local/lib/libpng16.so.16 /usr/local/lib/
161
+ COPY --from=libz /usr/local/lib/libz.so.1 /usr/local/lib/
162
+ COPY --from=liblcms /usr/local/lib/liblcms2.so.2 /usr/local/lib/
163
+
164
+ RUN npm -g install svgo
165
+ RUN gem install --no-document image_optim
166
+ ENTRYPOINT ["dumb-init", "image_optim", "--skip-missing-workers"]
167
+ CMD ["--help"]
data/Gemfile CHANGED
@@ -4,10 +4,6 @@ source 'https://rubygems.org'
4
4
 
5
5
  gemspec :name => 'image_optim_pack'
6
6
 
7
- if RUBY_VERSION >= '2.0'
8
- gem 'travis_check_rubies', '~> 0.2'
9
- end
10
-
11
7
  if RUBY_VERSION >= '2.1.9'
12
8
  gem 'gems', '~> 1.0'
13
9
  gem 'terminal-table'
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014-2021 Ivan Kuchin
1
+ Copyright (c) 2014-2022 Ivan Kuchin
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/Makefile CHANGED
@@ -3,17 +3,19 @@ all :
3
3
  # ====== VERSIONS ======
4
4
 
5
5
  ADVANCECOMP_VER := 2.1
6
- GIFSICLE_VER := 1.92
6
+ GIFSICLE_VER := 1.93
7
7
  JHEAD_VER := 3.04
8
8
  JPEGARCHIVE_VER := 2.2.0
9
9
  JPEGOPTIM_VER := 1.4.6
10
- LIBJPEG_VER := 9d
10
+ LIBJPEG_VER := 9e
11
+ LIBLCMS_VER := 2.12
11
12
  LIBMOZJPEG_VER := 4.0.3
12
13
  LIBPNG_VER := 1.6.37
13
14
  LIBZ_VER := 1.2.11
14
15
  OPTIPNG_VER := 0.7.7
16
+ OXIPNG_VER := 5.0.1
15
17
  PNGCRUSH_VER := 1.8.13
16
- PNGQUANT_VER := 2.15.0
18
+ PNGQUANT_VER := 2.17.0
17
19
 
18
20
  # ====== CHECKSUMS ======
19
21
 
@@ -37,7 +39,6 @@ BUILD_ROOT_DIR := $(CURDIR)/build
37
39
  BUILD_DIR := $(BUILD_ROOT_DIR)/$(OS)-$(ARCH)
38
40
  OUTPUT_ROOT_DIR := $(CURDIR)/vendor
39
41
  OUTPUT_DIR := $(OUTPUT_ROOT_DIR)/$(OS)-$(ARCH)
40
- $(shell mkdir -p $(DL_DIR) $(BUILD_DIR) $(OUTPUT_DIR))
41
42
 
42
43
  ANSI_RED=\033[31m
43
44
  ANSI_GREEN=\033[32m
@@ -48,8 +49,7 @@ ANSI_RESET=\033[0m
48
49
 
49
50
  downcase = $(shell echo $1 | tr A-Z a-z)
50
51
 
51
- ln_s := ln -sf
52
- tar := $(shell if command -v gtar >/dev/null 2>&1; then echo gtar; else echo tar; fi)
52
+ tar := $(shell if command -v bsdtar >/dev/null 2>&1; then echo bsdtar; else echo tar; fi)
53
53
  sha256sum := $(shell if command -v sha256sum >/dev/null 2>&1; then echo sha256sum; elif command -v shasum >/dev/null 2>&1; then echo shasum -a 256; else echo sha256; fi)
54
54
 
55
55
  # ====== ARCHIVES ======
@@ -63,8 +63,9 @@ $1_DIR := $(BUILD_DIR)/$(call downcase,$1)
63
63
  $1_TGZ := $(DL_DIR)/$(call downcase,$1)-$($1_VER).tar.gz
64
64
  $1_EXTRACTED := $$($1_DIR)/__$$(notdir $$($1_TGZ))__
65
65
  $$($1_EXTRACTED) : $$($1_TGZ)
66
+ mkdir -p $(BUILD_DIR)
66
67
  rm -rf $$(@D)
67
- echo "$$($1_SHA256) $$($1_TGZ)" | $(sha256sum) -c
68
+ echo "$$($1_SHA256) $$<" | $(sha256sum) -c
68
69
  mkdir $$(@D)
69
70
  $(tar) -C $$(@D) --strip-components=1 -xzf $$<
70
71
  touch $$(@D)/__$$(notdir $$<)__
@@ -76,6 +77,7 @@ define archive-dl
76
77
  $(call archive,$1)
77
78
  # download archive from url
78
79
  $$($1_TGZ) :
80
+ mkdir -p $(DL_DIR)
79
81
  while ! mkdir $$@.lock 2> /dev/null; do sleep 1; done
80
82
  wget -q -O $$@.tmp $(subst [VER],$($1_VER),$(strip $2))
81
83
  mv $$@.tmp $$@
@@ -88,10 +90,12 @@ $(eval $(call archive-dl,JHEAD, https://www.sentex.ca/~mwandel/jhead/jhead
88
90
  $(eval $(call archive-dl,JPEGARCHIVE, https://github.com/danielgtaylor/jpeg-archive/archive/v[VER].tar.gz))
89
91
  $(eval $(call archive-dl,JPEGOPTIM, https://www.kokkonen.net/tjko/src/jpegoptim-[VER].tar.gz))
90
92
  $(eval $(call archive-dl,LIBJPEG, https://www.ijg.org/files/jpegsrc.v[VER].tar.gz))
93
+ $(eval $(call archive-dl,LIBLCMS, https://prdownloads.sourceforge.net/lcms/lcms2-[VER].tar.gz?download))
91
94
  $(eval $(call archive-dl,LIBMOZJPEG, https://github.com/mozilla/mozjpeg/archive/v[VER].tar.gz))
92
95
  $(eval $(call archive-dl,LIBPNG, https://prdownloads.sourceforge.net/libpng/libpng-[VER].tar.gz?download))
93
96
  $(eval $(call archive-dl,LIBZ, https://prdownloads.sourceforge.net/libpng/zlib-[VER].tar.gz?download))
94
97
  $(eval $(call archive-dl,OPTIPNG, https://prdownloads.sourceforge.net/optipng/optipng-[VER].tar.gz?download))
98
+ $(eval $(call archive-dl,OXIPNG, https://github.com/shssoichiro/oxipng/archive/refs/tags/v[VER].tar.gz))
95
99
  $(eval $(call archive-dl,PNGCRUSH, https://prdownloads.sourceforge.net/pmt/pngcrush-[VER]-nolib.tar.gz?download))
96
100
  $(eval $(call archive-dl,PNGQUANT, https://pngquant.org/pngquant-[VER]-src.tar.gz))
97
101
 
@@ -141,6 +145,7 @@ PRODUCTS += $1
141
145
  $1_DESTINATION := $$(OUTPUT_DIR)/$$($1_BASENAME)
142
146
  # copy product to output dir
143
147
  $$($1_DESTINATION) : $$($1_TARGET)
148
+ mkdir -p $(OUTPUT_DIR)
144
149
  temppath=`mktemp "$(BUILD_DIR)"/tmp.XXXXXXXXXX` && \
145
150
  strip $$< -Sx -o "$$$$temppath" && \
146
151
  chmod 755 "$$$$temppath" && \
@@ -156,10 +161,12 @@ $(eval $(call target,JPEG-RECOMPRESS,JPEGARCHIVE))
156
161
  $(eval $(call target,JPEGOPTIM))
157
162
  $(eval $(call target,JPEGTRAN,LIBJPEG,.libs/jpegtran))
158
163
  $(eval $(call target,LIBJPEG,,libjpeg$(DLEXT)))
164
+ $(eval $(call target,LIBLCMS,,liblcms2$(DLEXT)))
159
165
  $(eval $(call target-build,LIBMOZJPEG,,libjpeg.a))
160
166
  $(eval $(call target,LIBPNG,,libpng$(DLEXT)))
161
167
  $(eval $(call target,LIBZ,,libz$(DLEXT)))
162
168
  $(eval $(call target,OPTIPNG,,src/optipng/optipng))
169
+ $(eval $(call target,OXIPNG,,target/release/oxipng))
163
170
  $(eval $(call target,PNGCRUSH))
164
171
  $(eval $(call target,PNGQUANT))
165
172
 
@@ -235,9 +242,11 @@ test :
235
242
  $(call check_bin,jpegoptim,--version,$(JPEGOPTIM_VER))
236
243
  $(call check_bin,jpegtran,-v - 2>&1,$(LIBJPEG_VER))
237
244
  $(call check_lib,libjpeg$(DLEXT))
245
+ $(call check_lib,liblcms2$(DLEXT))
238
246
  $(call check_lib,libpng$(DLEXT))
239
247
  $(call check_lib,libz$(DLEXT))
240
248
  $(call check_bin,optipng,--version,$(OPTIPNG_VER))
249
+ $(call check_bin,oxipng,--version,$(OXIPNG_VER))
241
250
  $(call check_bin,pngcrush,-version 2>&1,$(PNGCRUSH_VER))
242
251
  $(call check_bin,pngquant,--help,$(PNGQUANT_VER))
243
252
  .PHONY : test
@@ -250,6 +259,24 @@ update-versions :
250
259
  make checksum-update
251
260
  .PHONY : update-versions
252
261
 
262
+ # ====== DOCKER ======
263
+
264
+ DOCKER_IMAGE := ghcr.io/toy/image_optim
265
+ DOCKER_TAG := $(shell date +%Y%m%d)
266
+
267
+ docker-build : download
268
+ @docker build \
269
+ $(foreach archive,$(ARCHIVES),--build-arg $(archive)_VER=$($(archive)_VER) --build-arg $(archive)_SHA256=$($(archive)_SHA256)) \
270
+ -t $(DOCKER_IMAGE):$(DOCKER_TAG) \
271
+ -t $(DOCKER_IMAGE):latest \
272
+ .
273
+ .PHONY : docker-build
274
+
275
+ docker-push : docker-build
276
+ @docker push $(DOCKER_IMAGE):$(DOCKER_TAG)
277
+ @docker push $(DOCKER_IMAGE):latest
278
+ .PHONY : docker-push
279
+
253
280
  # ====== CLEAN ======
254
281
 
255
282
  clean :
@@ -384,7 +411,19 @@ ifdef IS_DARWIN
384
411
  else
385
412
  cd $(DIR) && $(MAKE) libjpeg.la
386
413
  endif
387
- cd $(@D) && $(ln_s) .libs/libjpeg$(DLEXT) .
414
+ cd $(DIR) && ln -sf .libs/libjpeg$(DLEXT) .
415
+
416
+ ## liblcms
417
+ $(LIBLCMS_TARGET) :
418
+ cd $(DIR) && ./configure
419
+ cd $(DIR) && $(libtool_target_soname)
420
+ ifdef IS_DARWIN
421
+ cd $(DIR)/src && make liblcms2.la LDFLAGS="-Wl,-install_name,@loader_path/$(@F)"
422
+ else
423
+ cd $(DIR)/src && make liblcms2.la LDFLAGS="$(XORIGIN)"
424
+ endif
425
+ cd $(DIR) && ln -sf include/lcms2.h .
426
+ cd $(DIR) && ln -sf src/.libs/liblcms2$(DLEXT) .
388
427
 
389
428
  ## libmozjpeg
390
429
  $(LIBMOZJPEG_TARGET) :
@@ -403,7 +442,7 @@ ifdef IS_DARWIN
403
442
  else
404
443
  cd $(DIR) && $(MAKE) libpng16.la LDFLAGS="$(XORIGIN)"
405
444
  endif
406
- cd $(DIR) && $(ln_s) .libs/libpng16$(DLEXT) libpng$(DLEXT)
445
+ cd $(DIR) && ln -sf .libs/libpng16$(DLEXT) libpng$(DLEXT)
407
446
  $(call chrpath_origin,$@)
408
447
 
409
448
  ## libz
@@ -424,6 +463,10 @@ $(OPTIPNG_TARGET) :
424
463
  cd $(DIR) && $(MAKE) all LDFLAGS="$(XORIGIN) $(LDFLAGS)"
425
464
  $(call chrpath_origin,$@)
426
465
 
466
+ ## oxipng
467
+ $(OXIPNG_TARGET) :
468
+ cd $(DIR) && cargo build --release
469
+
427
470
  ## pngcrush
428
471
  $(eval $(call depend,PNGCRUSH,LIBPNG LIBZ))
429
472
  $(PNGCRUSH_TARGET) :
@@ -438,8 +481,8 @@ $(PNGCRUSH_TARGET) :
438
481
  $(call chrpath_origin,$@)
439
482
 
440
483
  ## pngquant
441
- $(eval $(call depend,PNGQUANT,LIBPNG LIBZ))
484
+ $(eval $(call depend,PNGQUANT,LIBLCMS LIBPNG LIBZ))
442
485
  $(PNGQUANT_TARGET) :
443
- cd $(DIR) && ./configure --without-cocoa --without-lcms2 --extra-ldflags="$(XORIGIN) $(STATIC_LIBGCC)"
486
+ cd $(DIR) && ./configure --without-cocoa --extra-ldflags="$(XORIGIN) $(STATIC_LIBGCC)"
444
487
  cd $(DIR) && $(MAKE) pngquant
445
488
  $(call chrpath_origin,$@)
data/README.markdown CHANGED
@@ -1,8 +1,8 @@
1
- [![Gem Version](https://img.shields.io/gem/v/image_optim_pack.svg?style=flat)](https://rubygems.org/gems/image_optim_pack)
2
- [![Build Status](https://img.shields.io/travis/toy/image_optim_pack/master.svg?style=flat)](https://travis-ci.org/toy/image_optim_pack)
3
- [![Code Climate](https://img.shields.io/codeclimate/maintainability/toy/image_optim_pack.svg?style=flat)](https://codeclimate.com/github/toy/image_optim_pack)
4
- [![Depfu](https://badges.depfu.com/badges/bf227ee8e4f77217ae440955acfadde0/overview.svg)](https://depfu.com/github/toy/image_optim_pack)
5
- [![Inch CI](https://inch-ci.org/github/toy/image_optim_pack.svg?branch=master&style=flat)](https://inch-ci.org/github/toy/image_optim_pack)
1
+ [![Gem Version](https://img.shields.io/gem/v/image_optim_pack?logo=rubygems)](https://rubygems.org/gems/image_optim_pack)
2
+ [![Build Status](https://img.shields.io/github/workflow/status/toy/image_optim_pack/check/master?logo=github)](https://github.com/toy/image_optim_pack/actions/workflows/check.yml)
3
+ [![Code Climate](https://img.shields.io/codeclimate/maintainability/toy/image_optim_pack?logo=codeclimate)](https://codeclimate.com/github/toy/image_optim_pack)
4
+ [![Depfu](https://img.shields.io/depfu/toy/image_optim_pack)](https://depfu.com/github/toy/image_optim_pack)
5
+ [![Inch CI](https://inch-ci.org/github/toy/image_optim_pack.svg?branch=master)](https://inch-ci.org/github/toy/image_optim_pack)
6
6
 
7
7
  # image\_optim\_pack
8
8
 
@@ -28,12 +28,14 @@ A test application with latest `image_optim` and `image_optim_pack` is available
28
28
  * [libjpeg-turbo](https://www.libjpeg-turbo.org/) by libjpeg-turbo Project ([license](acknowledgements/libjpeg-turbo.txt))
29
29
  * based on libjpeg, see above
30
30
  * includes [x86 SIMD extension for IJG JPEG library](https://cetus.sakura.ne.jp/softlab/jpeg-x86simd/jpegsimd.html) by Miyasaka Masaru ([license](acknowledgements/libjpeg-x86-simd.txt))
31
+ * [liblcms2](https://littlecms.com) by Marti Maria ([license](acknowledgements/liblcms2.txt))
31
32
  * [libpng](http://libpng.org/pub/png/) by Guy Eric Schalnat, Andreas Dilger, Glenn Randers-Pehrson and others ([license](acknowledgements/libpng.txt))
32
33
  * [mozjpeg](https://github.com/mozilla/mozjpeg) by Mozilla Research ([license](acknowledgements/mozjpeg.txt))
33
34
  * base on libjpeg and libjpeg-turbo, see above
34
35
  * [optipng](http://optipng.sourceforge.net/) by Cosmin Truta ([license](acknowledgements/optipng.txt), [authors](acknowledgements/optipng-authors.txt))
35
36
  * contains code based in part on the work of Miyasaka Masaru for BMP support ([license](acknowledgements/bmp2png.txt))
36
37
  * and David Koblas for GIF support ([license](acknowledgements/gifread.txt))
38
+ * [oxipng](https://github.com/shssoichiro/oxipng) by Joshua Holmer ([license](acknowledgements/oxipng.txt))
37
39
  * [pngcrush](https://pmt.sourceforge.io/pngcrush/) by Glenn Randers-Pehrson, portions by Greg Roelofs ([license](acknowledgements/pngcrush.txt))
38
40
  * contains [cexcept](http://www.nicemice.net/cexcept/) interface by Adam M. Costello and Cosmin Truta ([license](acknowledgements/cexcept.txt))
39
41
  * [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))
@@ -90,6 +92,25 @@ make clean-all # Remove build root and output root directories
90
92
  make clobber # `clean-all` and remove download directory
91
93
  ```
92
94
 
95
+ ## Docker
96
+
97
+ This project includes a `Dockerfile` in the root, which builds a minimal image with most binaries included.
98
+
99
+ #### Running
100
+
101
+ ```bash
102
+ docker run --rm ghcr.io/toy/image_optim --version # image_optim version
103
+ docker run --rm ghcr.io/toy/image_optim --info # image_optim info including bin versions
104
+ docker run --rm -v "$PWD":/here -w /here ghcr.io/toy/image_optim image-in-this-folder.jpg
105
+ ```
106
+
107
+ #### Building
108
+
109
+ ```bash
110
+ make docker-build # will be tagged with latest and current date in format %Y%m%d
111
+ make docker-push # will push tags created by docker-build
112
+ ```
113
+
93
114
  ## Copyright
94
115
 
95
- Copyright (c) 2014-2021 Ivan Kuchin. See [LICENSE.txt](LICENSE.txt) for details.
116
+ Copyright (c) 2014-2022 Ivan Kuchin. See [LICENSE.txt](LICENSE.txt) for details.
data/Vagrantfile CHANGED
@@ -9,6 +9,7 @@ Vagrant.configure('2') do |config|
9
9
  config.vm.provider 'virtualbox' do |vb|
10
10
  vb.check_guest_additions = false
11
11
  vb.customize ['modifyvm', :id, '--groups', '/image_optim']
12
+ vb.customize ['modifyvm', :id, '--uartmode1', 'disconnected'] # override for ubuntu/xenial32
12
13
  end
13
14
 
14
15
  # handle manually using rsync
@@ -16,30 +17,41 @@ Vagrant.configure('2') do |config|
16
17
 
17
18
  {
18
19
  'linux-x86_64' => 'boxes/centos-amd64.box',
19
- 'linux-i686' => 'boxes/centos-i386.box',
20
+ 'linux-i686' => 'ubuntu/xenial32',
20
21
  }.each do |name, location|
21
22
  config.vm.define name do |machine|
22
23
  machine.vm.hostname = name.gsub('_', '-')
23
24
  machine.vm.box = location
24
25
 
25
- machine.vm.provision :shell, inline: case name
26
- when /^linux/
27
- <<-SH
26
+ machine.vm.provision :shell, inline: <<-SH
27
+ if command -v apt-get; then
28
28
  set -ex
29
- if command -v apt-get; then
30
- apt-get update
31
- apt-get -y install rsync ntpdate make wget gcc g++ chrpath perl pkg-config autoconf automake libtool nasm cmake
32
- else
33
- yum -y install rsync ntpdate make wget gcc gcc-c++ chrpath perl pkg-config autoconf automake libtool nasm cmake
34
- fi
35
- SH
36
- end
37
29
 
38
- machine.vm.provision :shell, inline: <<-SH
39
- set -ex
30
+ apt-get update
31
+ apt-get -y install rsync ntpdate make wget gcc g++ chrpath perl pkg-config autoconf automake libtool nasm cmake cargo
32
+ else
33
+ set -ex
34
+
35
+ yum -y install epel-release
36
+ yum -y install rsync ntpdate make wget gcc gcc-c++ chrpath perl pkg-config autoconf automake libtool nasm cmake cargo
37
+ fi
38
+
40
39
  mkdir -p /vagrant
41
40
  chown vagrant:vagrant /vagrant
42
41
  SH
42
+
43
+ machine.vm.provision :shell, run: 'always', inline: <<-SH
44
+ if command -v apt-get; then
45
+ set -ex
46
+
47
+ apt-get update
48
+ apt-get -y dist-upgrade
49
+ else
50
+ set -ex
51
+
52
+ yum -y update
53
+ fi
54
+ SH
43
55
  end
44
56
  end
45
57
  end
@@ -0,0 +1,21 @@
1
+ Little CMS
2
+ Copyright (c) 1998-2020 Marti Maria Saguer
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining
5
+ a copy of this software and associated documentation files (the
6
+ "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish,
8
+ distribute, sublicense, and/or sell copies of the Software, and to
9
+ permit persons to whom the Software is furnished to do so, subject
10
+ to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+ Copyright (c) 2016 Joshua Holmer
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ this software and associated documentation files (the "Software"), to deal in
6
+ the Software without restriction, including without limitation the rights to
7
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8
+ of the Software, and to permit persons to whom the Software is furnished to do
9
+ so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
data/checksums.mk CHANGED
@@ -1,12 +1,14 @@
1
1
  ADVANCECOMP_SHA256 := 3ac0875e86a8517011976f04107186d5c60d434954078bc502ee731480933eb8
2
- GIFSICLE_SHA256 := 5ab556c01d65fddf980749e3ccf50b7fd40de738b6df679999294cc5fabfce65
2
+ GIFSICLE_SHA256 := 92f67079732bf4c1da087e6ae0905205846e5ac777ba5caa66d12a73aa943447
3
3
  JHEAD_SHA256 := ef89bbcf4f6c25ed88088cf242a47a6aedfff4f08cc7dc205bf3e2c0f10a03c9
4
4
  JPEGARCHIVE_SHA256 := 3da16a5abbddd925dee0379aa51d9fe0cba33da0b5703be27c13a2dda3d7ed75
5
5
  JPEGOPTIM_SHA256 := 88b1eb64c2a33a2f013f068df8b0331f42c019267401ae3fa28e3277403a5ab7
6
- LIBJPEG_SHA256 := 99cb50e48a4556bc571dadd27931955ff458aae32f68c4d9c39d624693f69c32
6
+ LIBJPEG_SHA256 := 4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d
7
+ LIBLCMS_SHA256 := 18663985e864100455ac3e507625c438c3710354d85e5cbb7cd4043e11fe10f5
7
8
  LIBMOZJPEG_SHA256 := 4f22731db2afa14531a5bf2633d8af79ca5cb697a550f678bf43f24e5e409ef0
8
9
  LIBPNG_SHA256 := daeb2620d829575513e35fecc83f0d3791a620b9b93d800b763542ece9390fb4
9
10
  LIBZ_SHA256 := c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
10
11
  OPTIPNG_SHA256 := 4f32f233cef870b3f95d3ad6428bfe4224ef34908f1b42b0badf858216654452
12
+ OXIPNG_SHA256 := aff72d2f627617f3f36d9796e65b83eb34f24d2c94f3a55612ade2df8ab8d946
11
13
  PNGCRUSH_SHA256 := fed0aaf5c098aa8c7f78c75365cd18d7341417326ecbdba547876b7b4f3df4be
12
- PNGQUANT_SHA256 := c5051b9eb3de5acd1ee3b5b4cc87036b25289277fcef8f293a35f84da71e5a04
14
+ 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.7.0.20210511'
5
+ s.version = '0.8.0.20220117'
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']
@@ -54,8 +54,8 @@ Gem::Specification.new do |s|
54
54
  s.add_dependency 'fspath', '>= 2.1', '< 4'
55
55
 
56
56
  s.add_development_dependency 'rspec', '~> 3.0'
57
- if RUBY_VERSION >= '2.4'
58
- s.add_development_dependency 'rubocop', '~> 1.0'
57
+ if RUBY_VERSION >= '2.5'
58
+ s.add_development_dependency 'rubocop', '~> 1.22', '!= 1.22.2'
59
59
  s.add_development_dependency 'rubocop-rspec', '~> 2.0'
60
60
  end
61
61
  end
data/script/extract ADDED
@@ -0,0 +1,19 @@
1
+ #!/bin/sh
2
+
3
+ set -e
4
+
5
+ if [ "$#" -ne 1 ]; then
6
+ echo "Require name of package as argument" >&2
7
+ exit 1
8
+ fi
9
+
10
+ name="$1"
11
+ upcase=$(echo "$name" | tr a-z A-Z)
12
+ version=$(printenv "${upcase}_VER")
13
+ checksum=$(printenv "${upcase}_SHA256")
14
+ archive="download/${name}-${version}.tar.gz"
15
+ build_dir="build/$name"
16
+
17
+ echo "$checksum $archive" | sha256sum -c
18
+ mkdir -p "$build_dir"
19
+ tar -C "$build_dir" --strip-components=1 -xzf "$archive"
data/script/livecheck CHANGED
@@ -179,7 +179,7 @@ jhead:
179
179
  url: https://www.sentex.ca/~mwandel/jhead/
180
180
  regexp: jhead-(\d+(?:\.\d+)*)
181
181
  jpegoptim:
182
- url: https://github.com/tjko/jpegoptim/releases.atom
182
+ url: https://github.com/tjko/jpegoptim/tags.atom
183
183
  regexp: <id>tag:github.com,2008:Repository/\d+/\D+?(\d+(?:\.\d+)*)</id>
184
184
  jpegarchive:
185
185
  url: https://github.com/danielgtaylor/jpeg-archive/releases.atom
@@ -187,6 +187,9 @@ jpegarchive:
187
187
  libjpeg:
188
188
  url: https://www.ijg.org/files/
189
189
  regexp: jpegsrc.v(.*?).tar.gz
190
+ liblcms:
191
+ url: https://sourceforge.net/projects/lcms/rss?path=/lcms
192
+ regexp: /lcms/(\d+(?:\.\d+)*)/
190
193
  libmozjpeg:
191
194
  url: https://github.com/mozilla/mozjpeg/releases.atom
192
195
  regexp: <id>tag:github.com,2008:Repository/\d+/\D+?(\d+(?:\.\d+)*)</id>
@@ -199,6 +202,9 @@ libz:
199
202
  optipng:
200
203
  url: https://sourceforge.net/projects/optipng/rss
201
204
  regexp: /OptiPNG/optipng-(\d+(?:\.\d+)*)/
205
+ oxipng:
206
+ url: https://github.com/shssoichiro/oxipng/releases.atom
207
+ regexp: <id>tag:github.com,2008:Repository/\d+/v(\d+(?:\.\d+)*)</id>
202
208
  pngcrush:
203
209
  url: https://sourceforge.net/projects/pmt/rss?path=/pngcrush
204
210
  regexp: /pngcrush/(\d+(?:\.\d+)*)/
@@ -5,7 +5,26 @@ require 'gems'
5
5
  require 'ostruct'
6
6
  require 'terminal-table'
7
7
 
8
- versions = Gems.versions('image_optim_pack').map(&OpenStruct.method(:new))
8
+ ATTRIBUTES = %i[
9
+ authors
10
+ built_at
11
+ created_at
12
+ description
13
+ downloads_count
14
+ metadata
15
+ number
16
+ summary
17
+ platform
18
+ rubygems_version
19
+ ruby_version
20
+ prerelease
21
+ licenses
22
+ requirements
23
+ sha
24
+ ].freeze
25
+ Version = Struct.new(*ATTRIBUTES, :keyword_init => true)
26
+
27
+ versions = Gems.versions('image_optim_pack').map(&Version.method(:new))
9
28
 
10
29
  platforms = versions.map(&:platform).uniq.sort_by do |platform|
11
30
  platform.sub('amd64', 'x86_64').split('-').reverse
@@ -24,7 +43,7 @@ end
24
43
 
25
44
  table = Terminal::Table.new
26
45
 
27
- table.headings = %W[version days base\ dls] + platforms.map do |platform|
46
+ table.headings = ['version', 'days', 'base dls'] + platforms.map do |platform|
28
47
  platform.split('-').reverse.join("\n")
29
48
  end
30
49
 
@@ -38,11 +57,11 @@ versions.group_by(&:number).each do |version_n, platform_versions|
38
57
  base_downloads = platform_versions.map(&:downloads_count).min
39
58
 
40
59
  platform_values = downloads_by_platform.values_at(*platforms).map do |count|
41
- next unless count
60
+ next '' unless count
42
61
 
43
62
  count == base_downloads ? '=' : format('%+d', count - base_downloads)
44
63
  end
45
- table << [
64
+ table.add_row [
46
65
  version_n,
47
66
  (version_time[version_n] / (24 * 60 * 60)).round,
48
67
  base_downloads,
data/script/run CHANGED
@@ -38,7 +38,7 @@ for arch in x86_64; do
38
38
 
39
39
  mkdir -p "vendor/$platform"
40
40
 
41
- sudo -u _image_optim bash -c "
41
+ sudo -u _image_optim --set-home bash -c "
42
42
  set -e
43
43
 
44
44
  mkdir -p '$build_dir'
@@ -53,7 +53,7 @@ for arch in x86_64; do
53
53
  rsync -aR --del "$build_dir/./vendor/$platform" .
54
54
  done
55
55
 
56
- for vm in $(perl -pe "s/.*?'(.+?-.+?)'\s+=>\s+'.+?\/.+?'.*|.*/\$1/" Vagrantfile); do
56
+ for vm in $(perl -pe "s/.*?'(.+?-.+?)'\s+=>\s+'.+?\/.+?'.*|.*/\$1/" Vagrantfile | uniq); do
57
57
  passes-filter "$vm" || continue
58
58
  header "$vm"
59
59
 
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
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,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.7.0.20210511
4
+ version: 0.8.0.20220117
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Kuchin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-10 00:00:00.000000000 Z
11
+ date: 2022-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: image_optim
@@ -64,14 +64,20 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '1.0'
67
+ version: '1.22'
68
+ - - "!="
69
+ - !ruby/object:Gem::Version
70
+ version: 1.22.2
68
71
  type: :development
69
72
  prerelease: false
70
73
  version_requirements: !ruby/object:Gem::Requirement
71
74
  requirements:
72
75
  - - "~>"
73
76
  - !ruby/object:Gem::Version
74
- version: '1.0'
77
+ version: '1.22'
78
+ - - "!="
79
+ - !ruby/object:Gem::Version
80
+ version: 1.22.2
75
81
  - !ruby/object:Gem::Dependency
76
82
  name: rubocop-rspec
77
83
  requirement: !ruby/object:Gem::Requirement
@@ -92,10 +98,13 @@ executables: []
92
98
  extensions: []
93
99
  extra_rdoc_files: []
94
100
  files:
101
+ - ".dockerignore"
102
+ - ".github/workflows/check.yml"
103
+ - ".github/workflows/rubocop.yml"
95
104
  - ".gitignore"
96
105
  - ".rubocop.yml"
97
- - ".travis.yml"
98
106
  - CHANGELOG.markdown
107
+ - Dockerfile
99
108
  - Gemfile
100
109
  - LICENSE.txt
101
110
  - Makefile
@@ -114,10 +123,12 @@ files:
114
123
  - acknowledgements/libjpeg-turbo.txt
115
124
  - acknowledgements/libjpeg-x86-simd.txt
116
125
  - acknowledgements/libjpeg.txt
126
+ - acknowledgements/liblcms2.txt
117
127
  - acknowledgements/libpng.txt
118
128
  - acknowledgements/mozjpeg.txt
119
129
  - acknowledgements/optipng-authors.txt
120
130
  - acknowledgements/optipng.txt
131
+ - acknowledgements/oxipng.txt
121
132
  - acknowledgements/pngcrush.txt
122
133
  - acknowledgements/pngquant.txt
123
134
  - acknowledgements/smallfry.txt
@@ -130,8 +141,6 @@ files:
130
141
  - boxes/Rakefile
131
142
  - boxes/definitions/centos-amd64/definition.rb
132
143
  - boxes/definitions/centos-amd64/ks.cfg
133
- - boxes/definitions/centos-i386/definition.rb
134
- - boxes/definitions/centos-i386/ks.cfg
135
144
  - boxes/definitions/centos-postinstall.sh
136
145
  - checksums.mk
137
146
  - image_optim_pack-darwin-x86_64.gemspec
@@ -140,6 +149,7 @@ files:
140
149
  - image_optim_pack.gemspec
141
150
  - lib/image_optim/pack.rb
142
151
  - lib/image_optim_pack.rb
152
+ - script/extract
143
153
  - script/livecheck
144
154
  - script/platform_downloads
145
155
  - script/run
@@ -153,9 +163,11 @@ files:
153
163
  - vendor/darwin-x86_64/jpegoptim
154
164
  - vendor/darwin-x86_64/jpegtran
155
165
  - vendor/darwin-x86_64/libjpeg.dylib
166
+ - vendor/darwin-x86_64/liblcms2.dylib
156
167
  - vendor/darwin-x86_64/libpng.dylib
157
168
  - vendor/darwin-x86_64/libz.dylib
158
169
  - vendor/darwin-x86_64/optipng
170
+ - vendor/darwin-x86_64/oxipng
159
171
  - vendor/darwin-x86_64/pngcrush
160
172
  - vendor/darwin-x86_64/pngquant
161
173
  - vendor/linux-i686/advpng
@@ -165,9 +177,11 @@ files:
165
177
  - vendor/linux-i686/jpegoptim
166
178
  - vendor/linux-i686/jpegtran
167
179
  - vendor/linux-i686/libjpeg.so
180
+ - vendor/linux-i686/liblcms2.so
168
181
  - vendor/linux-i686/libpng.so
169
182
  - vendor/linux-i686/libz.so
170
183
  - vendor/linux-i686/optipng
184
+ - vendor/linux-i686/oxipng
171
185
  - vendor/linux-i686/pngcrush
172
186
  - vendor/linux-i686/pngquant
173
187
  - vendor/linux-x86_64/advpng
@@ -177,9 +191,11 @@ files:
177
191
  - vendor/linux-x86_64/jpegoptim
178
192
  - vendor/linux-x86_64/jpegtran
179
193
  - vendor/linux-x86_64/libjpeg.so
194
+ - vendor/linux-x86_64/liblcms2.so
180
195
  - vendor/linux-x86_64/libpng.so
181
196
  - vendor/linux-x86_64/libz.so
182
197
  - vendor/linux-x86_64/optipng
198
+ - vendor/linux-x86_64/oxipng
183
199
  - vendor/linux-x86_64/pngcrush
184
200
  - vendor/linux-x86_64/pngquant
185
201
  homepage: https://github.com/toy/image_optim_pack
@@ -188,7 +204,7 @@ licenses:
188
204
  metadata:
189
205
  bug_tracker_uri: https://github.com/toy/image_optim_pack/issues
190
206
  changelog_uri: https://github.com/toy/image_optim_pack/blob/master/CHANGELOG.markdown
191
- documentation_uri: https://www.rubydoc.info/gems/image_optim_pack/0.7.0.20210511
207
+ documentation_uri: https://www.rubydoc.info/gems/image_optim_pack/0.8.0.20220117
192
208
  source_code_uri: https://github.com/toy/image_optim_pack
193
209
  post_install_message:
194
210
  rdoc_options: []
@@ -205,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
221
  - !ruby/object:Gem::Version
206
222
  version: '0'
207
223
  requirements: []
208
- rubygems_version: 3.2.16
224
+ rubygems_version: 3.3.5
209
225
  signing_key:
210
226
  specification_version: 4
211
227
  summary: 'Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpeg-recompress,
data/.travis.yml DELETED
@@ -1,41 +0,0 @@
1
- dist: xenial
2
- language: ruby
3
- rvm:
4
- - '1.9.3-p551'
5
- - '2.0.0-p648'
6
- - '2.1.10'
7
- - '2.2.10'
8
- - '2.3.8'
9
- - '2.4.10'
10
- - '2.5.9'
11
- - '2.6.7'
12
- - '2.7.3'
13
- - '3.0.1'
14
- - 'jruby-9.2.14.0'
15
- script:
16
- - make test
17
- - bundle exec image_optim --info
18
- - bundle exec rspec
19
- before_install:
20
- - 'echo "gem: --no-ri --no-rdoc --no-document" > ~/.gemrc'
21
- - gem install rubygems-update || gem install rubygems-update --version '< 3'
22
- - update_rubygems
23
- - gem install bundler || gem install bundler --version '< 2'
24
- - if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install imagemagick; fi; which convert
25
- - make ldd-version
26
- matrix:
27
- include:
28
- - os: osx
29
- rvm: default
30
- osx_image: xcode11.3
31
- - os: osx
32
- rvm: default
33
- osx_image: xcode12.2
34
- - env: RUBOCOP=1
35
- rvm: '2.6.7'
36
- script: bundle exec rubocop
37
- - env: CHECK_RUBIES=1
38
- rvm: '2.6.7'
39
- script: bundle exec travis_check_rubies
40
- allow_failures:
41
- - rvm: 'jruby-9.2.14.0'
@@ -1,32 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Veewee::Session.declare({
4
- :cpu_count => '1',
5
- :memory_size => '512',
6
- :disk_size => '8192',
7
- :disk_format => 'VDI',
8
- :hostiocache => 'off',
9
- :os_type_id => 'RedHat',
10
- :iso_file => 'CentOS-7-i386-Minimal-2009.iso',
11
- :iso_src => 'http://linux.darkpenguin.net/distros/CentOS-AltArch/7.9.2009/isos/i386/CentOS-7-i386-Minimal-2009.iso',
12
- :iso_sha256 => 'bcbde5d345c5013fa618c38380765547be01a354883b3055f32d7067dd7b5bca',
13
- :iso_download_timeout => '1000',
14
- :boot_wait => '10',
15
- :boot_cmd_sequence => [
16
- '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>',
17
- ],
18
- :kickstart_port => '7122',
19
- :kickstart_timeout => '300',
20
- :kickstart_file => 'ks.cfg',
21
- :ssh_login_timeout => '10000',
22
- :ssh_user => 'veewee',
23
- :ssh_password => 'veewee',
24
- :ssh_key => '',
25
- :ssh_host_port => '7222',
26
- :ssh_guest_port => '22',
27
- :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
28
- :shutdown_cmd => '/sbin/halt -h -p',
29
- :postinstall_files => %w[../centos-postinstall.sh],
30
- :postinstall_timeout => '10000',
31
- :skip_iso_transfer => true,
32
- })
@@ -1,37 +0,0 @@
1
- install
2
- cdrom
3
- lang en_US.UTF-8
4
- keyboard us
5
- network --bootproto=dhcp
6
- rootpw --iscrypted $1$damlkd,f$UC/u5pUts5QiU3ow.CSso/
7
- firewall --enabled --service=ssh
8
- authconfig --enableshadow --passalgo=sha512
9
- selinux --disabled
10
- timezone UTC
11
- bootloader --location=mbr
12
-
13
- text
14
- skipx
15
- zerombr
16
-
17
- clearpart --all --initlabel
18
- autopart
19
-
20
- auth --useshadow --enablemd5
21
- firstboot --disabled
22
- reboot
23
-
24
- %packages --nobase
25
- @core
26
- openssh-clients
27
- %end
28
-
29
- %post
30
- /usr/bin/yum -y install sudo
31
- /usr/sbin/groupadd veewee
32
- /usr/sbin/useradd veewee -g veewee -G wheel
33
- echo "veewee"|passwd --stdin veewee
34
- echo "veewee ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/veewee
35
- chmod 0440 /etc/sudoers.d/veewee
36
- %end
37
-