crafterm / sprinkle

Sprinkle is a software provisioning tool you can use to build remote servers with. eg. to install a Rails, or Sinatra stack on a brand new slice directly after its been created

This URL has Read+Write access

commit  57e2535df3fe66c630cd9446129bea89cbfcd5d0
tree    fe9cbd6fb37ff2b16620bb767f92174826466529
parent  c4ae194f64bf004988a79bdcfa8d1d81dd190fc0
sprinkle / lib / sprinkle / installers / bsd_port.rb
100644 33 lines (29 sloc) 0.756 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
module Sprinkle
  module Installers
    # = OpenBSD and FreeBSD Port Installer
    #
    # The Port installer installs OpenBSD and FreeBSD ports.
    # Before usage, the ports sytem must be installed and
    # read on the target operating system.
    #
    # == Example Usage
    #
    # Installing the magic_beans port.
    #
    # package :magic_beans do
    # bsd_port 'magic/magic_beans'
    # end
    #
    class BsdPort < Installer
      attr_accessor :port #:nodoc:
 
      def initialize(parent, port, &block) #:nodoc:
        super parent, &block
        @port = port
      end
 
      protected
 
        def install_commands #:nodoc:
          "sh -c 'cd /usr/ports/#{@port} && make BATCH=yes install clean'"
        end
 
    end
  end
end