Skip to content

Instantly share code, notes, and snippets.

@derFunk
Created January 27, 2015 15:00
Show Gist options
  • Save derFunk/93702c335a18e53e5f6a to your computer and use it in GitHub Desktop.
Save derFunk/93702c335a18e53e5f6a to your computer and use it in GitHub Desktop.

Revisions

  1. derFunk created this gist Jan 27, 2015.
    21 changes: 21 additions & 0 deletions bacula-fd.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    require 'formula'
    class BaculaFd < Formula
    homepage 'http://www.bacula.org/'
    # you may exchange this download url to match the correct bacula source code, if Debian once updates it's own package
    url 'http://downloads.sourceforge.net/project/bacula/z-older-releases/5.2.6/bacula-5.2.6.tar.gz'

    def install
    system "./configure", "--prefix=#{prefix}",
    "--sbindir=#{bin}",
    "--with-working-dir=#{var}/lib/bacula",
    "--with-pid-dir=#{HOMEBREW_PREFIX}/var/run",
    "--enable-client-only",
    "--disable-conio"
    system "make"
    system "make install"
    # Ensure var/run exists:
    (var + 'run').mkpath
    # Create the working directory:
    (var + 'lib/bacula').mkpath
    end
    end