image_optim_pack 0.3.1.20170318 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +5 -0
  3. data/.travis.yml +11 -5
  4. data/Makefile +63 -61
  5. data/README.markdown +1 -0
  6. data/Vagrantfile +6 -5
  7. data/boxes/.rubocop.yml +3 -3
  8. data/boxes/Gemfile +5 -0
  9. data/boxes/Rakefile +2 -1
  10. data/boxes/definitions/freebsd-amd64/definition.rb +3 -3
  11. data/boxes/definitions/freebsd-i386/definition.rb +3 -3
  12. data/boxes/definitions/openbsd-amd64/definition.rb +1 -1
  13. data/boxes/definitions/openbsd-i386/definition.rb +1 -1
  14. data/image_optim_pack.gemspec +1 -1
  15. data/script/run +2 -2
  16. data/vendor/darwin-i386/advpng +0 -0
  17. data/vendor/darwin-i386/gifsicle +0 -0
  18. data/vendor/darwin-i386/jhead +0 -0
  19. data/vendor/darwin-i386/jpeg-recompress +0 -0
  20. data/vendor/darwin-i386/jpegoptim +0 -0
  21. data/vendor/darwin-i386/jpegtran +0 -0
  22. data/vendor/darwin-i386/libjpeg.dylib +0 -0
  23. data/vendor/darwin-i386/libpng.dylib +0 -0
  24. data/vendor/darwin-i386/libz.dylib +0 -0
  25. data/vendor/darwin-i386/optipng +0 -0
  26. data/vendor/darwin-i386/pngcrush +0 -0
  27. data/vendor/darwin-i386/pngquant +0 -0
  28. data/vendor/darwin-x86_64/advpng +0 -0
  29. data/vendor/darwin-x86_64/gifsicle +0 -0
  30. data/vendor/darwin-x86_64/jhead +0 -0
  31. data/vendor/darwin-x86_64/jpeg-recompress +0 -0
  32. data/vendor/darwin-x86_64/jpegoptim +0 -0
  33. data/vendor/darwin-x86_64/jpegtran +0 -0
  34. data/vendor/darwin-x86_64/libjpeg.dylib +0 -0
  35. data/vendor/darwin-x86_64/libpng.dylib +0 -0
  36. data/vendor/darwin-x86_64/libz.dylib +0 -0
  37. data/vendor/darwin-x86_64/optipng +0 -0
  38. data/vendor/darwin-x86_64/pngcrush +0 -0
  39. data/vendor/darwin-x86_64/pngquant +0 -0
  40. data/vendor/freebsd-amd64/advpng +0 -0
  41. data/vendor/freebsd-amd64/gifsicle +0 -0
  42. data/vendor/freebsd-amd64/jhead +0 -0
  43. data/vendor/freebsd-amd64/jpeg-recompress +0 -0
  44. data/vendor/freebsd-amd64/jpegoptim +0 -0
  45. data/vendor/freebsd-amd64/jpegtran +0 -0
  46. data/vendor/freebsd-amd64/libjpeg.so +0 -0
  47. data/vendor/freebsd-amd64/libpng.so +0 -0
  48. data/vendor/freebsd-amd64/libz.so +0 -0
  49. data/vendor/freebsd-amd64/optipng +0 -0
  50. data/vendor/freebsd-amd64/pngcrush +0 -0
  51. data/vendor/freebsd-amd64/pngquant +0 -0
  52. data/vendor/freebsd-i386/advpng +0 -0
  53. data/vendor/freebsd-i386/gifsicle +0 -0
  54. data/vendor/freebsd-i386/jhead +0 -0
  55. data/vendor/freebsd-i386/jpeg-recompress +0 -0
  56. data/vendor/freebsd-i386/jpegoptim +0 -0
  57. data/vendor/freebsd-i386/jpegtran +0 -0
  58. data/vendor/freebsd-i386/libjpeg.so +0 -0
  59. data/vendor/freebsd-i386/libpng.so +0 -0
  60. data/vendor/freebsd-i386/libz.so +0 -0
  61. data/vendor/freebsd-i386/optipng +0 -0
  62. data/vendor/freebsd-i386/pngcrush +0 -0
  63. data/vendor/freebsd-i386/pngquant +0 -0
  64. data/vendor/linux-i686/advpng +0 -0
  65. data/vendor/linux-i686/gifsicle +0 -0
  66. data/vendor/linux-i686/jhead +0 -0
  67. data/vendor/linux-i686/jpeg-recompress +0 -0
  68. data/vendor/linux-i686/jpegoptim +0 -0
  69. data/vendor/linux-i686/jpegtran +0 -0
  70. data/vendor/linux-i686/libjpeg.so +0 -0
  71. data/vendor/linux-i686/libpng.so +0 -0
  72. data/vendor/linux-i686/libz.so +0 -0
  73. data/vendor/linux-i686/optipng +0 -0
  74. data/vendor/linux-i686/pngcrush +0 -0
  75. data/vendor/linux-i686/pngquant +0 -0
  76. data/vendor/linux-x86_64/advpng +0 -0
  77. data/vendor/linux-x86_64/gifsicle +0 -0
  78. data/vendor/linux-x86_64/jhead +0 -0
  79. data/vendor/linux-x86_64/jpeg-recompress +0 -0
  80. data/vendor/linux-x86_64/jpegoptim +0 -0
  81. data/vendor/linux-x86_64/jpegtran +0 -0
  82. data/vendor/linux-x86_64/libjpeg.so +0 -0
  83. data/vendor/linux-x86_64/libpng.so +0 -0
  84. data/vendor/linux-x86_64/libz.so +0 -0
  85. data/vendor/linux-x86_64/optipng +0 -0
  86. data/vendor/linux-x86_64/pngcrush +0 -0
  87. data/vendor/linux-x86_64/pngquant +0 -0
  88. data/vendor/openbsd-amd64/advpng +0 -0
  89. data/vendor/openbsd-amd64/gifsicle +0 -0
  90. data/vendor/openbsd-amd64/jhead +0 -0
  91. data/vendor/openbsd-amd64/jpeg-recompress +0 -0
  92. data/vendor/openbsd-amd64/jpegoptim +0 -0
  93. data/vendor/openbsd-amd64/jpegtran +0 -0
  94. data/vendor/openbsd-amd64/libjpeg.so +0 -0
  95. data/vendor/openbsd-amd64/libpng.so +0 -0
  96. data/vendor/openbsd-amd64/libz.so +0 -0
  97. data/vendor/openbsd-amd64/optipng +0 -0
  98. data/vendor/openbsd-amd64/pngcrush +0 -0
  99. data/vendor/openbsd-amd64/pngquant +0 -0
  100. data/vendor/openbsd-i386/advpng +0 -0
  101. data/vendor/openbsd-i386/gifsicle +0 -0
  102. data/vendor/openbsd-i386/jhead +0 -0
  103. data/vendor/openbsd-i386/jpeg-recompress +0 -0
  104. data/vendor/openbsd-i386/jpegoptim +0 -0
  105. data/vendor/openbsd-i386/jpegtran +0 -0
  106. data/vendor/openbsd-i386/libjpeg.so +0 -0
  107. data/vendor/openbsd-i386/libpng.so +0 -0
  108. data/vendor/openbsd-i386/libz.so +0 -0
  109. data/vendor/openbsd-i386/optipng +0 -0
  110. data/vendor/openbsd-i386/pngcrush +0 -0
  111. data/vendor/openbsd-i386/pngquant +0 -0
  112. metadata +3 -8
  113. data/boxes/definitions/centos-amd64/definition.rb +0 -30
  114. data/boxes/definitions/centos-amd64/ks.cfg +0 -37
  115. data/boxes/definitions/centos-i386/definition.rb +0 -30
  116. data/boxes/definitions/centos-i386/ks.cfg +0 -37
  117. data/boxes/definitions/centos-postinstall.sh +0 -33
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32968ec24a3ce7def81244407c709254506566b2
4
- data.tar.gz: 649e4802bc63d2da764f86aab95e9f1b114b4193
3
+ metadata.gz: cb494271691e9abefb3561c371edc69c189f4a06
4
+ data.tar.gz: e991e94942704825edf3381d25cb7de853400715
5
5
  SHA512:
6
- metadata.gz: 12b67a15393cb29989b9cdfb67274ea605ee09ed03b9957fad85f98ede910ae4d2af4be7acad256c39c3253c2e95d19b0fba76d2cd38f6af2225c5a2f60d5a5a
7
- data.tar.gz: a47414a41edda453daca16dccec5086950975e3c5051a58ccfd4e2e7d82f8d405143661f102ae9b27dcb6b7f3c5d9c83157b8cd4e9019e4bb5e6caf68a29ddb8
6
+ metadata.gz: 5fa4b7f4e40550e9042749a74788e175503bf7e7b35bfdf0094bccbb2362272a420b70afdcdfd1b9b6be0369ab58a6e40a71ade755160e0c131b9b506da71262
7
+ data.tar.gz: efd70a78618bdd521ad722e17288225b520cd761142a3c8b04003f4f6989cc68296da060fdb5631fd8e64798aa52cf75f3ce32fbab4a3c91a96213237fe76875
data/.rubocop.yml CHANGED
@@ -1,6 +1,8 @@
1
1
  AllCops:
2
2
  Exclude:
3
3
  - '*.gemspec'
4
+ - 'build/**/*'
5
+ - 'download/**/*'
4
6
  - Vagrantfile
5
7
 
6
8
  Bundler/OrderedGems:
@@ -67,6 +69,9 @@ Style/SpaceInsideHashLiteralBraces:
67
69
  Style/SpecialGlobalVars:
68
70
  Enabled: false
69
71
 
72
+ Style/SymbolArray:
73
+ Enabled: false
74
+
70
75
  Style/TrailingCommaInArguments:
71
76
  EnforcedStyleForMultiline: no_comma
72
77
 
data/.travis.yml CHANGED
@@ -5,9 +5,9 @@ rvm:
5
5
  - '1.9.3-p551'
6
6
  - '2.0.0-p648'
7
7
  - '2.1.10'
8
- - '2.2.6'
9
- - '2.3.3'
10
- - '2.4.0'
8
+ - '2.2.7'
9
+ - '2.3.4'
10
+ - '2.4.1'
11
11
  - 'jruby-1.7.26'
12
12
  - 'jruby-9.0.5.0'
13
13
  - 'jruby-9.1.5.0'
@@ -19,11 +19,17 @@ before_install:
19
19
  if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install imagemagick; fi
20
20
  matrix:
21
21
  include:
22
+ - dist: trusty
23
+ rvm: default
24
+ - os: osx
25
+ rvm: default
26
+ osx_image: xcode7.3
22
27
  - os: osx
23
28
  rvm: default
29
+ osx_image: xcode8.3
24
30
  - env: RUBOCOP=✓
25
- rvm: '2.4.0'
31
+ rvm: '2.4.1'
26
32
  script: bundle exec rubocop
27
33
  - env: CHECK_RUBIES=✓
28
- rvm: '2.4.0'
34
+ rvm: '2.4.1'
29
35
  script: bundle exec travis_check_rubies
data/Makefile CHANGED
@@ -13,7 +13,7 @@ LIBPNG_VER := 1.6.29
13
13
  LIBZ_VER := 1.2.11
14
14
  OPTIPNG_VER := 0.7.6
15
15
  PNGCRUSH_VER := 1.8.11
16
- PNGQUANT_VER := 2.9.0
16
+ PNGQUANT_VER := 2.9.1
17
17
 
18
18
  # ====== CONSTANTS ======
19
19
 
@@ -110,13 +110,15 @@ PRODUCTS :=
110
110
 
111
111
  # $1 - product name
112
112
  # $2 - archive name ($1 if empty)
113
- # $3 - basename ($1 if empty)
113
+ # $3 - path ($1 if empty)
114
114
  define target-build
115
- $1_BASENAME := $(or $3,$(call downcase,$1))
115
+ $1_PATH := $(or $3,$(call downcase,$1))
116
+ $1_BASENAME := $$(notdir $$($1_PATH))
116
117
  $1_DIR := $($(or $2,$1)_DIR)
117
118
  $1_TGZ := $($(or $2,$1)_TGZ)
118
119
  $1_EXTRACTED := $($(or $2,$1)_EXTRACTED)
119
- $1_TARGET := $$($1_DIR)/$$($1_BASENAME)
120
+ $1_TARGET := $$($1_DIR)/$$($1_PATH)
121
+ $$($1_TARGET) : DIR := $$($1_DIR)
120
122
  $$($1_TARGET) : $$($1_EXTRACTED)
121
123
  endef
122
124
 
@@ -129,7 +131,7 @@ PRODUCTS += $1
129
131
  $1_DESTINATION := $$(OUTPUT_DIR)/$$($1_BASENAME)
130
132
  # copy product to output dir
131
133
  $$($1_DESTINATION) : $$($1_TARGET)
132
- temppath=`mktemp tmp.XXXXXXXXXX` && \
134
+ temppath=`mktemp "$(BUILD_DIR)"/tmp.XXXXXXXXXX` && \
133
135
  strip $$< -Sx -o "$$$$temppath" && \
134
136
  chmod 755 "$$$$temppath" && \
135
137
  mv "$$$$temppath" $$@
@@ -138,16 +140,16 @@ $(call downcase,$1) : | $$($1_DESTINATION)
138
140
  endef
139
141
 
140
142
  $(eval $(call target,ADVPNG,ADVANCECOMP))
141
- $(eval $(call target,GIFSICLE))
143
+ $(eval $(call target,GIFSICLE,,src/gifsicle))
142
144
  $(eval $(call target,JHEAD))
143
145
  $(eval $(call target,JPEG-RECOMPRESS,JPEGARCHIVE))
144
146
  $(eval $(call target,JPEGOPTIM))
145
- $(eval $(call target,JPEGTRAN,LIBJPEG))
147
+ $(eval $(call target,JPEGTRAN,LIBJPEG,.libs/jpegtran))
146
148
  $(eval $(call target,LIBJPEG,,libjpeg$(DLEXT)))
147
149
  $(eval $(call target-build,LIBMOZJPEG,,libjpeg.a))
148
150
  $(eval $(call target,LIBPNG,,libpng$(DLEXT)))
149
151
  $(eval $(call target,LIBZ,,libz$(DLEXT)))
150
- $(eval $(call target,OPTIPNG))
152
+ $(eval $(call target,OPTIPNG,,src/optipng/optipng))
151
153
  $(eval $(call target,PNGCRUSH))
152
154
  $(eval $(call target,PNGQUANT))
153
155
 
@@ -217,7 +219,7 @@ clobber : clean-all
217
219
  rm -rf $(DL_DIR)
218
220
  .PHONY : clobber
219
221
 
220
- # ====== BUILDING ======
222
+ # ====== BUILD HELPERS ======
221
223
 
222
224
  # $1 - name of product
223
225
  # $2 - list of dependency products
@@ -241,7 +243,7 @@ endef
241
243
 
242
244
  pkgconfig_pwd = perl -pi -e 's/(?<=dir=).*/$$ENV{PWD}/'
243
245
 
244
- libtool_target_soname = cd $(@D) && perl -pi -e 's/(?<=soname_spec=)".*"/"$(@F)"/ ; s/(?<=library_names_spec=)".*"/"\\\$$libname\\\$$shared_ext"/' -- libtool
246
+ libtool_target_soname = perl -pi -e 's/(?<=soname_spec=)".*"/"$(@F)"/ ; s/(?<=library_names_spec=)".*"/"\\\$$libname\\\$$shared_ext"/' -- libtool
245
247
 
246
248
  ifdef IS_DARWIN
247
249
  chrpath_origin =
@@ -259,22 +261,20 @@ else
259
261
  XORIGIN :=
260
262
  endif
261
263
 
262
- export CC = gcc
263
- export CXX = g++
264
+ # ====== ENV ======
265
+
266
+ export CC := gcc
267
+ export CXX := g++
264
268
 
265
269
  GCC_FLAGS := -O3
266
- ifdef IS_DARWIN
267
- GCC_FLAGS += -arch $(ARCH)
268
- else
269
- GCC_FLAGS += -s
270
- endif
271
- export CFLAGS := $(GCC_FLAGS)
272
- export CXXFLAGS := $(GCC_FLAGS)
273
- export CPPFLAGS := $(GCC_FLAGS)
274
- export LDFLAGS := $(GCC_FLAGS)
270
+ export CFLAGS = $(GCC_FLAGS)
271
+ export CXXFLAGS = $(GCC_FLAGS)
272
+ export CPPFLAGS = $(GCC_FLAGS)
273
+ export LDFLAGS = $(GCC_FLAGS)
275
274
 
276
275
  ifdef IS_DARWIN
277
- export MACOSX_DEPLOYMENT_TARGET=10.6
276
+ export MACOSX_DEPLOYMENT_TARGET := 10.6
277
+ GCC_FLAGS += -arch $(ARCH)
278
278
  endif
279
279
 
280
280
  ifdef IS_BSD
@@ -283,75 +283,75 @@ export AUTOCONF_VERSION := $(call autotool_version,autoconf)
283
283
  export AUTOMAKE_VERSION := $(call autotool_version,automake)
284
284
  endif
285
285
 
286
+ # ====== BUILD TARGETS ======
287
+
286
288
  ## advpng
287
289
  $(eval $(call depend,ADVPNG,LIBZ))
288
290
  $(ADVPNG_TARGET) :
289
- cd $(@D) && ./configure LDFLAGS="$(XORIGIN)"
290
- cd $(@D) && $(MAKE) advpng
291
+ cd $(DIR) && ./configure LDFLAGS="$(XORIGIN)"
292
+ cd $(DIR) && $(MAKE) advpng
291
293
  $(call chrpath_origin,$@)
292
294
 
293
295
  ## gifsicle
294
296
  $(GIFSICLE_TARGET) :
295
- cd $(@D) && ./configure
296
- cd $(@D) && $(MAKE) gifsicle
297
- cd $(@D) && $(ln_s) src/gifsicle .
297
+ cd $(DIR) && ./configure
298
+ cd $(DIR) && $(MAKE) gifsicle
298
299
 
299
300
  ## jhead
300
301
  $(JHEAD_TARGET) :
301
- cd $(@D) && $(MAKE) jhead CC="$(CC) $(GCC_FLAGS)"
302
+ cd $(DIR) && $(MAKE) jhead CC="$(CC) $(CFLAGS)"
302
303
 
303
304
  ## jpeg-recompress
304
305
  $(eval $(call depend-build,JPEG-RECOMPRESS,LIBMOZJPEG))
305
306
  $(JPEG-RECOMPRESS_TARGET) :
306
- cd $(@D) && $(MAKE) jpeg-recompress CC="$(CC) $(GCC_FLAGS)" LIBJPEG=$(LIBMOZJPEG_TARGET) \
307
+ cd $(DIR) && $(MAKE) jpeg-recompress CC="$(CC) $(CFLAGS)" LIBJPEG=$(LIBMOZJPEG_TARGET) \
307
308
  MAKE=$(MAKE) # fix for bsd in jpeg-archive-2.1.1
308
309
 
309
310
  ## jpegoptim
310
311
  $(eval $(call depend,JPEGOPTIM,LIBJPEG))
311
312
  $(JPEGOPTIM_TARGET) :
312
- cd $(@D) && ./configure LDFLAGS="$(XORIGIN)" --host $(HOST)
313
- cd $(@D) && $(MAKE) jpegoptim
313
+ cd $(DIR) && ./configure LDFLAGS="$(XORIGIN)" --host $(HOST)
314
+ cd $(DIR) && $(MAKE) jpegoptim
314
315
  $(call chrpath_origin,$@)
315
316
 
316
317
  ## jpegtran
317
318
  $(eval $(call depend,JPEGTRAN,LIBJPEG))
318
319
  $(JPEGTRAN_TARGET) :
319
- cd $(@D) && $(MAKE) jpegtran LDFLAGS="$(XORIGIN)"
320
- cd $(@D) && $(ln_s) .libs/jpegtran .
320
+ cd $(DIR) && $(MAKE) jpegtran LDFLAGS="$(XORIGIN)"
321
321
  $(call chrpath_origin,$(JPEGTRAN_TARGET))
322
322
 
323
323
  ## libjpeg
324
324
  $(LIBJPEG_TARGET) :
325
- cd $(@D) && ./configure CC="$(CC) $(GCC_FLAGS)"
326
- $(libtool_target_soname)
325
+ cd $(DIR) && ./configure CC="$(CC) $(CFLAGS)"
326
+ cd $(DIR) && $(libtool_target_soname)
327
327
  ifdef IS_DARWIN
328
- cd $(@D) && $(MAKE) libjpeg.la LDFLAGS="-Wl,-install_name,@loader_path/$(@F)"
328
+ cd $(DIR) && $(MAKE) libjpeg.la LDFLAGS="-Wl,-install_name,@loader_path/$(@F)"
329
329
  else
330
- cd $(@D) && $(MAKE) libjpeg.la
330
+ cd $(DIR) && $(MAKE) libjpeg.la
331
331
  endif
332
332
  cd $(@D) && $(ln_s) .libs/libjpeg$(DLEXT) .
333
333
 
334
334
  ## libmozjpeg
335
335
  $(LIBMOZJPEG_TARGET) :
336
- cd $(@D) && autoreconf -fiv
337
- cd $(@D) && ./configure --host $(HOST)
338
- cd $(@D)/simd && $(MAKE)
339
- cd $(@D) && $(MAKE) libjpeg.la
340
- cd $(@D) && $(ln_s) .libs/libjpeg.a .
336
+ cd $(DIR) && autoreconf -fiv
337
+ cd $(DIR) && ./configure --host $(HOST)
338
+ cd $(DIR)/simd && $(MAKE)
339
+ cd $(DIR) && $(MAKE) libjpeg.la
340
+ cd $(DIR) && $(ln_s) .libs/libjpeg.a .
341
341
 
342
342
  ## libpng
343
343
  $(eval $(call depend,LIBPNG,LIBZ))
344
344
  $(LIBPNG_TARGET) :
345
- cd $(@D) && ./configure CC="$(CC) $(GCC_FLAGS)"
346
- cd $(@D) && $(pkgconfig_pwd) -- *.pc
347
- cd $(@D) && perl -pi -e 's/(?<=lpng)\d+//g' -- *.pc # %MAJOR%%MINOR% suffix
348
- $(libtool_target_soname)
345
+ cd $(DIR) && ./configure CC="$(CC) $(CFLAGS)"
346
+ cd $(DIR) && $(pkgconfig_pwd) -- *.pc
347
+ cd $(DIR) && perl -pi -e 's/(?<=lpng)\d+//g' -- *.pc # %MAJOR%%MINOR% suffix
348
+ cd $(DIR) && $(libtool_target_soname)
349
349
  ifdef IS_DARWIN
350
- cd $(@D) && $(MAKE) libpng16.la LDFLAGS="-Wl,-install_name,@loader_path/$(@F)"
350
+ cd $(DIR) && $(MAKE) libpng16.la LDFLAGS="-Wl,-install_name,@loader_path/$(@F)"
351
351
  else
352
- cd $(@D) && $(MAKE) libpng16.la LDFLAGS="$(XORIGIN)"
352
+ cd $(DIR) && $(MAKE) libpng16.la LDFLAGS="$(XORIGIN)"
353
353
  endif
354
- cd $(@D) && $(ln_s) .libs/libpng16$(DLEXT) libpng$(DLEXT)
354
+ cd $(DIR) && $(ln_s) .libs/libpng16$(DLEXT) libpng$(DLEXT)
355
355
  $(call chrpath_origin,$@)
356
356
 
357
357
  ## libz
@@ -361,31 +361,33 @@ else
361
361
  $(LIBZ_TARGET) : export LDSHARED = $(CC) -shared -Wl,-soname,$(@F),--version-script,zlib.map
362
362
  endif
363
363
  $(LIBZ_TARGET) :
364
- cd $(@D) && ./configure
365
- cd $(@D) && $(pkgconfig_pwd) -- *.pc
366
- cd $(@D) && $(MAKE) placebo
364
+ cd $(DIR) && ./configure
365
+ cd $(DIR) && $(pkgconfig_pwd) -- *.pc
366
+ cd $(DIR) && $(MAKE) placebo
367
367
 
368
368
  ## optipng
369
369
  $(eval $(call depend,OPTIPNG,LIBPNG LIBZ))
370
370
  $(OPTIPNG_TARGET) :
371
- cd $(@D) && ./configure -with-system-libs
372
- cd $(@D) && $(MAKE) all LDFLAGS="$(XORIGIN) $(GCC_FLAGS)"
373
- cd $(@D) && $(ln_s) src/optipng/optipng .
371
+ cd $(DIR) && ./configure -with-system-libs
372
+ cd $(DIR) && $(MAKE) all LDFLAGS="$(XORIGIN) $(LDFLAGS)"
374
373
  $(call chrpath_origin,$@)
375
374
 
376
375
  ## pngcrush
377
376
  $(eval $(call depend,PNGCRUSH,LIBPNG LIBZ))
378
377
  $(PNGCRUSH_TARGET) :
379
- cd $(@D) && rm -f png.h pngconf.h
380
- cd $(@D) && $(MAKE) -f Makefile pngcrush \
378
+ cd $(DIR) && rm -f png.h pngconf.h
379
+ cd $(DIR) && $(MAKE) pngcrush \
380
+ CC="$(CC)" \
381
+ LD="$(CC)" \
381
382
  LIBS="-lpng -lz -lm" \
382
- CFLAGS="$(GCC_FLAGS)" \
383
- LDFLAGS="$(XORIGIN) $(GCC_FLAGS)"
383
+ CFLAGS="$(CFLAGS)" \
384
+ CPPFLAGS="$(CPPFLAGS)" \
385
+ LDFLAGS="$(XORIGIN) $(LDFLAGS)"
384
386
  $(call chrpath_origin,$@)
385
387
 
386
388
  ## pngquant
387
389
  $(eval $(call depend,PNGQUANT,LIBPNG LIBZ))
388
390
  $(PNGQUANT_TARGET) :
389
- cd $(@D) && ./configure --without-cocoa --extra-ldflags="$(XORIGIN)"
390
- cd $(@D) && $(MAKE) pngquant
391
+ cd $(DIR) && ./configure --without-cocoa --extra-ldflags="$(XORIGIN)"
392
+ cd $(DIR) && $(MAKE) pngquant
391
393
  $(call chrpath_origin,$@)
data/README.markdown CHANGED
@@ -67,6 +67,7 @@ Boxes for vagrant are built using [veewee](https://github.com/jedi4ever/veewee),
67
67
  ```sh
68
68
  script/run # Build and test all for all oses and architectures
69
69
  script/run NO_HALT=1 # Don't halt VMs after building
70
+ script/run NO_UP=1 # Don't start VMs before building (will fail if not already running)
70
71
  script/run darwin 64 # Build only platforms matching darwin or 64
71
72
 
72
73
  make # Build all tools and copy them to vendor/OS-ARCH for current OS and ARCH, then test
data/Vagrantfile CHANGED
@@ -10,14 +10,15 @@ Vagrant.configure('2') do |config|
10
10
  # there are no guest additions
11
11
  config.vm.provider 'virtualbox' do |vb|
12
12
  vb.check_guest_additions = false
13
+ vb.customize ['modifyvm', :id, '--groups', '/image_optim']
13
14
  end
14
15
 
15
16
  # handle manually using rsync
16
17
  config.vm.synced_folder '.', '/vagrant', disabled: true
17
18
 
18
19
  {
19
- 'linux-x86_64' => 'boxes/centos-amd64.box',
20
- 'linux-i686' => 'boxes/centos-i386.box',
20
+ 'linux-x86_64' => 'ubuntu/trusty64',
21
+ 'linux-i686' => 'ubuntu/trusty32',
21
22
  'freebsd-amd64' => 'boxes/freebsd-amd64.box',
22
23
  'freebsd-i386' => 'boxes/freebsd-i386.box',
23
24
  'openbsd-amd64' => 'boxes/openbsd-amd64.box',
@@ -31,17 +32,17 @@ Vagrant.configure('2') do |config|
31
32
  when /^linux/
32
33
  <<-SH
33
34
  set -ex
34
- yum -y install rsync ntpdate make wget gcc gcc-c++ chrpath perl pkg-config autoconf automake libtool nasm
35
+ apt-get -y install rsync ntpdate make wget gcc g++ chrpath perl pkg-config autoconf automake libtool nasm
35
36
  SH
36
37
  when /^freebsd/
37
38
  <<-SH
38
39
  set -ex
39
- pkg install -y rsync ntp gmake wget gcc chrpath perl5 pkgconf autoconf automake libtool nasm
40
+ pkg install -y rsync gmake wget gcc chrpath perl5 pkgconf autoconf automake libtool nasm
40
41
  SH
41
42
  when /^openbsd/
42
43
  <<-SH
43
44
  set -ex
44
- pkg_add -z rsync-- ntp gmake gtar-- wget gcc-4.8.2p2 autoconf-2.69 automake-1.14.1 libtool nasm
45
+ pkg_add -z rsync-- ntp gmake gtar-- wget g++-4.8.2p2 autoconf-2.69 automake-1.14.1 libtool nasm
45
46
  path=/home/vagrant/shared
46
47
  mkdir -p $path
47
48
  chown vagrant:vagrant $path
data/boxes/.rubocop.yml CHANGED
@@ -1,13 +1,13 @@
1
1
  inherit_from: ../.rubocop.yml
2
2
 
3
- Lint/Eval:
4
- Exclude: [Rakefile]
5
-
6
3
  Lint/UnneededSplatExpansion:
7
4
  Enabled: false
8
5
 
9
6
  Metrics/LineLength:
10
7
  Enabled: false
11
8
 
9
+ Security/Eval:
10
+ Exclude: [Rakefile]
11
+
12
12
  Style/BracesAroundHashParameters:
13
13
  Enabled: false
data/boxes/Gemfile CHANGED
@@ -1,6 +1,11 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ gem 'rake'
4
+
3
5
  gem 'veewee', '= 0.4.5.1'
4
6
  gem 'dotenv', '~> 2.0'
5
7
  gem 'atlas', '~> 1.3'
6
8
  gem 'progress', '~> 3.1'
9
+
10
+ gem 'net-scp'
11
+ gem 'progressbar', '~> 0.21.0'
data/boxes/Rakefile CHANGED
@@ -35,9 +35,10 @@ class Box # :nodoc:
35
35
  end
36
36
 
37
37
  def dependencies
38
- [definition_path] + Array(definition[:postinstall_files]).map do |path|
38
+ postinstall_file_paths = Array(definition[:postinstall_files]).map do |path|
39
39
  definition_dir + path
40
40
  end
41
+ [definition_path] + postinstall_file_paths
41
42
  end
42
43
 
43
44
  def build
@@ -5,9 +5,9 @@ Veewee::Session.declare({
5
5
  :disk_format => 'VDI',
6
6
  :hostiocache => 'off',
7
7
  :os_type_id => 'FreeBSD_64',
8
- :iso_file => 'FreeBSD-9.3-RELEASE-amd64-disc1.iso',
9
- :iso_src => 'http://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/9.3/FreeBSD-9.3-RELEASE-amd64-disc1.iso',
10
- :iso_sha256 => '5a3c82653d77bba7d7ded8bd7efbedc09d52cf4045d98ce52a82c9e0f8fa9b0e',
8
+ :iso_file => 'FreeBSD-10.3-RELEASE-amd64-disc1.iso',
9
+ :iso_src => 'http://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/10.3/FreeBSD-10.3-RELEASE-amd64-disc1.iso',
10
+ :iso_sha256 => 'fef068cf6dea26923ab84b62ba9f21461ca0bdec90a0741c8ffb0e1ca29e410d',
11
11
  :iso_download_timeout => '1000',
12
12
  :boot_wait => '10',
13
13
  :boot_cmd_sequence => [
@@ -5,9 +5,9 @@ Veewee::Session.declare({
5
5
  :disk_format => 'VDI',
6
6
  :hostiocache => 'off',
7
7
  :os_type_id => 'FreeBSD',
8
- :iso_file => 'FreeBSD-9.3-RELEASE-i386-disc1.iso',
9
- :iso_src => 'http://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/9.3/FreeBSD-9.3-RELEASE-i386-disc1.iso',
10
- :iso_sha256 => 'cab6aad9c3d5ea6a3fb4059f808225c67f1edaea730c555a86a9707ac41ba75d',
8
+ :iso_file => 'FreeBSD-10.3-RELEASE-i386-disc1.iso',
9
+ :iso_src => 'http://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/10.3/FreeBSD-10.3-RELEASE-i386-disc1.iso',
10
+ :iso_sha256 => '8329ee2ca4779892edbb001c303670d74642e4353e97d02f4521895023cacd5d',
11
11
  :iso_download_timeout => '1000',
12
12
  :boot_wait => '10',
13
13
  :boot_cmd_sequence => [
@@ -6,7 +6,7 @@ Veewee::Session.declare({
6
6
  :hostiocache => 'off',
7
7
  :os_type_id => 'OpenBSD_64',
8
8
  :iso_file => 'OpenBSD-5.5-amd64.iso',
9
- :iso_src => 'http://ftp3.usa.openbsd.org/pub/OpenBSD/5.5/amd64/install55.iso',
9
+ :iso_src => 'https://www.mirrorservice.org/pub/OpenBSD/5.5/amd64/install55.iso',
10
10
  :iso_sha256 => 'cc465ce3f8397883e91c6e1a8a98b1b3507a338984bbfe8978050c5f8fdcaf3f',
11
11
  :iso_download_timeout => '1000',
12
12
  :boot_wait => '50',
@@ -6,7 +6,7 @@ Veewee::Session.declare({
6
6
  :hostiocache => 'off',
7
7
  :os_type_id => 'OpenBSD',
8
8
  :iso_file => 'OpenBSD-5.5-i386.iso',
9
- :iso_src => 'http://ftp3.usa.openbsd.org/pub/OpenBSD/5.5/i386/install55.iso',
9
+ :iso_src => 'https://www.mirrorservice.org/pub/OpenBSD/5.5/i386/install55.iso',
10
10
  :iso_sha256 => '43798eb4f459b58062167c24337230e96c78b01887a4be40d89279df379f3565',
11
11
  :iso_download_timeout => '1000',
12
12
  :boot_wait => '50',
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'image_optim_pack'
5
- s.version = '0.3.1.20170318'
5
+ s.version = '0.4.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 = "http://github.com/toy/#{s.name}"
8
8
  s.authors = ['Ivan Kuchin']
data/script/run CHANGED
@@ -36,11 +36,11 @@ for arch in i386 x86_64; do
36
36
  make $MAKE_TASK ARCH=$arch
37
37
  done
38
38
 
39
- for vm in $(perl -pe "s/.*?'(.+?-.+?)'.*|.*/\$1/" Vagrantfile | sort -u); do
39
+ for vm in $(perl -pe "s/.*?'(.+?-.+?)'\s+=>\s+'.+?\/.+?'.*|.*/\$1/" Vagrantfile | sort -u); do
40
40
  passes-filter "$vm" || continue
41
41
  header "$vm"
42
42
 
43
- vagrant up $vm
43
+ [[ -n "$NO_UP" ]] || vagrant up $vm
44
44
 
45
45
  # create ssh config
46
46
  ssh_config=.vagrant/ssh_config.$vm
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
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
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.3.1.20170318
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Kuchin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-18 00:00:00.000000000 Z
11
+ date: 2017-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: image_optim
@@ -113,11 +113,6 @@ files:
113
113
  - boxes/.rubocop.yml
114
114
  - boxes/Gemfile
115
115
  - boxes/Rakefile
116
- - boxes/definitions/centos-amd64/definition.rb
117
- - boxes/definitions/centos-amd64/ks.cfg
118
- - boxes/definitions/centos-i386/definition.rb
119
- - boxes/definitions/centos-i386/ks.cfg
120
- - boxes/definitions/centos-postinstall.sh
121
116
  - boxes/definitions/freebsd-amd64/definition.rb
122
117
  - boxes/definitions/freebsd-amd64/install.sh
123
118
  - boxes/definitions/freebsd-i386/definition.rb
@@ -251,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
251
246
  version: '0'
252
247
  requirements: []
253
248
  rubyforge_project: image_optim_pack
254
- rubygems_version: 2.6.10
249
+ rubygems_version: 2.6.11
255
250
  signing_key:
256
251
  specification_version: 4
257
252
  summary: 'Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpeg-recompress,
@@ -1,30 +0,0 @@
1
- Veewee::Session.declare({
2
- :cpu_count => '1',
3
- :memory_size => '512',
4
- :disk_size => '8192',
5
- :disk_format => 'VDI',
6
- :hostiocache => 'off',
7
- :os_type_id => 'RedHat6_64',
8
- :iso_file => 'CentOS-6.5-x86_64-minimal.iso',
9
- :iso_src => 'http://yum.singlehop.com/CentOS/6.5/isos/x86_64/CentOS-6.5-x86_64-minimal.iso',
10
- :iso_sha256 => 'f9d84907d77df62017944cb23cab66305e94ee6ae6c1126415b81cc5e999bdd0',
11
- :iso_download_timeout => '1000',
12
- :boot_wait => '10',
13
- :boot_cmd_sequence => [
14
- '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>',
15
- ],
16
- :kickstart_port => '7122',
17
- :kickstart_timeout => '300',
18
- :kickstart_file => 'ks.cfg',
19
- :ssh_login_timeout => '10000',
20
- :ssh_user => 'veewee',
21
- :ssh_password => 'veewee',
22
- :ssh_key => '',
23
- :ssh_host_port => '7222',
24
- :ssh_guest_port => '22',
25
- :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
26
- :shutdown_cmd => '/sbin/halt -h -p',
27
- :postinstall_files => %w[../centos-postinstall.sh],
28
- :postinstall_timeout => '10000',
29
- :skip_iso_transfer => true,
30
- })
@@ -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
-
@@ -1,30 +0,0 @@
1
- Veewee::Session.declare({
2
- :cpu_count => '1',
3
- :memory_size => '512',
4
- :disk_size => '8192',
5
- :disk_format => 'VDI',
6
- :hostiocache => 'off',
7
- :os_type_id => 'RedHat',
8
- :iso_file => 'CentOS-6.5-i386-minimal.iso',
9
- :iso_src => 'http://yum.singlehop.com/CentOS/6.5/isos/i386/CentOS-6.5-i386-minimal.iso',
10
- :iso_sha256 => '3e8fb326bf389c631dcea9c16da6ebcd2c6f150d526e147c1307beb9314eb794',
11
- :iso_download_timeout => '1000',
12
- :boot_wait => '10',
13
- :boot_cmd_sequence => [
14
- '<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>',
15
- ],
16
- :kickstart_port => '7122',
17
- :kickstart_timeout => '300',
18
- :kickstart_file => 'ks.cfg',
19
- :ssh_login_timeout => '10000',
20
- :ssh_user => 'veewee',
21
- :ssh_password => 'veewee',
22
- :ssh_key => '',
23
- :ssh_host_port => '7222',
24
- :ssh_guest_port => '22',
25
- :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
26
- :shutdown_cmd => '/sbin/halt -h -p',
27
- :postinstall_files => %w[../centos-postinstall.sh],
28
- :postinstall_timeout => '10000',
29
- :skip_iso_transfer => true,
30
- })
@@ -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
-
@@ -1,33 +0,0 @@
1
- set -ex
2
-
3
- sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
4
-
5
- yum -y install wget
6
-
7
- # Make ssh faster by not waiting on DNS
8
- echo "UseDNS no" >> /etc/ssh/sshd_config
9
-
10
- # Vagrant specific
11
- date > /etc/vagrant_box_build_time
12
-
13
- # Add vagrant user
14
- /usr/sbin/groupadd vagrant
15
- /usr/sbin/useradd vagrant -g vagrant -G wheel
16
- echo "vagrant"|passwd --stdin vagrant
17
- echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
18
- chmod 0440 /etc/sudoers.d/vagrant
19
-
20
- # Installing vagrant keys
21
- mkdir -pm 700 /home/vagrant/.ssh
22
- wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /home/vagrant/.ssh/authorized_keys
23
- chmod 0600 /home/vagrant/.ssh/authorized_keys
24
- chown -R vagrant /home/vagrant/.ssh
25
-
26
- yum -y clean all
27
-
28
- # Remove traces of mac address from network configuration
29
- sed -i /HWADDR/d /etc/sysconfig/network-scripts/ifcfg-eth0
30
- rm /etc/udev/rules.d/70-persistent-net.rules
31
-
32
- # Zero out the free space to save space in the final image
33
- dd if=/dev/zero of=/filler bs=1M || rm /filler