Initial version of arduino module.
This commit is contained in:
parent
f6f4ed8711
commit
516c08d91b
2 changed files with 57 additions and 0 deletions
16
arduino/Makefile
Normal file
16
arduino/Makefile
Normal 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
41
arduino/manifests/init.pp
Normal 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"],
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue