agilelamp-driver 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest.txt CHANGED
@@ -3,6 +3,7 @@ License.txt
3
3
  Manifest.txt
4
4
  README.txt
5
5
  Rakefile
6
+ bin/install-agilelamp-driver
6
7
  config/hoe.rb
7
8
  config/requirements.rb
8
9
  script/console
@@ -10,8 +11,8 @@ script/destroy
10
11
  script/generate
11
12
  script/txt2html
12
13
  setup.rb
13
- bin/agilelamp-driver
14
14
  lib/agilelamp-driver.rb
15
+ src/agilelamp-driver
15
16
  src/agilelamp.c
16
17
  src/Makefile
17
18
  src/44-usblamp.rules
@@ -0,0 +1,85 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'fileutils'
4
+ include FileUtils
5
+
6
+ unless `uname`.strip == 'Linux'
7
+ puts <<EOF
8
+
9
+ This release is only tested for Linux, and really only for Debian-type systems.
10
+ If you are using MacOS it will almost certainly not work.
11
+ Continue? (y/n)
12
+
13
+ EOF
14
+
15
+ char = STDIN.getc
16
+ exit unless char.chr == 'y'
17
+ end
18
+
19
+ unless `whoami`.strip == 'root'
20
+ puts "You need to be sudo for this to work."
21
+ exit
22
+ end
23
+
24
+ gem_dir = `gem which agilelamp-driver`
25
+ parts = gem_dir.split.last.split("/")[0..-3]
26
+ cd parts.join("/")
27
+
28
+ cd "src"
29
+ success = system "make"
30
+ unless success
31
+ puts <<EOF
32
+
33
+ ******************************************************************************
34
+ Couldn't make agilelamp-driver. It's possible that the precompiled binary will
35
+ work for you (on Linux but not MacOS). Continuing..."
36
+ ******************************************************************************
37
+
38
+ EOF
39
+
40
+ end
41
+
42
+ puts "Installing agilelamp-driver to /usr/local/bin..."
43
+
44
+ begin
45
+ cp "agilelamp-driver", "/usr/local/bin/agilelamp-driver"
46
+ rescue
47
+ puts <<EOF
48
+
49
+ **************************************************************************
50
+ Couldn't copy agilelamp-driver to /usr/local/bin/. This shouldn't happen.
51
+ **************************************************************************
52
+
53
+ EOF
54
+
55
+ end
56
+
57
+ cd ".."
58
+ cd "src"
59
+
60
+ begin
61
+ puts "Installing udev rule..."
62
+ cp "44-usblamp.rules", "/etc/udev/rules.d"
63
+ rescue
64
+ if `uname`.strip == 'Linux'
65
+ puts "Couldn't install 44-usblamp.rules to /etc/udev/rules.d"
66
+ end
67
+ end
68
+
69
+ begin
70
+ puts "Attempting to restart udev..."
71
+ system "/etc/init.d/udev restart"
72
+ rescue
73
+ puts "Couldn't restart udev"
74
+ end
75
+
76
+ puts <<EOF
77
+
78
+ To run agilelamp-driver use:
79
+
80
+ agilelamp-driver red # red light
81
+ agilelamp-driver green # green light
82
+ agilelamp-driver bell # unpleasant bell sound
83
+ agilelamp-driver various # cycling colors
84
+
85
+ EOF
data/config/hoe.rb CHANGED
@@ -35,7 +35,7 @@ REV = nil
35
35
  # UNCOMMENT IF REQUIRED:
36
36
  # REV = YAML.load(`svn info`)['Revision']
37
37
  #VERS = Agilelamp-driver::VERSION::STRING + (REV ? ".#{REV}" : "")
38
- VERS = "0.1.1"
38
+ VERS = "0.1.2"
39
39
  RDOC_OPTS = ['--quiet', '--title', 'agilelamp-driver documentation',
40
40
  "--opname", "index.html",
41
41
  "--line-numbers",
File without changes
@@ -26,48 +26,48 @@ task :install_gem_no_doc => [:clean, :package] do
26
26
  sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
27
27
  end
28
28
 
29
- task :make_agilelamp_bin do
30
- cd "src/"
31
- begin
32
- sh "make"
33
- cp "agilelamp-driver", "../bin"
34
- rescue
35
- puts <<EOF
29
+ #task :make_agilelamp_bin do
30
+ # cd "src/"
31
+ # begin
32
+ # sh "make"
33
+ # cp "agilelamp-driver", "../bin"
34
+ # rescue
35
+ # puts <<EOF
36
+ #
37
+ #******************************************************************************
38
+ #Couldn't compile for your architecture. Precompiled binary may still work. If
39
+ #not, try installing libusb headers (compile and install libusb from source or
40
+ #get libusb-dev on debian systems)."
41
+ #******************************************************************************
42
+ #
43
+ #EOF
44
+ # end
45
+ # cd "../"
46
+ #end
36
47
 
37
- ******************************************************************************
38
- Couldn't compile for your architecture. Precompiled binary may still work. If
39
- not, try installing libusb headers (compile and install libusb from source or
40
- get libusb-dev on debian systems)."
41
- ******************************************************************************
48
+ #task :install_udev_rule do
49
+ # begin
50
+ # if `uname`.strip == 'Linux'
51
+ # puts "Installing udev rule to enable hardware use on Linux"
52
+ # cp "src/44-usblamp.rules", "/etc/udev/rules.d/"
53
+ # puts "Restarting udev..."
54
+ # sh "/etc/init.d/udev restart"
55
+ # end
56
+ # rescue
57
+ # puts <<EOF
42
58
 
43
- EOF
44
- end
45
- cd "../"
46
- end
59
+ #****************************************************************************
60
+ #Couldn't install udev rules for the USB lamp. Expected to be able to put file
61
+ #in /etc/udev/rules.d/. Was this a bad assumption?
62
+ #****************************************************************************
47
63
 
48
- task :install_udev_rule do
49
- begin
50
- if `uname`.strip == 'Linux'
51
- puts "Installing udev rule to enable hardware use on Linux"
52
- cp "src/44-usblamp.rules", "/etc/udev/rules.d/"
53
- puts "Restarting udev..."
54
- sh "/etc/init.d/udev restart"
55
- end
56
- rescue
57
- puts <<EOF
64
+ #EOF
65
+ # end
66
+ #end
58
67
 
59
- ****************************************************************************
60
- Couldn't install udev rules for the USB lamp. Expected to be able to put file
61
- in /etc/udev/rules.d/. Was this a bad assumption?
62
- ****************************************************************************
63
-
64
- EOF
65
- end
66
- end
67
-
68
- task :install_gem => [:clean, :make_agilelamp_bin, :package, :install_udev_rule, ] do
69
- sh "#{'sudo ' unless Hoe::WINDOZE}gem install --no-wrappers --local pkg/*.gem"
70
- end
68
+ #task :install_gem => [:clean, :make_agilelamp_bin, :package, :install_udev_rule, ] do
69
+ # sh "#{'sudo ' unless Hoe::WINDOZE}gem install --no-wrappers --local pkg/*.gem"
70
+ #end
71
71
 
72
72
  namespace :manifest do
73
73
  desc 'Recreate Manifest.txt to include ALL files'
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agilelamp-driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Method
@@ -30,7 +30,7 @@ cert_chain:
30
30
  5VG+ZA==
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2008-05-22 00:00:00 -04:00
33
+ date: 2008-05-25 00:00:00 -04:00
34
34
  default_executable:
35
35
  dependencies: []
36
36
 
@@ -38,7 +38,7 @@ description: Userland driver for USB Agile Lamp
38
38
  email:
39
39
  - tristil@gmail.com
40
40
  executables:
41
- - agilelamp-driver
41
+ - install-agilelamp-driver
42
42
  extensions: []
43
43
 
44
44
  extra_rdoc_files:
@@ -53,6 +53,7 @@ files:
53
53
  - Manifest.txt
54
54
  - README.txt
55
55
  - Rakefile
56
+ - bin/install-agilelamp-driver
56
57
  - config/hoe.rb
57
58
  - config/requirements.rb
58
59
  - script/console
@@ -60,8 +61,8 @@ files:
60
61
  - script/generate
61
62
  - script/txt2html
62
63
  - setup.rb
63
- - bin/agilelamp-driver
64
64
  - lib/agilelamp-driver.rb
65
+ - src/agilelamp-driver
65
66
  - src/agilelamp.c
66
67
  - src/Makefile
67
68
  - src/44-usblamp.rules
@@ -77,7 +78,13 @@ files:
77
78
  - website/template.html.erb
78
79
  has_rdoc: true
79
80
  homepage: http://agilelamp.rubyforge.org
80
- post_install_message: ""
81
+ post_install_message: |
82
+ ********************************************************************
83
+
84
+ Run ` install-agilelamp-driver ` with sudo to complete installation.
85
+
86
+ ********************************************************************
87
+
81
88
  rdoc_options:
82
89
  - --main
83
90
  - README.txt
metadata.gz.sig CHANGED
Binary file