Initial version of arduino module.

This commit is contained in:
Timo Mkinen 2011-08-05 11:24:13 +03:00
parent f6f4ed8711
commit 516c08d91b
2 changed files with 57 additions and 0 deletions

16
arduino/Makefile Normal file
View file

@ -0,0 +1,16 @@
VERSION = 0022
BASEURL = http://arduino.googlecode.com/files/
OUT = /srv/puppet/files/common/packages
all: $(OUT)/arduino32.tgz $(OUT)/arduino64.tgz
$(OUT)/arduino32.tgz:
@umask 022
cd $(OUT) && wget -nv -N $(BASEURL)/arduino-$(VERSION).tgz && \
ln -sf arduino-$(VERSION).tgz arduino32.tgz
$(OUT)/arduino64.tgz:
@umask 022
cd $(OUT) && wget -nv -N $(BASEURL)/arduino-$(VERSION)-64-2.tgz && \
ln -sf arduino-$(VERSION)-64-2.tgz arduino64.tgz

41
arduino/manifests/init.pp Normal file
View file

@ -0,0 +1,41 @@
# Install Arduino development tools
#
class arduino {
package { [ "uisp",
"avr-libc",
"avr-gcc-c++",
"rxtx",
"avrdude", ]:
ensure => installed,
}
case $architecture {
"x86_64": { $bits = "64" }
default: { $bits = "32" }
}
file { "/usr/local/src/arduino.tgz":
ensure => present,
source => "puppet:///files/packages/arduino${bits}.tgz",
links => follow,
mode => 0644,
owner => "root",
group => "root",
}
util::extract::tar { "/usr/local/lib/arduino":
strip => 1,
source => "/usr/local/src/arduino.tgz",
require => File["/usr/local/src/arduino.tgz"],
}
file { "/usr/bin/arduino":
ensure => link,
target => "/usr/local/lib/arduino/arduino",
owner => "root",
group => "root",
require => Util::Extract::Tar["/usr/local/lib/arduino"],
}
}