csd 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/csd.gemspec +2 -2
- data/lib/csd/application/decklink/base.rb +20 -2
- data/lib/csd/application/i2conf/base.rb +3 -3
- data/lib/csd/application/minisip/base.rb +1 -0
- data/lib/csd/application/minisip/component/core.rb +65 -3
- data/lib/csd/application/minisip/component/core_packaging.rb +29 -2
- data/lib/csd/application/minisip/component/ffmpeg.rb +1 -1
- data/lib/csd/application/minisip/component/hdviper.rb +2 -2
- data/lib/csd/application/minisip/component/x264.rb +1 -1
- data/lib/csd/application/minisip/options/install.rb +12 -4
- data/lib/csd/application/minisip/options/install_defaults.rb +4 -2
- data/lib/csd/application/minisip/unix/linux/debian.rb +2 -2
- data/lib/csd/path_container.rb +8 -0
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
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.4.
|
8
|
+
s.version = "0.4.1"
|
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-09-
|
12
|
+
s.date = %q{2010-09-27}
|
13
13
|
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.}
|
14
14
|
s.email = %q{mtoday11@gmail.com}
|
15
15
|
s.executables = ["ai", "ttai"]
|
@@ -10,6 +10,7 @@ module CSD
|
|
10
10
|
#
|
11
11
|
DEBIAN_DEPENDENCIES = %w{ libnotify-bin libmng1 dkms }
|
12
12
|
|
13
|
+
# Command to block BlackMagic Design Decklink driver loaded together with system boot.
|
13
14
|
MODPROBE_BLACKLIST = %{# Minisip.org
|
14
15
|
# We know that BlackMagic Design Decklink conflicts
|
15
16
|
# with fglrx. We would like to load it manually later
|
@@ -89,7 +90,10 @@ blacklist blackmagic
|
|
89
90
|
end
|
90
91
|
end
|
91
92
|
|
92
|
-
# This method extracts the tar file of DeckLink driver.
|
93
|
+
# This method extracts the tar file of DeckLink driver. AI will first check whether the tar files have been
|
94
|
+
# extracted, if not, AI will create a working directory for the tar file and extract the tar file into the
|
95
|
+
# newly created directory.
|
96
|
+
#
|
93
97
|
def extract
|
94
98
|
if Path.packages.directory?
|
95
99
|
UI.warn "The tar file will not be extracted, because package repository already exist: #{Path.packages.enquote}"
|
@@ -101,6 +105,10 @@ blacklist blackmagic
|
|
101
105
|
end
|
102
106
|
end
|
103
107
|
|
108
|
+
# The method executes the Debian package of the selected DeckLink driver. It starts with detecting the architecture
|
109
|
+
# of current system, and then picks up the corresponding drivers. Before execute the selected Debian file, AI will
|
110
|
+
# also install all the Library dependencies of DeckLink driver.
|
111
|
+
#
|
104
112
|
def apply
|
105
113
|
Cmd.cd Path.packages, :internal => true
|
106
114
|
archflag = Gem::Platform.local.cpu =~ /64/ ? 'amd64' : 'i386'
|
@@ -111,6 +119,9 @@ blacklist blackmagic
|
|
111
119
|
Cmd.run "sudo dpkg -i #{file.first || '[DRIVER FILE FOR THIS ARCHITECTURE]'}", :announce_pwd => false
|
112
120
|
end
|
113
121
|
|
122
|
+
# The method add Blackmagic to the kernel module blacklist and load it on runtime after system boot.
|
123
|
+
# The reason of doing that is because BlackMagic Design Decklink conflicts with fglrx.
|
124
|
+
#
|
114
125
|
def add_boot_loader
|
115
126
|
UI.info "Adding Blackmagic to the kernel module blacklist".green.bold
|
116
127
|
Cmd.touch_and_replace_content Path.new_blacklist, MODPROBE_BLACKLIST
|
@@ -122,15 +133,22 @@ blacklist blackmagic
|
|
122
133
|
Cmd.run "sudo update-rc.d blackmagic defaults", :announce_pwd => false
|
123
134
|
end
|
124
135
|
|
136
|
+
# The method loads DeckLink driver after completion of the installation process.
|
137
|
+
#
|
125
138
|
def load_kernel_module
|
126
139
|
UI.info "Loading Decklink drivers".green.bold
|
127
140
|
Cmd.run "sudo modprobe blackmagic", :announce_pwd => false
|
128
141
|
end
|
129
|
-
|
142
|
+
|
143
|
+
# This method notifies users that decklinik installation process is completed successfully.
|
144
|
+
# This notification will be shown on the top right of the desktop in Ubuntu system.
|
145
|
+
#
|
130
146
|
def send_notification
|
131
147
|
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
|
132
148
|
end
|
133
149
|
|
150
|
+
# This method is to define relative path in decklink module. This will make the program clean and easy to read.
|
151
|
+
#
|
134
152
|
def define_relative_paths
|
135
153
|
blacklink_repository = 'http://www.blackmagic-design.com/downloads/software/'
|
136
154
|
decklink_basename = 'DeckLink_Linux_7.9'
|
@@ -99,7 +99,7 @@ Categories=Application;Internet;Network;Chat;AudioVideo}
|
|
99
99
|
return unless Options.apt_get
|
100
100
|
UI.info "Installing Debian dependencies for i2conf".green.bold
|
101
101
|
Cmd.run 'sudo apt-get update', :announce_pwd => false
|
102
|
-
Cmd.run "sudo apt-get install #{DEBIAN_DEPENDENCIES.sort.join(' ')} --yes --fix-missing", :announce_pwd => false
|
102
|
+
Cmd.run "sudo apt-get install #{DEBIAN_DEPENDENCIES.sort.join(' ')} --yes --fix-missing --force-yes", :announce_pwd => false
|
103
103
|
end
|
104
104
|
|
105
105
|
# The method checks out the Lib strManager source code from git repository.
|
@@ -139,7 +139,7 @@ Categories=Application;Internet;Network;Chat;AudioVideo}
|
|
139
139
|
Cmd.cd Path.str_manager, :internal => true
|
140
140
|
Cmd.run './configure'
|
141
141
|
Cmd.run 'aclocal'
|
142
|
-
Cmd.run
|
142
|
+
Cmd.run "make -j #{Options.threads}"
|
143
143
|
Cmd.run 'sudo make install'
|
144
144
|
Cmd.run "sudo ldconfig /usr/local/lib/libstrmanager.so", :announce_pwd => false
|
145
145
|
end
|
@@ -177,7 +177,7 @@ Categories=Application;Internet;Network;Chat;AudioVideo}
|
|
177
177
|
Cmd.run './bootstrap'
|
178
178
|
Cmd.run './configure'
|
179
179
|
Cmd.run 'aclocal'
|
180
|
-
Cmd.run
|
180
|
+
Cmd.run "make -j #{Options.threads}"
|
181
181
|
Cmd.run 'sudo make install'
|
182
182
|
end
|
183
183
|
|
@@ -127,6 +127,7 @@ module CSD
|
|
127
127
|
Path.repository_avdecoder_cxx = Pathname.new(File.join(Path.repository, 'libminisip', 'source', 'subsystem_media', 'video', 'codec', 'AVDecoder.cxx'))
|
128
128
|
Path.repository_sip_conf = Pathname.new(File.join(Path.repository, 'libminisip', 'source', 'subsystem_signaling', 'sip', 'SipSoftPhoneConfiguration.cxx'))
|
129
129
|
Path.repository_decklinksdk = Pathname.new(File.join(Path.repository_grabber, 'decklinksdk'))
|
130
|
+
Path.repository_main_window = Pathname.new(File.join(Path.repository, 'minisip', 'minisip', 'gui', 'gtkgui', 'MainWindow.cxx'))
|
130
131
|
Path.ffmpeg_repository = Pathname.new(File.join(Path.work, 'ffmpeg'))
|
131
132
|
Path.ffmpeg_libavutil = Pathname.new(File.join(Path.ffmpeg_repository, 'libavutil'))
|
132
133
|
Path.ffmpeg_libavutil_common = Pathname.new(File.join(Path.ffmpeg_libavutil, 'common.h'))
|
@@ -17,7 +17,7 @@ module CSD
|
|
17
17
|
# are sorted according to the sequence in which they need to be compiled (because they depend on each other).
|
18
18
|
#
|
19
19
|
LIBRARIES = %w{ libmutil libmnetutil libmcrypto libmikey libmsip libmstun libminisip minisip mloggingutil }
|
20
|
-
|
20
|
+
|
21
21
|
class << self
|
22
22
|
|
23
23
|
include Packaging
|
@@ -43,6 +43,15 @@ module CSD
|
|
43
43
|
update_decklink_firmware
|
44
44
|
end
|
45
45
|
|
46
|
+
# The method removes FFmpeg, if FFmpeg is already installed in the system before MiniSIP compilation.
|
47
|
+
# This is because MiniSIP use HDViper as its H.264 encoder, while HDviper use modified FFmpeg library within it.
|
48
|
+
# This may cause conflict with original FFmpeg library. The solution to that is to remove FFmpeg before MiniSIP
|
49
|
+
# compilation and install it again after completion of MiniSIP compilation process.
|
50
|
+
# However,if the user set the option "--force-ffmpeg", AI will skip the process, even though FFmpeg may have been
|
51
|
+
# installed in the system.
|
52
|
+
# Currently, FFmpeg must have been installed via apt-get or via the AI in order for this to work,
|
53
|
+
# because manual compilations of FFmpeg cannot be removed automatically.
|
54
|
+
#
|
46
55
|
def remove_ffmpeg
|
47
56
|
ffmpeg_available = Cmd.run('ffmpeg -h', :internal => true, :die_on_failure => false).success?
|
48
57
|
return if Options.ffmpeg_first or !libraries.include?('libminisip') or !ffmpeg_available
|
@@ -78,6 +87,12 @@ module CSD
|
|
78
87
|
def libraries
|
79
88
|
Options.only ? LIBRARIES.map { |lib| lib if Options.only.to_a.include?(lib) }.compact : LIBRARIES
|
80
89
|
end
|
90
|
+
|
91
|
+
# Determines which libraries of MiniSIP should be configured using --enable-debug
|
92
|
+
#
|
93
|
+
def debug_libraries
|
94
|
+
Options.enable_debug_on ? LIBRARIES.map { |lib| lib if Options.enable_debug_on.to_a.include?(lib) }.compact : LIBRARIES
|
95
|
+
end
|
81
96
|
|
82
97
|
# This method downloads the minisip source code in the right version. If the <tt>Options.branch</tt>
|
83
98
|
# parameter is set to a branchname of the source code repository, that branch will be downloaded. Currently
|
@@ -103,6 +118,10 @@ module CSD
|
|
103
118
|
Cmd.run 'git submodule update'
|
104
119
|
end
|
105
120
|
|
121
|
+
# The method downloads MiniSIP source code from official SVN repository. If the <tt>Options.vendor</tt>
|
122
|
+
# parameter is set, AI will not use the default git repository and use SVN to download the source code
|
123
|
+
# of MiniSIP.
|
124
|
+
#
|
106
125
|
def checkout_from_vendor
|
107
126
|
Cmd.cd Path.work, :internal => true
|
108
127
|
Cmd.run "svn checkout svn://svn.minisip.org/minisip/trunk minisip"
|
@@ -143,9 +162,14 @@ module CSD
|
|
143
162
|
Cmd.replace Path.repository_avcoder_cxx, 'PIX_FMT_RGBA32', 'PIX_FMT_RGB32'
|
144
163
|
Cmd.replace Path.repository_avdecoder_cxx, 'PIX_FMT_RGBA32', 'PIX_FMT_RGB32'
|
145
164
|
end
|
165
|
+
# Changing MiniSIP HELP Version text
|
166
|
+
repository_name = Options.vendor ? 'SVN repository' : "Github (#{Options.branch})"
|
167
|
+
Cmd.replace Path.repository_main_window, '(VERSION)', %{("#{repository_name} via AI #{CSD::Version.gsub("\n", '')}")}
|
146
168
|
modify_libminisip_rules
|
147
169
|
end
|
148
170
|
|
171
|
+
# The method fixes libminisip Debian rules file.
|
172
|
+
#
|
149
173
|
def modify_libminisip_rules
|
150
174
|
if Path.repository_libminisip_rules_backup.file?
|
151
175
|
UI.warn "The libminisip rules seem to be fixed already, I won't touch them now. Delete #{Path.repository_libminisip_rules_backup.enquote} to enforce it."
|
@@ -168,12 +192,20 @@ module CSD
|
|
168
192
|
end
|
169
193
|
end
|
170
194
|
|
195
|
+
# The method links shared MiniSIP libraries by +ldconfig+ command. +ldconfig+ determines run-time
|
196
|
+
# linkbindings between ld.so and shared libraries. It scans a running system and sets up the
|
197
|
+
# symbolic links that are used to load shared libraries properly.
|
198
|
+
#
|
171
199
|
def link_libraries
|
172
200
|
return if Options.this_user
|
173
201
|
UI.info "Linking shared MiniSIP libraries".green.bold
|
174
202
|
Cmd.run "sudo ldconfig #{Path.build_lib_libminisip_so}", :announce_pwd => false
|
175
203
|
end
|
176
204
|
|
205
|
+
# The method holds the CPPFLAGS value, where MiniSIP +make+ process is needed. CPPFLAGS is for compiler to find
|
206
|
+
# the libraries and their header files. When force_ffmpeg option is set, the value of CPPFLAGS will also includes
|
207
|
+
# the path to related FFmpeg libraries.
|
208
|
+
#
|
177
209
|
def libminisip_cpp_flags
|
178
210
|
if Options.ffmpeg_first
|
179
211
|
%{CPPFLAGS="-I#{Path.hdviper_x264} -I#{Path.hdviper_x264_test_x264api} -I#{Path.ffmpeg_libavutil} -I#{Path.ffmpeg_libavcodec} -I#{Path.ffmpeg_libswscale} -I#{Path.repository_grabber} -I#{Path.repository_decklinksdk}"}
|
@@ -182,6 +214,9 @@ module CSD
|
|
182
214
|
end
|
183
215
|
end
|
184
216
|
|
217
|
+
# The method holds the LDFLAGS value, where MiniSIP +make+ process is needed. CPPFLAGS is for linker to find
|
218
|
+
# the libraries and their header files.
|
219
|
+
#
|
185
220
|
def libminisip_ld_flags
|
186
221
|
%{LDFLAGS="#{Path.hdviper_libx264api} #{Path.hdviper_libtidx264} -lpthread -lrt"}
|
187
222
|
end
|
@@ -235,10 +270,19 @@ module CSD
|
|
235
270
|
end
|
236
271
|
end
|
237
272
|
|
273
|
+
# This method runs the `configure´ command in the current directory unless --no-configure was given.
|
274
|
+
# It is only used for the internal MiniSIP libraries.
|
275
|
+
#
|
238
276
|
def configure(name='')
|
239
277
|
configure! name if Options.configure
|
240
278
|
end
|
241
279
|
|
280
|
+
# This method forces running the `configure´ command in the current directory.
|
281
|
+
# It is only used for the internal MiniSIP libraries.
|
282
|
+
# If enable_debug option is set, the configuration option will include "--enable-debug", except for the default options.
|
283
|
+
# If blank_minisip_configuration option is set, the configuration option will be blank. For example, this option will be
|
284
|
+
# used during the i2conf server setting-up procedure.
|
285
|
+
#
|
242
286
|
def configure!(name='')
|
243
287
|
individual_options = case name
|
244
288
|
when 'libminisip'
|
@@ -249,7 +293,7 @@ module CSD
|
|
249
293
|
''
|
250
294
|
end
|
251
295
|
# The --enable-debug option should only be there if specifically requested
|
252
|
-
debug_options = '--enable-debug' if Options.enable_debug
|
296
|
+
debug_options = '--enable-debug' if Options.enable_debug or debug_libraries.include?(name)
|
253
297
|
# These options are used by all libraries
|
254
298
|
common_options = %Q{--prefix="#{Path.build}" PKG_CONFIG_PATH="#{Path.build_lib_pkg_config}" ACLOCAL_FLAGS="#{Path.build_share_aclocal}" LD_LIBRARY_PATH="#{Path.build_lib}"} if Options.this_user
|
255
299
|
# I2conf needs to compile MiniSIP without any options
|
@@ -258,18 +302,31 @@ module CSD
|
|
258
302
|
Cmd.run ['./configure', common_options, debug_options, individual_options].compact.join(' ')
|
259
303
|
end
|
260
304
|
|
305
|
+
# This method runs the `make´ command in the current directory unless --no-make was given.
|
306
|
+
# It is only used for the internal MiniSIP libraries.
|
307
|
+
#
|
261
308
|
def make
|
262
309
|
make! if Options.make
|
263
310
|
end
|
264
311
|
|
312
|
+
# This method forces running the `make´ command in the current directory.
|
313
|
+
# It is only used for the internal MiniSIP libraries.
|
314
|
+
# AI uses "-j 15" option of +make+ command to speed up the make process.
|
315
|
+
#
|
265
316
|
def make!
|
266
|
-
Cmd.run
|
317
|
+
Cmd.run "make -j #{Options.threads}"
|
267
318
|
end
|
268
319
|
|
320
|
+
# This method runs the `make install´ command in the current directory unless --no-make-install was given.
|
321
|
+
# It is only used for the internal MiniSIP libraries.
|
322
|
+
#
|
269
323
|
def make_install
|
270
324
|
make_install! if Options.make_install
|
271
325
|
end
|
272
326
|
|
327
|
+
# This method forces running the `make install´ command in the current directory.
|
328
|
+
# It is only used for the internal MiniSIP libraries.
|
329
|
+
#
|
273
330
|
def make_install!
|
274
331
|
if Options.this_user
|
275
332
|
Cmd.run("make install")
|
@@ -289,6 +346,9 @@ module CSD
|
|
289
346
|
end
|
290
347
|
end
|
291
348
|
|
349
|
+
# The method create default MiniSIP phonebook for MiniSIP. The default phonebook is derived from carenet-se scenario,
|
350
|
+
# users can modify it in MiniSIP GUI after MiniSIP successfully installed.
|
351
|
+
#
|
292
352
|
def create_address_book
|
293
353
|
return unless !Path.phonebook.file? or ::CSD::Application::Minisip::OUTDATED_PHONEBOOKS.include?(File.read(Path.phonebook).hashed)
|
294
354
|
UI.info "Creating default MiniSIP phonebook".green.bold
|
@@ -317,6 +377,8 @@ module CSD
|
|
317
377
|
Cmd.run "sudo aticonfig --set-pcs-u32=BUSID-2:0:0-0/OpenGL,VSyncControl,2", :announce_pwd => false
|
318
378
|
end
|
319
379
|
|
380
|
+
# The method updates Decklink Firmware (if needed).
|
381
|
+
#
|
320
382
|
def update_decklink_firmware
|
321
383
|
UI.info "Updating Decklink Firmware (if needed)".green.bold
|
322
384
|
Cmd.run "BlackmagicFirmwareUpdater update", :announce_pwd => false, :die_on_failure => false
|
@@ -30,11 +30,25 @@ module CSD
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
+
# This method is to provide general introductions to users, like current working directory.
|
34
|
+
# Since MiniSIP need to be installed before packaging its core libraries, AI will first check whether MiniSIP
|
35
|
+
# has been compiled in the current working directory, if it is not, AI will raise an error and notify users to
|
36
|
+
# to install MiniSIP before packaging, other wise, AI will continue with its operation.
|
37
|
+
#
|
38
|
+
# ====Options
|
39
|
+
# [debug] If debug option is set, users will be notified about system platform and current working module.
|
40
|
+
# [help] If help option is set, AI will provide all help information and cleanup in case the working directory was temporary and is empty.
|
41
|
+
# [reveal] If reveal option is set, AI will continue and process the next method.
|
42
|
+
# [yes] If yes option is set, AI will continue and process the next method.
|
43
|
+
#
|
44
|
+
# If users did not specify any option, AI will ask for their willingness to continue and process the next method
|
45
|
+
# after the users choose 'yes'. Or AI will terminate its operation.
|
46
|
+
#
|
33
47
|
def packing_introduction
|
34
48
|
UI.info " Working directory: ".green.bold + Path.work.to_s.yellow
|
35
49
|
unless Path.repository.directory?
|
36
50
|
UI.warn "#{::CSD.executable} install minisip --no-temp"
|
37
|
-
raise Error::Minisip::Core::PackagingNeedsInstalledMinisip
|
51
|
+
raise Error::Minisip::Core::PackagingNeedsInstalledMinisip,"Please install MiniSIP by AI, before creating its Debain packages. "
|
38
52
|
end
|
39
53
|
UI.separator
|
40
54
|
if Options.help
|
@@ -46,13 +60,20 @@ module CSD
|
|
46
60
|
raise Interrupt unless Options.yes or Options.reveal or UI.continue?
|
47
61
|
end
|
48
62
|
end
|
49
|
-
|
63
|
+
|
64
|
+
# The method initiates corresponding method to package MiniSIP core libraries. The reason of doing that
|
65
|
+
# is to keep the source code clean and easy to read.
|
66
|
+
#
|
50
67
|
def package!
|
51
68
|
make_dist
|
52
69
|
extract_tar_file
|
53
70
|
build_package
|
54
71
|
end
|
55
72
|
|
73
|
+
# The method executes +make+ +dist+ command for each selected MiniSIP core library. This operation will
|
74
|
+
# create a tar file for each library, and AI will copy the tar file to the directory, which is created by AI
|
75
|
+
# to store all the intermediate files during the packaging process.
|
76
|
+
#
|
56
77
|
def make_dist
|
57
78
|
UI.info "Making #{@library} with target dist".green.bold
|
58
79
|
Cmd.cd(@directory) or Options.reveal
|
@@ -61,12 +82,18 @@ module CSD
|
|
61
82
|
Cmd.move(File.join(@directory, @tar_filename.to_s), Path.packaging) if @tar_filename or Options.reveal
|
62
83
|
end
|
63
84
|
|
85
|
+
# The method extracts the tar files, which are generated by previous +make+ +dist+ steps.
|
86
|
+
#
|
64
87
|
def extract_tar_file
|
65
88
|
Cmd.cd(Path.packaging) or Options.reveal
|
66
89
|
Cmd.run("tar -xzf #{@tar_filename}")
|
67
90
|
@tar_dirname = File.basename(@tar_filename.to_s, '.tar.gz')
|
68
91
|
end
|
69
92
|
|
93
|
+
# The method makes Debain packages for each core MiniSIP libraries. Before building each package, all its
|
94
|
+
# library dependencies need to installed first. Thus AI installs the packages, right after the building process
|
95
|
+
# is finished. AI also creates a separate directory to store all the Debian packages.
|
96
|
+
#
|
70
97
|
def build_package
|
71
98
|
Cmd.cd(File.join(Path.packaging, @tar_dirname))
|
72
99
|
Cmd.run("dpkg-buildpackage -rfakeroot")
|
@@ -65,7 +65,7 @@ module CSD
|
|
65
65
|
UI.info "Compiling and installing FFmpeg".green.bold
|
66
66
|
Cmd.cd Path.ffmpeg_repository, :internal => true
|
67
67
|
Cmd.run("#{c_flags} ./configure --enable-gpl --enable-libx264 --enable-x11grab")
|
68
|
-
Cmd.run
|
68
|
+
Cmd.run "make -j #{Options.threads}"
|
69
69
|
Cmd.run('sudo checkinstall --pkgname=ffmpeg --pkgversion "99:-`git log -1 --pretty=format:%h`" --backup=no --default')
|
70
70
|
end
|
71
71
|
|
@@ -36,9 +36,9 @@ module CSD
|
|
36
36
|
UI.info "Compiling HDVIPER".green.bold
|
37
37
|
Cmd.cd Path.hdviper_x264, :internal => true
|
38
38
|
Cmd.run('./configure')
|
39
|
-
Cmd.run
|
39
|
+
Cmd.run "make -j #{Options.threads}"
|
40
40
|
Cmd.cd Path.hdviper_x264_test_x264api, :internal => true
|
41
|
-
Cmd.run
|
41
|
+
Cmd.run "make -j #{Options.threads}"
|
42
42
|
end
|
43
43
|
|
44
44
|
end
|
@@ -30,7 +30,7 @@ module CSD
|
|
30
30
|
UI.info "Compiling and installing x264".green.bold
|
31
31
|
Cmd.cd Path.x264_repository, :internal => true
|
32
32
|
Cmd.run('./configure')
|
33
|
-
Cmd.run
|
33
|
+
Cmd.run "make -j #{Options.threads}"
|
34
34
|
Cmd.run('sudo checkinstall --pkgname=x264 --pkgversion "99:-`git log -1 --pretty=format:%h`" --backup=no --default')
|
35
35
|
end
|
36
36
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: UTF-8 -*-
|
2
2
|
# This file gets eval'ed by the global options parser in lib/csd/options_parser
|
3
3
|
|
4
|
-
opts.on("--this-user","Compile MiniSIP only for the current user (enforces the --no-temp option)") do |value|
|
5
|
-
self.this_user = value
|
6
|
-
end
|
4
|
+
#opts.on("--this-user","Compile MiniSIP only for the current user (enforces the --no-temp option)") do |value|
|
5
|
+
# self.this_user = value
|
6
|
+
#end
|
7
7
|
|
8
8
|
opts.on("--no-apt-get","Don't run any apt-get commands") do |value|
|
9
9
|
self.apt_get = value
|
@@ -43,10 +43,18 @@ opts.on("--no-make-install","Don't run the make install command on any MiniSIP l
|
|
43
43
|
self.make_install = value
|
44
44
|
end
|
45
45
|
|
46
|
+
opts.on("--threads [INT]", Integer, "Simultaneous compiling with this many threads (e.g. 10)") do |value|
|
47
|
+
self.threads = value
|
48
|
+
end
|
49
|
+
|
46
50
|
opts.on("--only libmutil,libmsip,etc.", Array, "Process only these libraries") do |list|
|
47
51
|
self.only = list
|
48
52
|
end
|
49
53
|
|
50
|
-
opts.on("--enable-debug","Enable MiniSIP-internal debugging") do |value|
|
54
|
+
opts.on("--enable-debug","Enable full MiniSIP-internal debugging") do |value|
|
51
55
|
self.enable_debug = value
|
52
56
|
end
|
57
|
+
|
58
|
+
opts.on("--enable-debug-on libmsip,..", Array, "Enable MiniSIP-internal debugging only for these libraries") do |list|
|
59
|
+
self.enable_debug_on = list
|
60
|
+
end
|
@@ -1,12 +1,14 @@
|
|
1
|
-
self.this_user = false
|
1
|
+
self.this_user = false # Deprecated, that's why always false
|
2
2
|
self.apt_get = true
|
3
3
|
self.ffmpeg_first = false
|
4
4
|
self.github_tar = false
|
5
5
|
self.vendor = false
|
6
6
|
self.branch = 'edge'
|
7
|
+
self.threads = 1
|
7
8
|
self.bootstrap = true
|
8
9
|
self.configure = true
|
9
10
|
self.make = true
|
10
11
|
self.make_install = true
|
11
12
|
self.only = nil
|
12
|
-
self.enable_debug = false
|
13
|
+
self.enable_debug = false
|
14
|
+
self.enable_debug_on = nil
|
@@ -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
|
11
|
+
DEBIAN_DEPENDENCIES = %w{ automake build-essential checkinstall git-core libasound2-dev libavcodec-dev libglademm-2.4-dev libgtkmm-2.4-dev libltdl-dev libnotify-bin libsdl-dev libsdl-ttf2.0-dev libssl-dev libswscale-dev libtool libx11-dev libxv-dev nasm subversion yasm }
|
12
12
|
|
13
13
|
def compile!
|
14
14
|
aptitude
|
@@ -39,7 +39,7 @@ module CSD
|
|
39
39
|
return unless Options.apt_get
|
40
40
|
UI.info "Installing Debian dependencies for MiniSIP".green.bold
|
41
41
|
Cmd.run 'sudo apt-get update', :announce_pwd => false
|
42
|
-
Cmd.run "sudo apt-get install #{DEBIAN_DEPENDENCIES.sort.join(' ')} --yes --fix-missing", :announce_pwd => false
|
42
|
+
Cmd.run "sudo apt-get install #{DEBIAN_DEPENDENCIES.sort.join(' ')} --yes --fix-missing --force-yes", :announce_pwd => false
|
43
43
|
# For some reason OpenGL crashes if we try to use this packet.
|
44
44
|
# return unless Gem::Platform.local.ubuntu_10? or Options.reveal
|
45
45
|
# UI.info "Installing 2D/3D acceleration for ATI graphic cards".green.bold
|
data/lib/csd/path_container.rb
CHANGED
@@ -4,18 +4,26 @@ require 'ostruct'
|
|
4
4
|
module CSD
|
5
5
|
class PathContainer < OpenStruct
|
6
6
|
|
7
|
+
# This method chooses and holds the container for root privilege.
|
8
|
+
#
|
7
9
|
def root
|
8
10
|
@root ||= Dir.pwd
|
9
11
|
end
|
10
12
|
|
13
|
+
# This method chooses and holds the container for gem.
|
14
|
+
#
|
11
15
|
def gem
|
12
16
|
@gem ||= File.expand_path(File.join(File.dirname(__FILE__), '..' ,'..'))
|
13
17
|
end
|
14
18
|
|
19
|
+
# This method chooses and holds the container for vendor.
|
20
|
+
#
|
15
21
|
def vendor
|
16
22
|
@vendor ||= File.join(self.gem, 'vendor')
|
17
23
|
end
|
18
24
|
|
25
|
+
# This method chooses and holds the container for applications.
|
26
|
+
#
|
19
27
|
def applications
|
20
28
|
@applications ||= File.expand_path(File.join(self.gem, 'lib', 'csd', 'application'))
|
21
29
|
end
|
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
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 1
|
10
|
+
version: 0.4.1
|
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-09-
|
18
|
+
date: 2010-09-27 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|