forked from yast/yast-fonts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
44 lines (37 loc) · 992 Bytes
/
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
require "yast/rake"
require "pathname"
Yast::Tasks.configuration do |conf|
#lets ignore license check for now
conf.skip_license_check << /.*/
end
task :compile do
olddir = Dir.pwd
["ft2_rendering", "fontconfig_setting", "font_specimen"].each do |ext|
Dir.chdir("src/ext/#{ext}")
ruby 'extconf.rb'
sh 'make'
Dir.chdir(olddir)
end
end
namespace :test do
task :prepare => :compile do
# let yast know where ft2_rendering extension is
mkdir_p "src/lib/yast"
["ft2_rendering", "fontconfig_setting", "font_specimen"].each do |ext|
ln_sf("../../ext/#{ext}/#{ext}.so", "src/lib/yast/#{ext}.so")
end
end
task :unit => :prepare do
rm_r("src/lib/yast") if FileTest.exists?("src/lib/yast")
end
end
task :run => "test:prepare" do
rm_r("src/lib/yast") if FileTest.exists?("src/lib/yast")
end
task :clean do
rm_f("src/ext/*/*.so")
rm_f("src/ext/*/*.o")
rm_f("src/ext/*/Makefile")
rm_f("src/ext/*/yast")
rm_rf("src/lib/yast")
end