csd 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/COPYING +367 -0
- data/Rakefile +10 -10
- data/VERSION +1 -1
- data/bin/ai +19 -0
- data/csd.gemspec +257 -35
- data/lib/active_support.rb +75 -0
- data/lib/active_support/all.rb +3 -0
- data/lib/active_support/backtrace_cleaner.rb +94 -0
- data/lib/active_support/base64.rb +42 -0
- data/lib/active_support/basic_object.rb +21 -0
- data/lib/active_support/benchmarkable.rb +60 -0
- data/lib/active_support/buffered_logger.rb +132 -0
- data/lib/active_support/builder.rb +6 -0
- data/lib/active_support/cache.rb +626 -0
- data/lib/active_support/cache/compressed_mem_cache_store.rb +13 -0
- data/lib/active_support/cache/file_store.rb +188 -0
- data/lib/active_support/cache/mem_cache_store.rb +191 -0
- data/lib/active_support/cache/memory_store.rb +159 -0
- data/lib/active_support/cache/strategy/local_cache.rb +164 -0
- data/lib/active_support/cache/synchronized_memory_store.rb +11 -0
- data/lib/active_support/callbacks.rb +600 -0
- data/lib/active_support/concern.rb +29 -0
- data/lib/active_support/configurable.rb +36 -0
- data/lib/active_support/core_ext.rb +3 -0
- data/lib/active_support/core_ext/array.rb +7 -0
- data/lib/active_support/core_ext/array/access.rb +46 -0
- data/lib/active_support/core_ext/array/conversions.rb +164 -0
- data/lib/active_support/core_ext/array/extract_options.rb +29 -0
- data/lib/active_support/core_ext/array/grouping.rb +100 -0
- data/lib/active_support/core_ext/array/random_access.rb +20 -0
- data/lib/active_support/core_ext/array/uniq_by.rb +17 -0
- data/lib/active_support/core_ext/array/wrap.rb +22 -0
- data/lib/active_support/core_ext/benchmark.rb +7 -0
- data/lib/active_support/core_ext/big_decimal.rb +1 -0
- data/lib/active_support/core_ext/big_decimal/conversions.rb +27 -0
- data/lib/active_support/core_ext/cgi.rb +1 -0
- data/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb +19 -0
- data/lib/active_support/core_ext/class.rb +4 -0
- data/lib/active_support/core_ext/class/attribute.rb +67 -0
- data/lib/active_support/core_ext/class/attribute_accessors.rb +63 -0
- data/lib/active_support/core_ext/class/delegating_attributes.rb +44 -0
- data/lib/active_support/core_ext/class/inheritable_attributes.rb +232 -0
- data/lib/active_support/core_ext/class/subclasses.rb +55 -0
- data/lib/active_support/core_ext/date/acts_like.rb +8 -0
- data/lib/active_support/core_ext/date/calculations.rb +240 -0
- data/lib/active_support/core_ext/date/conversions.rb +99 -0
- data/lib/active_support/core_ext/date/freeze.rb +31 -0
- data/lib/active_support/core_ext/date_time/acts_like.rb +13 -0
- data/lib/active_support/core_ext/date_time/calculations.rb +113 -0
- data/lib/active_support/core_ext/date_time/conversions.rb +102 -0
- data/lib/active_support/core_ext/date_time/zones.rb +17 -0
- data/lib/active_support/core_ext/enumerable.rb +119 -0
- data/lib/active_support/core_ext/exception.rb +3 -0
- data/lib/active_support/core_ext/file.rb +2 -0
- data/lib/active_support/core_ext/file/atomic.rb +41 -0
- data/lib/active_support/core_ext/file/path.rb +5 -0
- data/lib/active_support/core_ext/float.rb +1 -0
- data/lib/active_support/core_ext/float/rounding.rb +19 -0
- data/lib/active_support/core_ext/hash.rb +8 -0
- data/lib/active_support/core_ext/hash/conversions.rb +150 -0
- data/lib/active_support/core_ext/hash/deep_merge.rb +16 -0
- data/lib/active_support/core_ext/hash/diff.rb +13 -0
- data/lib/active_support/core_ext/hash/except.rb +24 -0
- data/lib/active_support/core_ext/hash/indifferent_access.rb +14 -0
- data/lib/active_support/core_ext/hash/keys.rb +45 -0
- data/lib/active_support/core_ext/hash/reverse_merge.rb +28 -0
- data/lib/active_support/core_ext/hash/slice.rb +38 -0
- data/lib/active_support/core_ext/integer.rb +3 -0
- data/lib/active_support/core_ext/integer/inflections.rb +14 -0
- data/lib/active_support/core_ext/integer/multiple.rb +6 -0
- data/lib/active_support/core_ext/integer/time.rb +39 -0
- data/lib/active_support/core_ext/kernel.rb +5 -0
- data/lib/active_support/core_ext/kernel/agnostics.rb +11 -0
- data/lib/active_support/core_ext/kernel/debugger.rb +16 -0
- data/lib/active_support/core_ext/kernel/reporting.rb +62 -0
- data/lib/active_support/core_ext/kernel/requires.rb +26 -0
- data/lib/active_support/core_ext/kernel/singleton_class.rb +13 -0
- data/lib/active_support/core_ext/load_error.rb +23 -0
- data/lib/active_support/core_ext/logger.rb +146 -0
- data/lib/active_support/core_ext/module.rb +12 -0
- data/lib/active_support/core_ext/module/aliasing.rb +70 -0
- data/lib/active_support/core_ext/module/anonymous.rb +24 -0
- data/lib/active_support/core_ext/module/attr_accessor_with_default.rb +31 -0
- data/lib/active_support/core_ext/module/attr_internal.rb +32 -0
- data/lib/active_support/core_ext/module/attribute_accessors.rb +66 -0
- data/lib/active_support/core_ext/module/delegation.rb +146 -0
- data/lib/active_support/core_ext/module/deprecation.rb +9 -0
- data/lib/active_support/core_ext/module/introspection.rb +88 -0
- data/lib/active_support/core_ext/module/method_names.rb +14 -0
- data/lib/active_support/core_ext/module/reachable.rb +10 -0
- data/lib/active_support/core_ext/module/remove_method.rb +6 -0
- data/lib/active_support/core_ext/module/synchronization.rb +42 -0
- data/lib/active_support/core_ext/name_error.rb +18 -0
- data/lib/active_support/core_ext/numeric.rb +2 -0
- data/lib/active_support/core_ext/numeric/bytes.rb +44 -0
- data/lib/active_support/core_ext/numeric/time.rb +77 -0
- data/lib/active_support/core_ext/object.rb +14 -0
- data/lib/active_support/core_ext/object/acts_like.rb +10 -0
- data/lib/active_support/core_ext/object/blank.rb +76 -0
- data/lib/active_support/core_ext/object/conversions.rb +4 -0
- data/lib/active_support/core_ext/object/duplicable.rb +65 -0
- data/lib/active_support/core_ext/object/extending.rb +11 -0
- data/lib/active_support/core_ext/object/instance_variables.rb +67 -0
- data/lib/active_support/core_ext/object/misc.rb +2 -0
- data/lib/active_support/core_ext/object/returning.rb +42 -0
- data/lib/active_support/core_ext/object/to_param.rb +49 -0
- data/lib/active_support/core_ext/object/to_query.rb +27 -0
- data/lib/active_support/core_ext/object/try.rb +36 -0
- data/lib/active_support/core_ext/object/with_options.rb +26 -0
- data/lib/active_support/core_ext/proc.rb +14 -0
- data/lib/active_support/core_ext/process.rb +1 -0
- data/lib/active_support/core_ext/process/daemon.rb +23 -0
- data/lib/active_support/core_ext/range.rb +4 -0
- data/lib/active_support/core_ext/range/blockless_step.rb +29 -0
- data/lib/active_support/core_ext/range/conversions.rb +21 -0
- data/lib/active_support/core_ext/range/include_range.rb +21 -0
- data/lib/active_support/core_ext/range/overlaps.rb +8 -0
- data/lib/active_support/core_ext/regexp.rb +5 -0
- data/lib/active_support/core_ext/rexml.rb +46 -0
- data/lib/active_support/core_ext/string.rb +12 -0
- data/lib/active_support/core_ext/string/access.rb +99 -0
- data/lib/active_support/core_ext/string/behavior.rb +7 -0
- data/lib/active_support/core_ext/string/conversions.rb +61 -0
- data/lib/active_support/core_ext/string/encoding.rb +11 -0
- data/lib/active_support/core_ext/string/exclude.rb +6 -0
- data/lib/active_support/core_ext/string/filters.rb +49 -0
- data/lib/active_support/core_ext/string/inflections.rb +149 -0
- data/lib/active_support/core_ext/string/interpolation.rb +2 -0
- data/lib/active_support/core_ext/string/multibyte.rb +72 -0
- data/lib/active_support/core_ext/string/output_safety.rb +109 -0
- data/lib/active_support/core_ext/string/starts_ends_with.rb +4 -0
- data/lib/active_support/core_ext/string/xchar.rb +18 -0
- data/lib/active_support/core_ext/time/acts_like.rb +8 -0
- data/lib/active_support/core_ext/time/calculations.rb +282 -0
- data/lib/active_support/core_ext/time/conversions.rb +85 -0
- data/lib/active_support/core_ext/time/marshal.rb +56 -0
- data/lib/active_support/core_ext/time/publicize_conversion_methods.rb +10 -0
- data/lib/active_support/core_ext/time/zones.rb +78 -0
- data/lib/active_support/core_ext/uri.rb +22 -0
- data/lib/active_support/dependencies.rb +628 -0
- data/lib/active_support/dependencies/autoload.rb +50 -0
- data/lib/active_support/deprecation.rb +18 -0
- data/lib/active_support/deprecation/behaviors.rb +38 -0
- data/lib/active_support/deprecation/method_wrappers.rb +29 -0
- data/lib/active_support/deprecation/proxy_wrappers.rb +74 -0
- data/lib/active_support/deprecation/reporting.rb +56 -0
- data/lib/active_support/duration.rb +105 -0
- data/lib/active_support/gzip.rb +25 -0
- data/lib/active_support/hash_with_indifferent_access.rb +145 -0
- data/lib/active_support/i18n.rb +8 -0
- data/lib/active_support/inflections.rb +56 -0
- data/lib/active_support/inflector.rb +7 -0
- data/lib/active_support/inflector/inflections.rb +211 -0
- data/lib/active_support/inflector/methods.rb +141 -0
- data/lib/active_support/inflector/transliterate.rb +97 -0
- data/lib/active_support/json.rb +2 -0
- data/lib/active_support/json/backends/jsongem.rb +43 -0
- data/lib/active_support/json/backends/yajl.rb +40 -0
- data/lib/active_support/json/backends/yaml.rb +90 -0
- data/lib/active_support/json/decoding.rb +51 -0
- data/lib/active_support/json/encoding.rb +254 -0
- data/lib/active_support/json/variable.rb +11 -0
- data/lib/active_support/lazy_load_hooks.rb +27 -0
- data/lib/active_support/locale/en.yml +36 -0
- data/lib/active_support/memoizable.rb +103 -0
- data/lib/active_support/message_encryptor.rb +71 -0
- data/lib/active_support/message_verifier.rb +62 -0
- data/lib/active_support/multibyte.rb +44 -0
- data/lib/active_support/multibyte/chars.rb +480 -0
- data/lib/active_support/multibyte/exceptions.rb +8 -0
- data/lib/active_support/multibyte/unicode.rb +393 -0
- data/lib/active_support/multibyte/utils.rb +60 -0
- data/lib/active_support/notifications.rb +81 -0
- data/lib/active_support/notifications/fanout.rb +93 -0
- data/lib/active_support/notifications/instrumenter.rb +56 -0
- data/lib/active_support/option_merger.rb +25 -0
- data/lib/active_support/ordered_hash.rb +158 -0
- data/lib/active_support/ordered_options.rb +27 -0
- data/lib/active_support/railtie.rb +100 -0
- data/lib/active_support/rescuable.rb +114 -0
- data/lib/active_support/ruby/shim.rb +22 -0
- data/lib/active_support/secure_random.rb +199 -0
- data/lib/active_support/string_inquirer.rb +21 -0
- data/lib/active_support/test_case.rb +42 -0
- data/lib/active_support/testing/assertions.rb +82 -0
- data/lib/active_support/testing/declarative.rb +40 -0
- data/lib/active_support/testing/default.rb +9 -0
- data/lib/active_support/testing/deprecation.rb +55 -0
- data/lib/active_support/testing/isolation.rb +154 -0
- data/lib/active_support/testing/pending.rb +48 -0
- data/lib/active_support/testing/performance.rb +455 -0
- data/lib/active_support/testing/setup_and_teardown.rb +111 -0
- data/lib/active_support/time.rb +34 -0
- data/lib/active_support/time/autoload.rb +5 -0
- data/lib/active_support/time_with_zone.rb +341 -0
- data/lib/active_support/values/time_zone.rb +377 -0
- data/lib/active_support/values/unicode_tables.dat +0 -0
- data/lib/active_support/version.rb +10 -0
- data/lib/active_support/whiny_nil.rb +60 -0
- data/lib/active_support/xml_mini.rb +158 -0
- data/lib/active_support/xml_mini/jdom.rb +168 -0
- data/lib/active_support/xml_mini/libxml.rb +80 -0
- data/lib/active_support/xml_mini/libxmlsax.rb +85 -0
- data/lib/active_support/xml_mini/nokogiri.rb +78 -0
- data/lib/active_support/xml_mini/nokogirisax.rb +83 -0
- data/lib/active_support/xml_mini/rexml.rb +129 -0
- data/lib/csd.rb +82 -2
- data/lib/csd/application.rb +2 -0
- data/lib/csd/application/default.rb +51 -0
- data/lib/csd/application/default/base.rb +15 -0
- data/lib/csd/application/minisip.rb +25 -0
- data/lib/csd/application/minisip/about.yml +14 -0
- data/lib/csd/application/minisip/base.rb +161 -0
- data/lib/csd/application/minisip/error.rb +11 -0
- data/lib/csd/application/minisip/options/common.rb +0 -0
- data/lib/csd/application/minisip/options/compile.rb +59 -0
- data/lib/csd/{applications → application}/minisip/unix/base.rb +10 -11
- data/lib/csd/application/opensips/about.yml +2 -0
- data/lib/csd/applications.rb +55 -0
- data/lib/csd/commands.rb +88 -65
- data/lib/csd/error.rb +31 -0
- data/lib/csd/extensions.rb +1 -0
- data/lib/{extensions → csd/extensions}/core/array.rb +2 -2
- data/lib/csd/extensions/core/dir.rb +46 -0
- data/lib/{extensions → csd/extensions}/core/file.rb +2 -2
- data/lib/{extensions → csd/extensions}/core/object.rb +2 -2
- data/lib/csd/extensions/core/option_parser.rb +33 -0
- data/lib/{extensions → csd/extensions}/core/pathname.rb +12 -3
- data/lib/{extensions → csd/extensions}/core/string.rb +2 -2
- data/lib/{extensions → csd/extensions}/gem/platform.rb +6 -2
- data/lib/csd/global_open_struct.rb +18 -0
- data/lib/csd/options.rb +124 -95
- data/lib/csd/path.rb +31 -0
- data/lib/csd/ui.rb +1 -0
- data/lib/csd/ui/cli.rb +7 -0
- data/lib/csd/ui/ui.rb +46 -0
- data/lib/csd/version.rb +9 -0
- data/lib/term/ansicolor.rb +102 -0
- data/lib/term/ansicolor/.keep +0 -0
- data/lib/term/ansicolor/version.rb +10 -0
- data/test/functional/test_applications.rb +86 -0
- data/test/functional/test_commands.rb +42 -29
- data/test/functional/test_options.rb +98 -0
- data/test/helper.rb +14 -0
- data/test/unit/test_dir.rb +38 -0
- data/test/unit/test_pathname.rb +32 -0
- metadata +253 -40
- data/LICENSE +0 -20
- data/bin/csd +0 -8
- data/lib/csd/applications/base.rb +0 -33
- data/lib/csd/applications/minisip/base.rb +0 -125
- data/lib/csd/applications/minisip/init.rb +0 -20
- data/lib/csd/init.rb +0 -69
- data/lib/csd/path_container.rb +0 -15
- data/publish +0 -29
data/LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright (c) 2009 Technology Transfer Alliance
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/bin/csd
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), '..', 'commands')
|
2
|
-
require 'rbconfig'
|
3
|
-
|
4
|
-
module Csd
|
5
|
-
module Application
|
6
|
-
|
7
|
-
# This is the class root parent of all Applications
|
8
|
-
#
|
9
|
-
class Base
|
10
|
-
|
11
|
-
include Commands
|
12
|
-
include Gem::UserInteraction
|
13
|
-
|
14
|
-
attr_reader :gem_version, :options
|
15
|
-
attr_reader :after_build, :before_build # Dummies to be overwritten by methods
|
16
|
-
attr_accessor :path
|
17
|
-
|
18
|
-
def initialize(options={})
|
19
|
-
@gem_version = options[:gem_version]
|
20
|
-
@options = options[:options]
|
21
|
-
@path = options[:path]
|
22
|
-
self
|
23
|
-
end
|
24
|
-
|
25
|
-
def introduction
|
26
|
-
say "CSD Version: #{gem_version}".blue
|
27
|
-
end
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
@@ -1,125 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), '..', 'base')
|
2
|
-
|
3
|
-
module Csd
|
4
|
-
module Application
|
5
|
-
module Minisip
|
6
|
-
class Base < Csd::Application::Base
|
7
|
-
|
8
|
-
def introduction
|
9
|
-
super
|
10
|
-
define_paths
|
11
|
-
say " Working directory: ".green + path.work.to_s.yellow
|
12
|
-
say " Your Platform: ".green + Gem::Platform.local.humanize.to_s.yellow
|
13
|
-
say " Application module: ".green + self.class.name.to_s.yellow
|
14
|
-
say
|
15
|
-
unless options.yes
|
16
|
-
exit unless ask_yes_no("Continue?".red.bold, true)
|
17
|
-
end
|
18
|
-
say
|
19
|
-
build!
|
20
|
-
end
|
21
|
-
|
22
|
-
def build!
|
23
|
-
before_build
|
24
|
-
mkdir path.work
|
25
|
-
make_hdviper if checkout_hdviper or options.dry
|
26
|
-
checkout_minisip
|
27
|
-
make_minisip
|
28
|
-
after_build
|
29
|
-
end
|
30
|
-
|
31
|
-
def define_paths
|
32
|
-
path.work = Pathname.new(File.join(path.root, 'minisip'))
|
33
|
-
path.repository = Pathname.new(File.join(path.work, 'repository'))
|
34
|
-
path.open_gl_display = Pathname.new(File.join(path.repository, 'libminisip', 'source', 'subsystem_media', 'video', 'display', 'OpenGLDisplay.cxx'))
|
35
|
-
path.hdviper = Pathname.new(File.join(path.work, 'hdviper'))
|
36
|
-
path.hdviper_x264 = Pathname.new(File.join(path.hdviper, 'x264'))
|
37
|
-
path.hdviper_x264_test_x264api = Pathname.new(File.join(path.hdviper_x264, 'test', 'x264API'))
|
38
|
-
path.build = Pathname.new(File.join(path.work, 'build'))
|
39
|
-
path.build_include = Pathname.new(File.join(path.build, 'include'))
|
40
|
-
path.build_lib = Pathname.new(File.join(path.build, 'lib'))
|
41
|
-
path.build_lib_pkg_config = Pathname.new(File.join(path.build_lib, 'pkgconfig'))
|
42
|
-
path.build_share = Pathname.new(File.join(path.build, 'share'))
|
43
|
-
path.build_share_aclocal = Pathname.new(File.join(path.build_share, 'aclocal'))
|
44
|
-
end
|
45
|
-
|
46
|
-
def checkout_hdviper
|
47
|
-
if path.hdviper.directory?
|
48
|
-
say "Skipping hdviper, because the directory already exists: #{path.hdviper}".green.bold
|
49
|
-
else
|
50
|
-
if path.hdviper.parent.writable? or options.dry
|
51
|
-
say "Downloading hdviper to: #{path.hdviper}".green.bold
|
52
|
-
run_command("svn co --quiet svn://hdviper.org/hdviper/wp3/src #{path.hdviper}")
|
53
|
-
return true
|
54
|
-
else
|
55
|
-
say "Could not download hdviper (no permission): #{path.hdviper}".red
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
def make_hdviper
|
61
|
-
cd path.hdviper_x264
|
62
|
-
run_command('./configure')
|
63
|
-
run_command('make')
|
64
|
-
cd path.hdviper_x264_test_x264api
|
65
|
-
run_command('make')
|
66
|
-
end
|
67
|
-
|
68
|
-
def checkout_minisip # TODO: Refactor because redudancy with checkout_hdviper
|
69
|
-
if path.repository.directory?
|
70
|
-
say "Skipping repository download, because the directory already exists: #{path.repository}".green.bold
|
71
|
-
else
|
72
|
-
if path.repository.parent.writable? or options.dry
|
73
|
-
say "Downloading minisip repository to: #{path.repository}".green.bold
|
74
|
-
run_command("git clone http://github.com/csd/minisip.git #{path.repository}")
|
75
|
-
# Fixing hard-coded stuff
|
76
|
-
new_file_content = File.read(path.open_gl_display).gsub('/home/erik', path.build)
|
77
|
-
File.open(path.open_gl_display, 'w+') { |file| file << new_file_content }
|
78
|
-
return true
|
79
|
-
else
|
80
|
-
say "Could not download minisip repository (no permission): #{path.hdviper}".red
|
81
|
-
end
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
def make_minisip
|
86
|
-
[path.build, path.build_include, path.build_lib, path.build_share, path.build_share_aclocal].each { |target| mkdir target }
|
87
|
-
['libmutil', 'libmnetutil', 'libmcrypto', 'libmikey', 'libmsip', 'libmstun', 'libminisip', 'minisip'].each do |library|
|
88
|
-
directory = Pathname.new(File.join(path.repository, library))
|
89
|
-
next if options.only and !options.only.include?(library)
|
90
|
-
if cd(directory) or options.dry
|
91
|
-
if options.bootstrap
|
92
|
-
say "Bootstrapping #{library}".green.bold
|
93
|
-
run_command("./bootstrap -I #{path.build_share_aclocal.enquote}")
|
94
|
-
end
|
95
|
-
if options.configure
|
96
|
-
say "Configuring #{library}".green.bold
|
97
|
-
individual_options = case library
|
98
|
-
when 'libminisip'
|
99
|
-
%Q{--enable-debug --enable-video --disable-mil --disable-decklink --enable-opengl --disable-sdl CPPFLAGS="-I#{path.hdviper_x264_test_x264api} -I#{path.hdviper_x264}" LDFLAGS="#{File.join(path.hdviper_x264_test_x264api, 'libx264api.a')} #{File.join(path.hdviper_x264, 'libtidx264.a')} -lpthread -lrt"}
|
100
|
-
#%Q{--enable-debug --enable-video --disable-mil --disable-decklink --enable-opengl --disable-sdl CPPFLAGS="-I#{path.hdviper_x264}" LDFLAGS="#{File.join(path.hdviper_x264, 'libx264.a')} -lpthread -lrt"}
|
101
|
-
when 'minisip'
|
102
|
-
%Q{--enable-debug --enable-video --enable-textui --enable-opengl}
|
103
|
-
else
|
104
|
-
''
|
105
|
-
end
|
106
|
-
run_command(%Q{./configure #{individual_options} --prefix=#{path.build.enquote} PKG_CONFIG_PATH=#{path.build_lib_pkg_config.enquote} ACLOCAL_FLAGS=#{path.build_share_aclocal} LD_LIBRARY_PATH=#{path.build_lib.enquote} --silent})
|
107
|
-
end
|
108
|
-
if options.make
|
109
|
-
say "Make #{library}".green.bold
|
110
|
-
run_command("make")
|
111
|
-
end
|
112
|
-
if options.make_install
|
113
|
-
say "Make install #{library}".green.bold
|
114
|
-
run_command("make install")
|
115
|
-
end
|
116
|
-
else
|
117
|
-
say "Skipping minisip library #{library} because it not be found: #{directory}".green.bold
|
118
|
-
end
|
119
|
-
end
|
120
|
-
end
|
121
|
-
|
122
|
-
end
|
123
|
-
end
|
124
|
-
end
|
125
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
Dir.glob(File.join(File.dirname(__FILE__), '**', '*.rb')) { |file| require file }
|
2
|
-
|
3
|
-
module Csd
|
4
|
-
module Application
|
5
|
-
module Minisip
|
6
|
-
class Init
|
7
|
-
|
8
|
-
def self.application(*args)
|
9
|
-
case Gem::Platform.local.os
|
10
|
-
when 'linux'
|
11
|
-
Unix::Base.new(*args)
|
12
|
-
else
|
13
|
-
Base.new(*args)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
data/lib/csd/init.rb
DELETED
@@ -1,69 +0,0 @@
|
|
1
|
-
# Include all files in the same directory
|
2
|
-
Dir.glob(File.join(File.dirname(__FILE__), '*.rb')) { |file| require file }
|
3
|
-
require File.join(File.dirname(__FILE__), 'applications', 'base')
|
4
|
-
|
5
|
-
require 'ostruct'
|
6
|
-
require 'tmpdir'
|
7
|
-
require 'active_support/core_ext'
|
8
|
-
|
9
|
-
# This namespace is given to the entire CSD gem.
|
10
|
-
#
|
11
|
-
module Csd
|
12
|
-
# On initialization, this class bootstraps and runs the CSD gem.
|
13
|
-
# The initialization is most likely be done by the `csd´ executable.
|
14
|
-
#
|
15
|
-
class Init
|
16
|
-
|
17
|
-
include Gem::UserInteraction
|
18
|
-
|
19
|
-
attr_reader :gem_version, :options, :path, :application
|
20
|
-
|
21
|
-
def initialize
|
22
|
-
@options = Options.parse
|
23
|
-
@path = path_struct
|
24
|
-
@gem_version = File.read(File.join(path.gem_root, 'VERSION'))
|
25
|
-
validate_arguments
|
26
|
-
@application = initialize_application
|
27
|
-
@application.introduction
|
28
|
-
self
|
29
|
-
end
|
30
|
-
|
31
|
-
def path_struct
|
32
|
-
path = PathContainer.new
|
33
|
-
if options.path
|
34
|
-
if File.directory?(options.path)
|
35
|
-
path.root = File.expand_path(options.path)
|
36
|
-
else
|
37
|
-
say "The path ´#{options.path}´ doesn't exist."
|
38
|
-
exit
|
39
|
-
end
|
40
|
-
else
|
41
|
-
path.root = options.temp ? Dir.mktmpdir : Dir.pwd
|
42
|
-
end
|
43
|
-
path
|
44
|
-
end
|
45
|
-
|
46
|
-
def validate_arguments
|
47
|
-
case ARGV.size
|
48
|
-
when 0
|
49
|
-
say "Please specify an action."
|
50
|
-
exit
|
51
|
-
when 1
|
52
|
-
say "Please specify an application."
|
53
|
-
exit
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
def initialize_application
|
58
|
-
directory_name = ARGV.second.underscore
|
59
|
-
begin
|
60
|
-
require File.join(File.join(path.applications, "#{directory_name}"), 'init.rb')
|
61
|
-
"Csd::Application::#{directory_name.camelize}::Init".constantize.application(:gem_version => @gem_version, :options => @options, :path => @path)
|
62
|
-
rescue LoadError
|
63
|
-
say "Unknown application: #{directory_name}"
|
64
|
-
exit
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
end
|
69
|
-
end
|
data/lib/csd/path_container.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'ostruct'
|
2
|
-
|
3
|
-
module Csd
|
4
|
-
class PathContainer < OpenStruct
|
5
|
-
|
6
|
-
def gem_root
|
7
|
-
File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
|
8
|
-
end
|
9
|
-
|
10
|
-
def applications
|
11
|
-
File.expand_path(File.join(gem_root, 'lib', 'csd', 'applications'))
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
15
|
-
end
|
data/publish
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
unless ARGV.is_a?(Array) and ARGV.size > 0
|
4
|
-
puts "Please provide a commit message as argument."
|
5
|
-
exit
|
6
|
-
end
|
7
|
-
|
8
|
-
def run_command(cmd)
|
9
|
-
puts "================"
|
10
|
-
puts "Running command: #{cmd}"
|
11
|
-
puts "================"
|
12
|
-
ret = ''
|
13
|
-
IO.popen(cmd) do |stdout|
|
14
|
-
stdout.each do |line|
|
15
|
-
puts line
|
16
|
-
ret << line
|
17
|
-
end
|
18
|
-
end
|
19
|
-
ret
|
20
|
-
end
|
21
|
-
|
22
|
-
[ 'git status',
|
23
|
-
'git add .',
|
24
|
-
'git add -u',
|
25
|
-
'git commit -m "#{ARGV.first}"',
|
26
|
-
'rake version:bump:patch',
|
27
|
-
'rake release',
|
28
|
-
'rake build'
|
29
|
-
].each { |cmd| run_command(cmd) }
|