itamae-plugin-recipe-tmux 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +66 -0
- data/Rakefile +1 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/itamae-plugin-recipe-tmux.gemspec +24 -0
- data/lib/itamae/plugin/recipe/tmux.rb +11 -0
- data/lib/itamae/plugin/recipe/tmux/default.rb +20 -0
- data/lib/itamae/plugin/recipe/tmux/libevent.rb +24 -0
- data/lib/itamae/plugin/recipe/tmux/ncurses.rb +24 -0
- data/lib/itamae/plugin/recipe/tmux/tmux.rb +24 -0
- data/lib/itamae/plugin/recipe/tmux/version.rb +9 -0
- metadata +86 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ed78d01a743cf8e09fc0910c9f419ee4952e01ab
|
4
|
+
data.tar.gz: 13947b8654021afd75086012f23fd061c4328c1b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 002be34a8b05f2ba4335b8557912f72851759395588336dcf7582d3719911b12a21e50ea258f180d6a69db1ac465393f6a70bf8e9bbf11fb41535dbe0d9a3aca
|
7
|
+
data.tar.gz: 525128ba399222c9c84d643378fc70e422ecd0c5234f67bf9eef4d6b8a6e069d331bbbc5ad194621152512e2029edeb25d9eed6270f50fa38c3902cfb4b7e665
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 sue445
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
# Itamae::Plugin::Recipe::Tmux
|
2
|
+
|
3
|
+
[Itamae](https://github.com/itamae-kitchen/itamae) plugin to install [tmux](https://tmux.github.io/) without any packages
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'itamae-plugin-recipe-tmux'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install itamae-plugin-recipe-tmux
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
### Recipe
|
23
|
+
```ruby
|
24
|
+
# recipe.rb
|
25
|
+
|
26
|
+
# itamae v1.5.2 or later
|
27
|
+
include_recipe "tmux"
|
28
|
+
|
29
|
+
# older
|
30
|
+
include_recipe "tmux::default"
|
31
|
+
```
|
32
|
+
|
33
|
+
### Node
|
34
|
+
```yml
|
35
|
+
# node.yml
|
36
|
+
tmux:
|
37
|
+
# tmux prefix (default: /home/<username>/local)
|
38
|
+
prefix: /usr/local
|
39
|
+
|
40
|
+
# install version (default: 2.1)
|
41
|
+
version: 2.1
|
42
|
+
|
43
|
+
libevent:
|
44
|
+
# install version (default: 2.0.22)
|
45
|
+
version: 2.0.22
|
46
|
+
|
47
|
+
ncurses:
|
48
|
+
# install version (default: 6.0)
|
49
|
+
version: 6.0
|
50
|
+
```
|
51
|
+
|
52
|
+
## Development
|
53
|
+
|
54
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
55
|
+
|
56
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
57
|
+
|
58
|
+
## Contributing
|
59
|
+
|
60
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/sue445/itamae-plugin-recipe-tmux.
|
61
|
+
|
62
|
+
|
63
|
+
## License
|
64
|
+
|
65
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
66
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "itamae/plugin/recipe/tmux"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'itamae/plugin/recipe/tmux/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "itamae-plugin-recipe-tmux"
|
8
|
+
spec.version = Itamae::Plugin::Recipe::Tmux::VERSION
|
9
|
+
spec.authors = ["sue445"]
|
10
|
+
spec.email = ["sue445@sue445.net"]
|
11
|
+
|
12
|
+
spec.summary = %q{Itamae plugin to install tmux without any packages}
|
13
|
+
spec.description = %q{Itamae plugin to install tmux without any packages}
|
14
|
+
spec.homepage = "https://github.com/sue445/itamae-plugin-recipe-tmux"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.11"
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
username = run_command("whoami").stdout.strip
|
2
|
+
|
3
|
+
node.reverse_merge!(
|
4
|
+
tmux: {
|
5
|
+
version: "2.1",
|
6
|
+
prefix: "/home/#{username}/local",
|
7
|
+
},
|
8
|
+
libevent: {
|
9
|
+
version: "2.0.22",
|
10
|
+
},
|
11
|
+
ncurses: {
|
12
|
+
version: "6.0",
|
13
|
+
}
|
14
|
+
)
|
15
|
+
|
16
|
+
# via. http://minomawari.jp/2014/04/09/how-to-install-tmux-for-non-root-users/
|
17
|
+
# via. http://qiita.com/ikai/items/8cb49aad82351881a583
|
18
|
+
include_recipe "./libevent"
|
19
|
+
include_recipe "./ncurses"
|
20
|
+
include_recipe "./tmux"
|
@@ -0,0 +1,24 @@
|
|
1
|
+
directory "#{node[:tmux][:prefix]}/src"
|
2
|
+
|
3
|
+
check_command = "ls #{node[:tmux][:prefix]}/lib/libevent.a"
|
4
|
+
|
5
|
+
[
|
6
|
+
"wget https://github.com/libevent/libevent/releases/download/release-#{node[:libevent][:version]}-stable/libevent-#{node[:libevent][:version]}-stable.tar.gz",
|
7
|
+
"tar zxf libevent-#{node[:libevent][:version]}-stable.tar.gz",
|
8
|
+
].each do |command|
|
9
|
+
execute command do
|
10
|
+
cwd "#{node[:tmux][:prefix]}/src"
|
11
|
+
not_if check_command
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
[
|
16
|
+
"./configure --prefix=#{node[:tmux][:prefix]}",
|
17
|
+
"make",
|
18
|
+
"make install",
|
19
|
+
].each do |command|
|
20
|
+
execute command do
|
21
|
+
cwd "#{node[:tmux][:prefix]}/src/libevent-#{node[:libevent][:version]}-stable"
|
22
|
+
not_if check_command
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
directory "#{node[:tmux][:prefix]}/src"
|
2
|
+
|
3
|
+
check_command = "ls #{node[:tmux][:prefix]}/include/ncurses"
|
4
|
+
|
5
|
+
[
|
6
|
+
"wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-#{node[:ncurses][:version]}.tar.gz",
|
7
|
+
"tar zxf ncurses-#{node[:ncurses][:version]}.tar.gz",
|
8
|
+
].each do |command|
|
9
|
+
execute command do
|
10
|
+
cwd "#{node[:tmux][:prefix]}/src"
|
11
|
+
not_if check_command
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
[
|
16
|
+
"./configure --prefix=#{node[:tmux][:prefix]}",
|
17
|
+
"make",
|
18
|
+
"make install",
|
19
|
+
].each do |command|
|
20
|
+
execute command do
|
21
|
+
cwd "#{node[:tmux][:prefix]}/src/ncurses-#{node[:ncurses][:version]}"
|
22
|
+
not_if check_command
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
directory "#{node[:tmux][:prefix]}/src"
|
2
|
+
|
3
|
+
check_command = "#{node[:tmux][:prefix]}/bin/tmux -V | grep #{node[:tmux][:version]}"
|
4
|
+
|
5
|
+
[
|
6
|
+
"wget https://github.com/tmux/tmux/releases/download/#{node[:tmux][:version]}/tmux-#{node[:tmux][:version]}.tar.gz",
|
7
|
+
"tar zxf tmux-#{node[:tmux][:version]}.tar.gz",
|
8
|
+
].each do |command|
|
9
|
+
execute command do
|
10
|
+
cwd "#{node[:tmux][:prefix]}/src"
|
11
|
+
not_if check_command
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
[
|
16
|
+
"./configure --prefix=#{node[:tmux][:prefix]} LDFLAGS='-L#{node[:tmux][:prefix]}/lib' CFLAGS='-I#{node[:tmux][:prefix]}/include'",
|
17
|
+
"make",
|
18
|
+
"make install",
|
19
|
+
].each do |command|
|
20
|
+
execute command do
|
21
|
+
cwd "#{node[:tmux][:prefix]}/src/tmux-#{node[:tmux][:version]}"
|
22
|
+
not_if check_command
|
23
|
+
end
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: itamae-plugin-recipe-tmux
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- sue445
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-02-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.11'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.11'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
description: Itamae plugin to install tmux without any packages
|
42
|
+
email:
|
43
|
+
- sue445@sue445.net
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".gitignore"
|
49
|
+
- Gemfile
|
50
|
+
- LICENSE.txt
|
51
|
+
- README.md
|
52
|
+
- Rakefile
|
53
|
+
- bin/console
|
54
|
+
- bin/setup
|
55
|
+
- itamae-plugin-recipe-tmux.gemspec
|
56
|
+
- lib/itamae/plugin/recipe/tmux.rb
|
57
|
+
- lib/itamae/plugin/recipe/tmux/default.rb
|
58
|
+
- lib/itamae/plugin/recipe/tmux/libevent.rb
|
59
|
+
- lib/itamae/plugin/recipe/tmux/ncurses.rb
|
60
|
+
- lib/itamae/plugin/recipe/tmux/tmux.rb
|
61
|
+
- lib/itamae/plugin/recipe/tmux/version.rb
|
62
|
+
homepage: https://github.com/sue445/itamae-plugin-recipe-tmux
|
63
|
+
licenses:
|
64
|
+
- MIT
|
65
|
+
metadata: {}
|
66
|
+
post_install_message:
|
67
|
+
rdoc_options: []
|
68
|
+
require_paths:
|
69
|
+
- lib
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
requirements: []
|
81
|
+
rubyforge_project:
|
82
|
+
rubygems_version: 2.5.1
|
83
|
+
signing_key:
|
84
|
+
specification_version: 4
|
85
|
+
summary: Itamae plugin to install tmux without any packages
|
86
|
+
test_files: []
|