forked from peterseverin/RMPlayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
66 lines (49 loc) · 1.34 KB
/
Rakefile
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
60
61
62
63
64
65
66
require 'rake'
require 'rake/gempackagetask'
require 'rake/testtask'
require 'rake/clean'
PKG_NAME = 'rmplayer'
PKG_VERSION = "1.0.1"
PKG_FILES = FileList[
'[A-Z]*',
'bin/**/*',
'lib/**/*',
]
CLEAN.include('build')
task :default => :package
spec = Gem::Specification.new do |s|
s.name = PKG_NAME
s.version = PKG_VERSION
s.summary = "Remote control interface for MPlayer"
s.description = <<-EOF
#{PKG_NAME} implements HTTP protocol used by Vlc to control MPlayer.
More to the point, I just wanted to use VLC remote android app to control MPlayer.
EOF
s.files = PKG_FILES.to_a
s.bindir = "bin"
s.executables = ["rmplayer"]
s.default_executable = "rmplayer"
s.require_path = 'lib'
s.add_dependency 'builder'
s.has_rdoc = false
s.author = "Peter Severin"
s.email = "[email protected]"
end
Rake::GemPackageTask.new(spec) do |p|
p.need_tar = true
p.gem_spec = spec
end
desc "Run all the tests"
Rake::TestTask.new do |t|
t.test_files = FileList['test/test_*.rb', 'test/*_test.rb']
t.verbose = true
end
desc "Install the gem package"
task :install => :package do |t|
gem_file = Dir.glob("pkg/#{PKG_NAME}-*.gem").last
`gem install -l #{gem_file}`
end
desc "Uninstall the gem package"
task :uninstall do |t|
`echo 'y' | gem uninstall #{PKG_NAME}`
end