homebrew-core/Formula/bagit.rb

26 lines
754 B
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Bagit < Formula
2014-02-27 05:00:40 +00:00
homepage 'https://github.com/LibraryOfCongress/bagit-java'
url 'https://github.com/LibraryOfCongress/bagit-java/releases/download/bagit-4.8.1/bagit-4.8.1-bin.zip'
sha1 'a5f42372dcbe75f44d9181dd8edc8e6f18b68ec9'
skip_clean 'logs'
def install
prefix.install %w{conf logs}
2012-02-26 00:53:55 +00:00
libexec.install Dir['lib/*']
2012-02-26 00:53:55 +00:00
# Point to libexec, and move conf file
inreplace "bin/bag" do |s|
s.gsub! "$APP_HOME/lib", "$APP_HOME/libexec"
s.gsub! "/bin/$APP_NAME.classworlds.conf", "/conf/$APP_NAME.classworlds.conf"
end
inreplace "bin/bag.classworlds.conf", "${app.home}/lib", "${app.home}/libexec"
2012-02-26 00:53:55 +00:00
bin.install 'bin/bag'
(prefix+'conf').install 'bin/bag.classworlds.conf'
end
end