Skip to content

Instantly share code, notes, and snippets.

@yssk22
Created January 3, 2012 05:04
Show Gist options
  • Select an option

  • Save yssk22/1553571 to your computer and use it in GitHub Desktop.

Select an option

Save yssk22/1553571 to your computer and use it in GitHub Desktop.
pt2 installation recipe on ubuntu 10.04
# install prerequisites
%w(libpcsclite-dev build-essential autoconf pcsc-tools pcscd).each do |p|
package p do
action :install
end
end
package "linux-headers-#{`uname -r`}" do
action :install
end
# add blacklist to make /dev/pt1video* enabled
bash "make /dev/pt1video*" do
code <<-EOS
cat /etc/modprobe.d/blacklist.conf | grep earth-pt1 || echo 'blacklist earth-pt1' >> /etc/modprobe.d/blacklist.conf
EOS
end
# prepare pt1 source
directory "/tmp/pt1-src" do
owner "root"
mode "0755"
end
%w(pt1.tar.gz arib25.tar.gz).each do |archive|
cookbook_file "/tmp/pt1-src/#{archive}" do
source archive
end
bash "extract #{archive}" do
code "cd /tmp/pt1-src && tar zxvf #{archive}"
end
end
bash "install pt2 driver" do
code "cd /tmp/pt1-src/pt1/driver && make && make install"
end
bash "install arib25" do
code "cd /tmp/pt1-src/arib25/src && make && make install"
end
bash "install recpt1" do
code "cd /tmp/pt1-src/pt1/recpt1 && ./configure --enable-b25 && make && make install"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment