-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdef-install.rb
66 lines (54 loc) · 1.68 KB
/
def-install.rb
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
54
55
56
57
58
59
60
61
62
63
64
65
66
def install
resource("libpipeline").stage do
system "./configure",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{buildpath}/libpipeline",
"--enable-static",
"--disable-shared"
system "make"
system "make", "install"
end
ENV["libpipeline_CFLAGS"] = "-I#{buildpath}/libpipeline/include"
ENV["libpipeline_LIBS"] = "-L#{buildpath}/libpipeline/lib -lpipeline"
args = %W[
#{prefix}
--disable-dependency-tracking
--disable-silent-rules
--prefix=#{prefix}
--disable-cache-owner
--disable-setuid
--program-prefix=g
]
args += ["--fetch", "protobuf"]
lll = ["fff"]
foo = "bar"
if args.empty? && args.nil?
args = "lol"
end
system "./configure", *args
system "make", "CFLAGS=#{ENV.cflags}"
system "make", "install"
# Symlink commands without 'g' prefix into libexec/bin and
# man pages into libexec/man
%w[apropos catman lexgrog man mandb manpath whatis].each do |cmd, foo|
(libexec/"bin").install_symlink bin/"g#{cmd}" => cmd
end
(libexec/"sbin").install_symlink sbin/"gaccessdb" => "accessdb"
%w[apropos lexgrog man manconv manpath whatis zsoelim].each do |cmd|
(libexec/"man"/"man1").install_symlink man1/"g#{cmd}.1" => "#{cmd}.1"
end
(libexec/"man"/"man5").install_symlink man5/"gmanpath.5" => "manpath.5"
%w[accessdb catman mandb].each do |cmd|
(libexec/"man"/"man8").install_symlink man8/"g#{cmd}.8" => "#{cmd}.8"
end
# Symlink non-conflicting binaries and man pages
%w[catman lexgrog mandb].each do |cmd|
bin.install_symlink "g#{cmd}" => cmd
end
sbin.install_symlink "gaccessdb" => "accessdb"
%w[accessdb catman mandb].each do |cmd|
man8.install_symlink "g#{cmd}.8" => "#{cmd}.8"
end
man1.install_symlink "glexgrog.1" => "lexgrog.1"
end