homebrew-core/Formula/duplicity.rb
2011-10-25 11:23:27 -07:00

27 lines
874 B
Ruby

require 'formula'
class Duplicity < Formula
url 'http://launchpad.net/duplicity/0.6-series/0.6.16/+download/duplicity-0.6.16.tar.gz'
homepage 'http://www.nongnu.org/duplicity/'
md5 '55996756a5bc9743add738cfcba2dda2'
depends_on 'librsync'
depends_on 'gnupg'
def install
ENV.universal_binary
# Install mostly into libexec
system "python", "setup.py", "install",
"--prefix=#{prefix}",
"--install-purelib=#{libexec}",
"--install-platlib=#{libexec}",
"--install-scripts=#{bin}"
# Shift files around to avoid needing a PYTHONPATH
system "mv #{bin}/duplicity #{bin}/duplicity.py"
system "mv #{bin}/* #{libexec}"
# Symlink the executables
ln_s "#{libexec}/duplicity.py", "#{bin}/duplicity"
ln_s "#{libexec}/rdiffdir", "#{bin}/rdiffdir"
end
end