csd 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/ai +1 -1
- data/csd.gemspec +4 -2
- data/lib/csd/application/decklink/base.rb +37 -5
- data/lib/csd/application/decklink/options/install.rb +13 -0
- data/lib/csd/application/default/base.rb +10 -2
- data/lib/csd/application/minisip/base.rb +1 -1
- data/lib/csd/application/minisip/component/core.rb +30 -16
- data/lib/csd/application/minisip/component/ffmpeg.rb +0 -1
- data/lib/csd/application/minisip/component/gnome.rb +7 -1
- data/lib/csd/application/minisip/component/plugins.rb +1 -1
- data/lib/csd/application/minisip/options/common.rb +3 -3
- data/lib/csd/application/minisip/options/compile.rb +7 -2
- data/lib/csd/application/minisip/phonebook_example.rb +108 -0
- data/lib/csd/application/minisip/unix/linux/debian.rb +1 -1
- data/lib/csd/application/minisip/unix.rb +25 -6
- data/lib/csd/commands.rb +18 -2
- data/test/application/test_minisip.rb +15 -0
- metadata +6 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.11
|
data/bin/ai
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# NOTE: If you would like to execute this file as a developer
|
4
4
|
# but not install the CSD gem, you can use this command:
|
5
|
-
# ruby -I path/to/csd/lib path/to/csd/bin/
|
5
|
+
# ruby -I path/to/csd/lib path/to/csd/bin/ai
|
6
6
|
|
7
7
|
# First, let's load the RubyGems framework and the CSD gem.
|
8
8
|
# Even though RubyGems is already loaded for Ruby >= 1.9,
|
data/csd.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{csd}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.11"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Technology Transfer Alliance Team"]
|
12
|
-
s.date = %q{2010-08-
|
12
|
+
s.date = %q{2010-08-04}
|
13
13
|
s.default_executable = %q{ai}
|
14
14
|
s.description = %q{CSD stands for Communication Systems Design and is a project of the Telecommunication Systems Laboratory (TSLab) of the Royal Institute of Technology in Stockholm, Sweden. Within CSD many software tools are used to build up various networks and services. This gem is supposed to automate processes to handle the compilation and installation of these software tools. Technology Transfer Alliance (TTA) is the project team, which maintains this code.}
|
15
15
|
s.email = %q{mtoday11@gmail.com}
|
@@ -31,6 +31,7 @@ Gem::Specification.new do |s|
|
|
31
31
|
"lib/csd/application/decklink.rb",
|
32
32
|
"lib/csd/application/decklink/about.yml",
|
33
33
|
"lib/csd/application/decklink/base.rb",
|
34
|
+
"lib/csd/application/decklink/options/install.rb",
|
34
35
|
"lib/csd/application/default.rb",
|
35
36
|
"lib/csd/application/default/base.rb",
|
36
37
|
"lib/csd/application/minisip.rb",
|
@@ -47,6 +48,7 @@ Gem::Specification.new do |s|
|
|
47
48
|
"lib/csd/application/minisip/options/common.rb",
|
48
49
|
"lib/csd/application/minisip/options/compile.rb",
|
49
50
|
"lib/csd/application/minisip/options/package.rb",
|
51
|
+
"lib/csd/application/minisip/phonebook_example.rb",
|
50
52
|
"lib/csd/application/minisip/unix.rb",
|
51
53
|
"lib/csd/application/minisip/unix/darwin.rb",
|
52
54
|
"lib/csd/application/minisip/unix/linux.rb",
|
@@ -5,13 +5,43 @@ module CSD
|
|
5
5
|
module Application
|
6
6
|
module Decklink
|
7
7
|
class Base < CSD::Application::Base
|
8
|
-
|
8
|
+
|
9
|
+
# A list of apt-get packages that are required to install the decklink drivers.
|
10
|
+
#
|
11
|
+
DEBIAN_DEPENDENCIES = %w{ libnotify-bin libmng1 dkms }
|
12
|
+
|
9
13
|
def install
|
14
|
+
UI.separator
|
15
|
+
UI.info "This operation will download and install the DeckLink device drivers.".green.bold
|
16
|
+
UI.separator
|
17
|
+
introduction
|
18
|
+
install!
|
19
|
+
end
|
20
|
+
|
21
|
+
def install!
|
10
22
|
create_working_directory
|
11
23
|
define_relative_paths
|
12
24
|
download
|
13
25
|
extract
|
14
26
|
apply
|
27
|
+
send_notification
|
28
|
+
end
|
29
|
+
|
30
|
+
def introduction
|
31
|
+
UI.info " Working directory: ".green.bold + Path.work.to_s.yellow
|
32
|
+
if Options.debug
|
33
|
+
UI.info " Your Platform: ".green + Gem::Platform.local.humanize.to_s.yellow
|
34
|
+
UI.info(" Application module: ".green + self.class.name.to_s.yellow)
|
35
|
+
end
|
36
|
+
UI.separator
|
37
|
+
if Options.help
|
38
|
+
UI.info Options.helptext
|
39
|
+
# Cleanup in case the working directory was temporary and is empty
|
40
|
+
Path.work.rmdir if Options.temp and Path.work.directory? and Path.work.children.empty?
|
41
|
+
raise CSD::Error::Argument::HelpWasRequested
|
42
|
+
else
|
43
|
+
raise Interrupt unless Options.yes or Options.reveal or UI.continue?
|
44
|
+
end
|
15
45
|
end
|
16
46
|
|
17
47
|
def download
|
@@ -41,8 +71,12 @@ module CSD
|
|
41
71
|
file = Dir[File.join(Path.packages, "Deck*#{archflag}*.deb")]
|
42
72
|
UI.debug "#{self.class} identified these applicable packages: #{file.join(', ')}"
|
43
73
|
UI.info "Installing Debian packages".green.bold
|
44
|
-
Cmd.run "sudo apt-get install
|
45
|
-
Cmd.run "sudo dpkg -i #{file.first}", :announce_pwd => false
|
74
|
+
Cmd.run "sudo apt-get install #{DEBIAN_DEPENDENCIES} --yes", :announce_pwd => false
|
75
|
+
Cmd.run "sudo dpkg -i #{file.first || '[DRIVER FILE FOR THIS ARCHITECTURE]'}", :announce_pwd => false
|
76
|
+
end
|
77
|
+
|
78
|
+
def send_notification
|
79
|
+
Cmd.run %{notify-send --icon=gdm-setup "DeckLink installation complete" "You are now ready to use your Blackmagic Design DeckLink device." }, :internal => true, :die_on_failure => false
|
46
80
|
end
|
47
81
|
|
48
82
|
def define_relative_paths
|
@@ -54,8 +88,6 @@ module CSD
|
|
54
88
|
Path.packages = Pathname.new(File.join(Path.work, decklink_basename))
|
55
89
|
end
|
56
90
|
|
57
|
-
|
58
|
-
|
59
91
|
end
|
60
92
|
end
|
61
93
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# -*- encoding: UTF-8 -*-
|
2
|
+
|
3
|
+
opts.headline 'WORKING DIRECTORY OPTIONS'.green.bold
|
4
|
+
|
5
|
+
self.temp = true
|
6
|
+
opts.on("--no-temp", "Use a subdirectory in the current directory as working directory and not /tmp.") do |value|
|
7
|
+
self.temp = value
|
8
|
+
end
|
9
|
+
|
10
|
+
self.work_dir = nil
|
11
|
+
opts.on("--work-dir [PATH]", "Defines and/or creates the working directory. This will override the --no-temp option.") do |value|
|
12
|
+
self.work_dir = value
|
13
|
+
end
|
@@ -24,10 +24,10 @@ module CSD
|
|
24
24
|
if Options.work_dir
|
25
25
|
# The user specified the working directory manually
|
26
26
|
path = Options.work_dir
|
27
|
-
elsif Options.temp
|
27
|
+
elsif Options.temp and !Options.this_user
|
28
28
|
# The user specified the working directory to be a system's temporary directory
|
29
29
|
# Note that only with this option, the directory is actually created at this point
|
30
|
-
path = Dir.mktmpdir
|
30
|
+
path = Dir.mktmpdir
|
31
31
|
else
|
32
32
|
# Other than that, we create a subdirectory in the current directory and use that
|
33
33
|
app_name = Applications.current ? Applications.current.name : 'application'
|
@@ -43,6 +43,14 @@ module CSD
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
+
def cleanup_working_directory
|
47
|
+
if !Options.work_dir and Options.temp and !Options.this_user and Path.work.directory?
|
48
|
+
UI.info "Removing working directory".green.bold
|
49
|
+
UI.debug "MILESTONE: deleting-work-dir"
|
50
|
+
Cmd.run "rm -Rf #{Path.work}", :announce_pwd => false
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
46
54
|
end
|
47
55
|
end
|
48
56
|
end
|
@@ -31,7 +31,6 @@ module CSD
|
|
31
31
|
# This methods prints general information about this application module.
|
32
32
|
#
|
33
33
|
def introduction
|
34
|
-
UI.separator
|
35
34
|
UI.info " Working directory: ".green.bold + Path.work.to_s.yellow
|
36
35
|
if Options.debug
|
37
36
|
UI.info " Your Platform: ".green + Gem::Platform.local.humanize.to_s.yellow
|
@@ -95,6 +94,7 @@ module CSD
|
|
95
94
|
Path.minisip_gnome_png = Pathname.new(File.join(Path.repository, 'minisip', 'share', 'icon_gnome.png'))
|
96
95
|
Path.minisip_gnome_pixmap = Pathname.new(File.join('/', 'usr', 'share', 'pixmaps', 'minisip_gnome.png'))
|
97
96
|
Path.minisip_desktop_entry = Pathname.new(File.join('/', 'usr', 'share', 'applications', 'minisip.desktop'))
|
97
|
+
Path.phonebook = Pathname.new(File.join(ENV['HOME'], '.minisip.addr'))
|
98
98
|
end
|
99
99
|
|
100
100
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# -*- encoding: UTF-8 -*-
|
2
|
+
require 'csd/application/minisip/phonebook_example'
|
2
3
|
|
3
4
|
module CSD
|
4
5
|
module Application
|
@@ -23,17 +24,7 @@ module CSD
|
|
23
24
|
#
|
24
25
|
def compile
|
25
26
|
UI.debug "#{self}.compile was called"
|
26
|
-
|
27
|
-
if ffmpeg_available and Options.configure and !Options.reveal and libraries.include?('libminisip')
|
28
|
-
if Gem::Platform.local.debian?
|
29
|
-
# Note that FFmpeg must have been installed via apt-get or via the AI in order for this to work!
|
30
|
-
UI.info "Removing FFmpeg before re-compiling MiniSIP".green.bold
|
31
|
-
Cmd.run "sudo apt-get remove ffmpeg --yes", :announce_pwd => false
|
32
|
-
else
|
33
|
-
# On other linux distributions we don't know how to remove ffmpeg
|
34
|
-
raise Error::Minisip::Core::FFmpegInstalled, "Please remove ffmpeg from your system first, or run the #{CSD.executable} with --no-configure"
|
35
|
-
end
|
36
|
-
end
|
27
|
+
remove_ffmpeg
|
37
28
|
if Path.repository.directory? and !Options.reveal
|
38
29
|
UI.warn "The MiniSIP source code will not be downloaded, because the directory #{Path.repository.enquote} already exists."
|
39
30
|
else
|
@@ -41,9 +32,24 @@ module CSD
|
|
41
32
|
modify_source_code
|
42
33
|
end
|
43
34
|
modify_dirlist
|
44
|
-
# We would like to re-compile MiniSIP no matter what options were given as command-line arguments.
|
45
|
-
compile_libraries
|
35
|
+
compile_libraries # We would like to re-compile MiniSIP no matter what options were given as command-line arguments.
|
46
36
|
link_libraries
|
37
|
+
create_address_book
|
38
|
+
end
|
39
|
+
|
40
|
+
def remove_ffmpeg
|
41
|
+
ffmpeg_available = Cmd.run('ffmpeg -h', :internal => true, :die_on_failure => false).success?
|
42
|
+
return if Options.ffmpeg_first or !Options.configure or !Options.reveal or !libraries.include?('libminisip') or !ffmpeg_available
|
43
|
+
if Gem::Platform.local.debian?
|
44
|
+
# Note that FFmpeg must have been installed via apt-get or via the AI in order for this to work,
|
45
|
+
# because manual compilations of FFmpeg cannot be removed automatically
|
46
|
+
UI.info "Removing FFmpeg before re-compiling MiniSIP".green.bold
|
47
|
+
UI.info "You can skip this step by giving the option --force-ffmpeg".yellow
|
48
|
+
Cmd.run "sudo apt-get remove ffmpeg --yes", :announce_pwd => false
|
49
|
+
else
|
50
|
+
# On other linux distributions we don't know how to remove ffmpeg
|
51
|
+
raise Error::Minisip::Core::FFmpegInstalled, "Please remove ffmpeg from your system first, or run the #{CSD.executable} with --no-configure"
|
52
|
+
end
|
47
53
|
end
|
48
54
|
|
49
55
|
# This method provides upfront information to the user about how the MiniSIP Core component will be processed.
|
@@ -93,6 +99,7 @@ module CSD
|
|
93
99
|
UI.info "Fixing MiniSIP OpenGL GUI source code".green.bold
|
94
100
|
Cmd.replace(Path.repository_open_gl_display, '/home/erik', Path.build)
|
95
101
|
if Options.ffmpeg_first
|
102
|
+
UI.info "Fixing MiniSIP Audio/Video en/decoder source code".green.bold
|
96
103
|
Cmd.replace(Path.repository_avcoder_cxx, 'PIX_FMT_RGBA32', 'PIX_FMT_RGB32')
|
97
104
|
Cmd.replace(Path.repository_avdecoder_cxx, 'PIX_FMT_RGBA32', 'PIX_FMT_RGB32')
|
98
105
|
end
|
@@ -112,7 +119,7 @@ module CSD
|
|
112
119
|
end
|
113
120
|
|
114
121
|
def link_libraries
|
115
|
-
UI.info "Linking shared MiniSIP libraries"
|
122
|
+
UI.info "Linking shared MiniSIP libraries".green.bold
|
116
123
|
Cmd.run "sudo ldconfig #{Path.build_lib_libminisip_so}", :announce_pwd => false
|
117
124
|
end
|
118
125
|
|
@@ -215,9 +222,9 @@ module CSD
|
|
215
222
|
def run_gtkgui
|
216
223
|
UI.info "Executing MiniSIP".green.bold
|
217
224
|
if Options.this_user
|
218
|
-
Cmd.run
|
225
|
+
Cmd.run Path.build_gtkgui, :die_on_failure => false, :announce_pwd => false
|
219
226
|
else
|
220
|
-
Cmd.run
|
227
|
+
Cmd.run 'minisip_gtkgui', :die_on_failure => false, :announce_pwd => false
|
221
228
|
end
|
222
229
|
end
|
223
230
|
|
@@ -230,6 +237,13 @@ module CSD
|
|
230
237
|
end
|
231
238
|
end
|
232
239
|
|
240
|
+
def create_address_book
|
241
|
+
return if Path.phonebook.file?
|
242
|
+
UI.info "Creating default MiniSIP phonebook".green.bold
|
243
|
+
Cmd.touch_and_replace_content Path.phonebook, ::CSD::Application::Minisip::PHONEBOOK_EXAMPLE, :internal => true
|
244
|
+
UI.info " Phonebook successfully saved in #{Path.phonebook}".yellow
|
245
|
+
end
|
246
|
+
|
233
247
|
# Iteratively makes debian packages of the internal MiniSIP libraries.
|
234
248
|
# TODO: Refactor this, it looks terribly sensitive.
|
235
249
|
# TODO: Check for GPL and LGLP license conflicts.
|
@@ -50,7 +50,6 @@ module CSD
|
|
50
50
|
# is compiled _before_ MiniSIP.
|
51
51
|
#
|
52
52
|
def modify_libavutil
|
53
|
-
return
|
54
53
|
if Path.ffmpeg_libavutil_common_backup.file? and !Options.reveal
|
55
54
|
UI.warn "The libavutil common.h file seems to be fixed already, I won't touch it now. Delete #{Path.ffmpeg_libavutil_common_backup.enquote} to enforce it."
|
56
55
|
else
|
@@ -30,15 +30,21 @@ Categories=Application;Internet;Network;Chat;AudioVideo}
|
|
30
30
|
else
|
31
31
|
create_desktop_entry
|
32
32
|
end
|
33
|
+
send_notification
|
33
34
|
end
|
34
35
|
|
35
36
|
def create_desktop_entry
|
37
|
+
return if Path.minisip_gnome_pixmap.file? and Path.minisip_desktop_entry.file?
|
36
38
|
UI.info "Installing Gnome menu item".green.bold
|
37
|
-
Cmd.run("sudo cp #{Path.minisip_gnome_png} #{Path.minisip_gnome_pixmap}", :announce_pwd => false)
|
39
|
+
Cmd.run("sudo cp #{Path.minisip_gnome_png} #{Path.minisip_gnome_pixmap}", :announce_pwd => false)
|
38
40
|
Path.new_desktop_entry = Pathname.new File.join(Dir.mktmpdir, 'minisip.desktop')
|
39
41
|
Cmd.touch_and_replace_content Path.new_desktop_entry, DESKTOP_ENTRY, :internal => true
|
40
42
|
Cmd.run "sudo mv #{Path.new_desktop_entry} #{Path.minisip_desktop_entry}", :announce_pwd => false
|
41
43
|
end
|
44
|
+
|
45
|
+
def send_notification
|
46
|
+
Cmd.run %{notify-send --icon=minisip_gnome "MiniSIP installation complete" "Please have a look in your Applications menu -> Internet." }, :internal => true, :die_on_failure => false
|
47
|
+
end
|
42
48
|
|
43
49
|
end
|
44
50
|
end
|
@@ -3,11 +3,11 @@
|
|
3
3
|
opts.headline 'WORKING DIRECTORY OPTIONS'.green.bold
|
4
4
|
|
5
5
|
self.temp = true
|
6
|
-
opts.on("--no-temp", "Use the current directory as working directory and not
|
7
|
-
self.temp =
|
6
|
+
opts.on("--no-temp", "Use a subdirectory in the current directory as working directory and not /tmp.") do |value|
|
7
|
+
self.temp = value
|
8
8
|
end
|
9
9
|
|
10
10
|
self.work_dir = nil
|
11
|
-
opts.on("--work-dir [PATH]", "Defines and/or creates the working directory. This will override the --
|
11
|
+
opts.on("--work-dir [PATH]", "Defines and/or creates the working directory. This will override the --no-temp option.") do |value|
|
12
12
|
self.work_dir = value
|
13
13
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# This file gets eval'ed by the global options parser in lib/csd/options_parser
|
3
3
|
|
4
4
|
self.this_user = false
|
5
|
-
opts.on("--this-user","Compile MiniSIP
|
5
|
+
opts.on("--this-user","Compile MiniSIP only for the current user (enforces the --no-temp option)") do |value|
|
6
6
|
self.this_user = value
|
7
7
|
end
|
8
8
|
|
@@ -12,10 +12,15 @@ opts.on("--no-apt-get","Don't run any apt-get commands") do |value|
|
|
12
12
|
end
|
13
13
|
|
14
14
|
self.ffmpeg_first = false
|
15
|
-
opts.on("--ffmpeg
|
15
|
+
opts.on("--force-ffmpeg","Do not remove FFmpeg before compiling MiniSIP and compile FFmpeg before MiniSIP") do |value|
|
16
16
|
self.ffmpeg_first = value
|
17
17
|
end
|
18
18
|
|
19
|
+
self.github_tar = false
|
20
|
+
opts.on("--github-tar","Instead of fetching git repositories from Github, use tarball downloads") do |value|
|
21
|
+
self.github_tar = value
|
22
|
+
end
|
23
|
+
|
19
24
|
self.branch = nil
|
20
25
|
opts.on('--branch BRANCH', 'Choose another branch than `master´ when downloading the source code') do |lib|
|
21
26
|
self.branch = value
|
@@ -0,0 +1,108 @@
|
|
1
|
+
# -*- encoding: UTF-8 -*-
|
2
|
+
|
3
|
+
module CSD
|
4
|
+
module Application
|
5
|
+
module Minisip
|
6
|
+
|
7
|
+
PHONEBOOK_EXAMPLE = %{
|
8
|
+
<phonebook>
|
9
|
+
<name>
|
10
|
+
TTA
|
11
|
+
</name>
|
12
|
+
<contact>
|
13
|
+
<name>
|
14
|
+
TTA HDVC
|
15
|
+
</name>
|
16
|
+
<pop>
|
17
|
+
<desc>
|
18
|
+
Client 1
|
19
|
+
</desc>
|
20
|
+
<uri>
|
21
|
+
sip:client1@carenet-se.se
|
22
|
+
</uri>
|
23
|
+
</pop>
|
24
|
+
<pop>
|
25
|
+
<desc>
|
26
|
+
Client2
|
27
|
+
</desc>
|
28
|
+
<uri>
|
29
|
+
sip:client2@carenet-se.se
|
30
|
+
</uri>
|
31
|
+
</pop>
|
32
|
+
<pop>
|
33
|
+
<desc>
|
34
|
+
Client3
|
35
|
+
</desc>
|
36
|
+
<uri>
|
37
|
+
sip:client3@carenet-se.se
|
38
|
+
</uri>
|
39
|
+
</pop>
|
40
|
+
<pop>
|
41
|
+
<desc>
|
42
|
+
Client4
|
43
|
+
</desc>
|
44
|
+
<uri>
|
45
|
+
ip:client4@carenet-se.se
|
46
|
+
</uri>
|
47
|
+
</pop>
|
48
|
+
<pop>
|
49
|
+
<desc>
|
50
|
+
Client5
|
51
|
+
</desc>
|
52
|
+
<uri>
|
53
|
+
ip:client5@carenet-se.se
|
54
|
+
</uri>
|
55
|
+
</pop>
|
56
|
+
<pop>
|
57
|
+
<desc>
|
58
|
+
Clien6
|
59
|
+
</desc>
|
60
|
+
<uri>
|
61
|
+
ip:client6@carenet-se.se
|
62
|
+
</uri>
|
63
|
+
</pop>
|
64
|
+
</contact>
|
65
|
+
<contact>
|
66
|
+
<name>
|
67
|
+
Carenet-SE
|
68
|
+
</name>
|
69
|
+
<pop>
|
70
|
+
<desc>
|
71
|
+
Reflector
|
72
|
+
</desc>
|
73
|
+
<uri>
|
74
|
+
sip:mcu@carenet-se.se
|
75
|
+
</uri>
|
76
|
+
</pop>
|
77
|
+
</contact>
|
78
|
+
<contact>
|
79
|
+
<name>
|
80
|
+
Tandberg
|
81
|
+
</name>
|
82
|
+
<pop>
|
83
|
+
<desc>
|
84
|
+
Tandberg Client1
|
85
|
+
</desc>
|
86
|
+
<uri>
|
87
|
+
sip:tandberg1@carenet-se.se
|
88
|
+
</uri>
|
89
|
+
</pop>
|
90
|
+
</contact>
|
91
|
+
<contact>
|
92
|
+
<name>
|
93
|
+
Tandberg
|
94
|
+
</name>
|
95
|
+
<pop>
|
96
|
+
<desc>
|
97
|
+
Tandberg Client2
|
98
|
+
</desc>
|
99
|
+
<uri>
|
100
|
+
sip:tandberg2@carenet-se.se
|
101
|
+
</uri>
|
102
|
+
</pop>
|
103
|
+
</contact>
|
104
|
+
</phonebook>}
|
105
|
+
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
@@ -8,7 +8,7 @@ module CSD
|
|
8
8
|
|
9
9
|
# A list of apt-get packages that are required to compile minisip including hdviper and ffmpeg
|
10
10
|
#
|
11
|
-
DEBIAN_DEPENDENCIES = %w{ automake build-essential checkinstall git-core libasound2-dev libavcodec-dev libglademm-2.4-dev libgtkmm-2.4-dev libltdl3-dev libsdl-dev libsdl-ttf2.0-dev libssl-dev libtool libswscale-dev libx11-dev libxv-dev nasm subversion yasm }
|
11
|
+
DEBIAN_DEPENDENCIES = %w{ automake build-essential checkinstall git-core libnotify-bin libasound2-dev libavcodec-dev libglademm-2.4-dev libgtkmm-2.4-dev libltdl3-dev libsdl-dev libsdl-ttf2.0-dev libssl-dev libtool libswscale-dev libx11-dev libxv-dev nasm subversion yasm }
|
12
12
|
|
13
13
|
def compile!
|
14
14
|
aptitude if Options.apt_get
|
@@ -9,11 +9,14 @@ module CSD
|
|
9
9
|
# This method presents a general overview about the task that is to be performed.
|
10
10
|
#
|
11
11
|
def introduction
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
if Options.developer
|
13
|
+
Core.introduction
|
14
|
+
# FFmpeg.introduction
|
15
|
+
# HDVIPER.introduction
|
16
|
+
# X264.introduction
|
17
|
+
# Plugins.introduction
|
18
|
+
UI.separator
|
19
|
+
end
|
17
20
|
super
|
18
21
|
end
|
19
22
|
|
@@ -23,6 +26,8 @@ module CSD
|
|
23
26
|
UI.separator
|
24
27
|
UI.info "This operation will compile MiniSIP and its dependencies.".green.bold
|
25
28
|
UI.separator
|
29
|
+
install_mode = Options.this_user ? 'Only for this user (inside the working directory)' : 'For all users (sudo)'
|
30
|
+
UI.info " Installation mode: ".green.bold + install_mode.yellow
|
26
31
|
introduction
|
27
32
|
compile!
|
28
33
|
end
|
@@ -52,7 +57,21 @@ module CSD
|
|
52
57
|
end
|
53
58
|
Plugins.compile
|
54
59
|
Gnome.compile
|
55
|
-
|
60
|
+
congratulations
|
61
|
+
end
|
62
|
+
|
63
|
+
def congratulations
|
64
|
+
if Options.this_user
|
65
|
+
Core.run_gtkgui
|
66
|
+
else
|
67
|
+
cleanup_working_directory
|
68
|
+
UI.separator
|
69
|
+
UI.info "MiniSIP installation complete.".green.bold
|
70
|
+
UI.info "Please have a look in your Applications menu -> Internet."
|
71
|
+
UI.separator
|
72
|
+
# Core.run_gtkgui # At this point we could run MiniSIP instead of ending the AI -- if we wanted to.
|
73
|
+
end
|
74
|
+
|
56
75
|
end
|
57
76
|
|
58
77
|
end
|
data/lib/csd/commands.rb
CHANGED
@@ -295,8 +295,24 @@ module CSD
|
|
295
295
|
return result
|
296
296
|
end
|
297
297
|
UI.info "Downloading #{name} to #{destination.enquote}".green.bold
|
298
|
-
|
299
|
-
|
298
|
+
if Options.github_tar and repository =~ /github.com/
|
299
|
+
Cmd.mkdir destination
|
300
|
+
Cmd.cd destination
|
301
|
+
repository = repository.gsub('.git', '/tarball/master')
|
302
|
+
Cmd.run "wget #{repository}", :announce_pwd => false
|
303
|
+
if tar_file = Dir[File.join(destination, '*.tar*')].first or Options.reveal
|
304
|
+
Cmd.run "tar -xzf #{tar_file || '[NAME OF THE TARFILE]'}"
|
305
|
+
Cmd.run "rm #{tar_file || '[NAME OF THE TARFILE]'}"
|
306
|
+
end
|
307
|
+
if extracted_directory = Dir[File.join(destination, '*')].first or Options.reveal
|
308
|
+
content = Options.reveal ? File.join('[EXTRACTED DIRECTORY]', '*') : File.join(extracted_directory, '*')
|
309
|
+
Cmd.run "mv #{content} #{destination}", :announce_pwd => false
|
310
|
+
Cmd.run "rm -r #{extracted_directory || '[EXTRACTED DIRECTORY]'}"
|
311
|
+
end
|
312
|
+
else
|
313
|
+
# We will simply return the CommandResult of the run-method.
|
314
|
+
Cmd.run("git clone #{repository} #{destination}", :announce_pwd => false)
|
315
|
+
end
|
300
316
|
end
|
301
317
|
|
302
318
|
end
|
@@ -20,6 +20,21 @@ class TestMinisip < Test::Unit::TestCase
|
|
20
20
|
assert @app.respond_to?(:compile)
|
21
21
|
end
|
22
22
|
|
23
|
+
context "in the whole workflow" do
|
24
|
+
|
25
|
+
setup do
|
26
|
+
Options.clear
|
27
|
+
end
|
28
|
+
|
29
|
+
should "remove the working directory when in root installation mode and using tmp" do
|
30
|
+
Options.this_user = false
|
31
|
+
Options.temp = true
|
32
|
+
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end # context "in the whole workflow"
|
37
|
+
|
23
38
|
context "in the Core component" do
|
24
39
|
|
25
40
|
setup do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 11
|
10
|
+
version: 0.1.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Technology Transfer Alliance Team
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-04 00:00:00 +02:00
|
19
19
|
default_executable: ai
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -41,6 +41,7 @@ files:
|
|
41
41
|
- lib/csd/application/decklink.rb
|
42
42
|
- lib/csd/application/decklink/about.yml
|
43
43
|
- lib/csd/application/decklink/base.rb
|
44
|
+
- lib/csd/application/decklink/options/install.rb
|
44
45
|
- lib/csd/application/default.rb
|
45
46
|
- lib/csd/application/default/base.rb
|
46
47
|
- lib/csd/application/minisip.rb
|
@@ -57,6 +58,7 @@ files:
|
|
57
58
|
- lib/csd/application/minisip/options/common.rb
|
58
59
|
- lib/csd/application/minisip/options/compile.rb
|
59
60
|
- lib/csd/application/minisip/options/package.rb
|
61
|
+
- lib/csd/application/minisip/phonebook_example.rb
|
60
62
|
- lib/csd/application/minisip/unix.rb
|
61
63
|
- lib/csd/application/minisip/unix/darwin.rb
|
62
64
|
- lib/csd/application/minisip/unix/linux.rb
|