+ rmake ruby script
[opsoft.git] / silentbob / rmake
blob6bc376145deabfbafc074d8d41298f334338d9d0
1 #!/usr/bin/ruby
3 #
4 # To change this template, choose Tools | Templates
5 # and open the template in the editor.
7 require "ruby_build.rb"
9 class Main < RubyBuild
11 def initialize(package_name)
12 super package_name
14 @debug_env[:ldflags] = "-L./ -ldl"
15 @release_env[:ldflags] = "-L./ -ldl"
16 @debug_env[:include] = "-Iinclude -Igclib/include"
17 @release_env[:include] = "-Iinclude -Igclib/include"
18 build_sblib
20 @debug_env[:ldflags] = "-L./ -ldl -lsblib"
21 @release_env[:ldflags] = "-L./ -ldl -lsblib"
22 build_silentbob
24 end
26 def fetch
27 @url = "http://op.oaoontk.ru/silentbob.tar.bz2"
28 super
29 end
31 def build_sblib
32 files = Dir["sblib/*.cxx"] + Dir["gclib/src/*.cxx"]
33 files << "gclib/src/gclib_c.c"
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 install
43 system ("./install.sh")
44 end
46 def uninstall
47 system ("./uninstall.sh")
48 end
50 end
52 m = Main.new "SilentBob"