+ Fixes
[opsoft.git] / silentbob / rmake
blob4b81f828697592390a2555b95255e741372c9e82
1 #!/usr/bin/ruby
3 # (c) Oleg Puchinin 2008
4 # graycardinalster2gmail.com
5 # Please download and install http://sf.net/projects/rubymake to run this script.
7 require "ruby_build.rb"
9 class Main < RubyBuild
11 def initialize(package_name)
12 super package_name
14 @threads = 3
15 @debug_env[:ldflags] = "-L./ -ldl"
16 @release_env[:ldflags] = "-L./ -ldl"
17 @debug_env[:include] = "-Iinclude -Igclib/include"
18 @release_env[:include] = "-Iinclude -Igclib/include"
19 build_sblib
21 @debug_env[:ldflags] = "-L./ -ldl -lsblib"
22 @release_env[:ldflags] = "-L./ -ldl -lsblib"
23 build_silentbob
24 build_plugins
25 end
27 def fetch
28 @url = "http://op.oaoontk.ru/silentbob.tar.bz2"
29 super
30 end
32 def build_sblib
33 files = Dir["sblib/*.cxx"] + Dir["gclib/src/*.cxx"]
34 build_shared("libsblib.so", files)
35 end
37 def build_silentbob
38 files = Dir["src/*.cxx"]
39 build_binary("silent_bob", files)
40 end
42 def build_plugins
43 l = %w(plugin_cache plugin_editor plugin_grep plugin_perl
44 plugin_perlpackages plugin_python plugin_ruby plugin_ruby_newclass)
45 l.each { |one|
46 files = ["plugins/#{one}.cxx"]
47 build_shared("lib#{one}.so", files)
49 end
51 def install
52 system ("./install.sh")
53 end
55 def uninstall
56 system ("./uninstall.sh")
57 end
59 end
61 m = Main.new "SilentBob"