2012-12-12 12:53:51 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Irods < Formula
|
|
|
|
homepage 'https://www.irods.org'
|
2013-11-25 13:57:23 +00:00
|
|
|
url 'https://github.com/irods/irods-legacy/archive/3.3.tar.gz'
|
|
|
|
sha1 '2e975fcda20b023155dfd53ff098dde0c3995f75'
|
2012-12-12 12:53:51 +00:00
|
|
|
|
2013-11-10 07:04:58 +00:00
|
|
|
conflicts_with 'sleuthkit', :because => 'both install `ils`'
|
|
|
|
|
2014-01-24 10:20:56 +00:00
|
|
|
option 'with-osxfuse', 'Install iRODS FUSE client'
|
2012-12-12 12:53:51 +00:00
|
|
|
|
2014-01-24 10:20:56 +00:00
|
|
|
depends_on 'osxfuse' => :optional
|
2012-12-12 12:53:51 +00:00
|
|
|
|
|
|
|
def install
|
2013-11-25 13:57:23 +00:00
|
|
|
chdir 'iRODS'
|
|
|
|
system './scripts/configure'
|
|
|
|
|
|
|
|
# include PAM authentication by default
|
|
|
|
inreplace 'config/config.mk', '# PAM_AUTH = 1', 'PAM_AUTH = 1'
|
|
|
|
inreplace 'config/config.mk', '# USE_SSL = 1', 'USE_SSL = 1'
|
|
|
|
|
|
|
|
system 'make'
|
2012-12-12 12:53:51 +00:00
|
|
|
|
|
|
|
bin.install Dir['clients/icommands/bin/*'].select {|f| File.executable? f}
|
|
|
|
|
2014-01-24 10:20:56 +00:00
|
|
|
# patch in order to use osxfuse
|
|
|
|
if build.with? 'osxfuse'
|
2012-12-12 12:53:51 +00:00
|
|
|
inreplace 'config/config.mk', '# IRODS_FS = 1', 'IRODS_FS = 1'
|
|
|
|
inreplace 'config/config.mk', 'fuseHomeDir=/home/mwan/adil/fuse-2.7.0', "fuseHomeDir=#{HOMEBREW_PREFIX}"
|
|
|
|
chdir 'clients/fuse' do
|
2014-01-24 10:20:56 +00:00
|
|
|
inreplace 'Makefile', 'lfuse', 'losxfuse'
|
|
|
|
inreplace 'Makefile', '-I$(fuseHomeDir)/include', '-I$(fuseHomeDir)/include/osxfuse'
|
2013-11-25 13:57:23 +00:00
|
|
|
system 'make'
|
2012-12-12 12:53:51 +00:00
|
|
|
end
|
|
|
|
bin.install Dir['clients/fuse/bin/*'].select {|f| File.executable? f}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
|
|
|
system "#{bin}/ipwd"
|
|
|
|
end
|
|
|
|
end
|