require 'formula'
class Osxutils < Formula
# begin cfg changes
# this `trash` is much better
depends_on 'trash'
# end cfg changes
homepage 'https://github.com/vasi/osxutils'
url 'https://github.com/vasi/osxutils/archive/v1.8.tar.gz'
sha1 'c3d20da36ecfae3abff07f482a572b3680a12b6d'
head 'https://github.com/vasi/osxutils.git'
def install
# begin cfg changes
# don't compile the trash script, the `trash` package is better
inreplace 'Makefile', /^(NAMES_SCRIPT\s+=\s+)(?:trash)?(\s*.*)\b(?:\s+(?:trash)?)\b(\s+.*)$/, '\1\2\3'
# rename the trash manpage so it won't automatically be installed
mv 'trash/trash.1', 'trash/trash.1.skip'
# end cfg changes
system 'make'
system 'make', "PREFIX=#{prefix}", 'install'
end
end