forked from heroku/heroku-buildpack-hello
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathRakefile
53 lines (40 loc) · 1.64 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
require "fileutils"
require "tmpdir"
FONTCONFIG_PACKAGE_TGZ = ENV['FONTCONFIG_PACKAGE_TGZ']
desc "download Fontconfig"
task "fontconfig:download", :version do |t, args|
version = args[:version]
sh "curl http://www.freedesktop.org/software/fontconfig/release/fontconfig-#{version}.tar.gz -s -o - | tar vzxf -"
end
desc "install Fontconfig"
task "fontconfig:build", :version do |t, args|
version = args[:version]
name = "fontconfig"
prefix = "/app/vendor/#{name}"
build_command = [
"./configure --disable-static --disable-docs --prefix=#{prefix}",
"make",
"make install",
].join(" && ")
sh "vulcan build -v -o #{name}-#{version}.tgz --source #{name}-#{version} --prefix=#{prefix} --command=\"#{build_command}\""
puts "Vulcan is done with #{name}. Upload now #{name}-#{version}.tgz to Amazon S3."
puts "Set the environment variable FONTCONFIG_PACKAGE_TGZ to the online location of fontconfig."
end
desc "download Poppler"
task "poppler:download", :version do |t, args|
version = args[:version]
sh "curl http://poppler.freedesktop.org/poppler-#{version}.tar.gz -s -o - | tar vzxf -"
end
desc "install Poppler"
task "poppler:build", :version do |t, args|
version = args[:version]
name = "poppler"
prefix = "/app/vendor/#{name}"
build_command = [
"./configure --disable-static --enable-zlib --prefix=#{prefix}",
"make",
"make install",
].join(" && ")
sh "vulcan build -v -d #{ENV['FONTCONFIG_PACKAGE_TGZ']} -o #{name}-#{version}.tgz --source #{name}-#{version} --prefix=#{prefix} --command=\"#{build_command}\""
puts "Vulcan is done with #{name}. Upload now #{name}-#{version}.tgz to Amazon S3."
end