forked from showbox-oss/ffmprb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ffmprb.gemspec
59 lines (50 loc) · 2.11 KB
/
ffmprb.gemspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'ffmprb/version'
Gem::Specification.new do |spec|
spec.name = 'ffmprb'
spec.version = Ffmprb::VERSION
spec.authors = ["Costa Shapiro"]
spec.email = ['[email protected]']
spec.summary = "ffmprb is your audio/video manipulation pal, based on https://ffmpeg.org"
spec.description = "A video and audio composing DSL (Damn-Simple Language) and a micro-engine for ffmpeg and ffriends"
spec.homepage = Ffmprb::GEM_GITHUB_URL
def self.ignore_match(pattern, path)
path = '/' + path unless path =~ %r'^/'
if File.directory?(path)
path += '/' unless path =~ %r'/$'
end
if pattern.is_a?(Array)
pattern
else
[pattern]
end.any? do |pattern|
pattern = '**/' + pattern unless pattern =~ %r'^/'
pattern += '**' if pattern =~ %r'/$'
File.fnmatch(pattern, path)
end
end
pattern =
if (ignore_pattern_lines = File.readlines('.gemignore') rescue nil)
ignore_pattern_lines.map do |line|
stripped = line.split(/(?<!\\)#/)[0].strip
stripped unless stripped.empty?
end.compact
else
%w[test/ spec/ features/]
end
# NOTE dotfiles are ignored by .glob
spec.files = Dir['**/*'].reject{|path| ignore_match pattern, path}
# TODO:rm spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.bindir = 'exe'
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']
spec.required_ruby_version = '>= 2.6' # TODO check 3.X
# NOTE I'm not happy with this dependency, and there's nothing crossplatform (= for windoze too) at the moment
spec.add_dependency 'mkfifo', '~> 0.1.1'
# NOTE make it into an optional dependency? Nah for now
spec.add_dependency 'thor', '~> 0.19.1'
spec.post_install_message = "Have fun with your a/v! To enable proc visualisation, install firebase gem and set FFMPRB_PROC_VIS_FIREBASE env." unless
Ffmprb::FIREBASE_AVAILABLE
end