Permalink
Browse files

Initial version of SBT (Simple Build Tool) 0.10 cookbook

Kudos to Przemek Pokrywka for open sourcing SBT .deb packages builder
(https://github.com/przemek-pokrywka/sbt-installer-ubuntizer). I used to it
build the .deb.
  • Loading branch information...
1 parent 2d4a4ff commit fa264ea04e2dae591f2db3d86d3716325f08efbb @michaelklishin michaelklishin committed Aug 1, 2011
View
3 vagrant_base/sbt/README.md
@@ -0,0 +1,3 @@
+# DESCRIPTION:
+
+Installs SBT (Simple Build Tool) for building Scala and Java projects.
View
BIN vagrant_base/sbt/files/default/sbt-0.10.1.deb
Binary file not shown.
View
32 vagrant_base/sbt/metadata.json
@@ -0,0 +1,32 @@
+{
+ "recipes": {
+ },
+ "conflicting": {
+ },
+ "license": "Apache 2.0",
+ "long_description": "= DESCRIPTION:\n\nInstalls Leiningen for building Clojure projects.\n\nRetrieve shell script, install jar files.\n",
+ "providing": {
+ },
+ "platforms": {
+ },
+ "maintainer": "Michael S. Klishin",
+ "replacing": {
+ },
+ "attributes": {
+ },
+ "maintainer_email": "michael.s.klishin@gmail.com",
+ "description": "Installs SBT (Simple Build Tool) 0.10.x for building Scala and Java projects.",
+ "groupings": {
+ },
+ "version": "1.0.0",
+ "recommendations": {
+ },
+ "name": "sbt",
+ "dependencies": {
+ "java": [
+
+ ]
+ },
+ "suggestions": {
+ }
+}
View
8 vagrant_base/sbt/metadata.rb
@@ -0,0 +1,8 @@
+maintainer "Michael S. Klishin"
+maintainer_email "michael.s.klishin@gmail.com"
+license "Apache 2.0"
+description "Installs SBT (Simple Build Tool) 0.10.x for building Scala and Java projects."
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
+version "1.0.0"
+platforms
+depends "java"
View
42 vagrant_base/sbt/recipes/default.rb
@@ -0,0 +1,42 @@
+#
+# Cookbook Name:: sbt
+# Recipe:: default
+#
+# Copyright 2011, Michael S. Klishin
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+include_recipe "java"
+
+require "tmpdir"
+
+tmp = Dir.tmpdir
+case node[:platform]
+when "debian", "ubuntu"
+ # this assumes 32-bit base Vagrant box.
+ # built via brew2deb, http://bit.ly/brew2deb. MK.
+ %w(sbt-0.10.1.deb).each do |deb|
+ path = File.join(tmp, deb)
+
+ cookbook_file(path) do
+ owner "vagrant"
+ group "vagrant"
+ end
+
+ package(deb) do
+ action :install
+ source path
+ provider Chef::Provider::Package::Dpkg
+ end
+ end # each
+end # case

0 comments on commit fa264ea

Please sign in to comment.