diff options
| author | Baptiste Fontaine | 2015-04-11 12:43:32 +0200 |
|---|---|---|
| committer | Xu Cheng | 2015-04-12 02:11:06 +0800 |
| commit | c0c265d39bc4d06dbdb360a9985f8286404aa938 (patch) | |
| tree | 048b358ad5be9455ccc2a17e53398b9246445e68 /Library | |
| parent | 5cbc1ec7c25395d76946c64aa1fdc993be89f074 (diff) | |
| download | homebrew-c0c265d39bc4d06dbdb360a9985f8286404aa938.tar.bz2 | |
rmtrash: basic test added
Closes #38548.
Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/rmtrash.rb | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/Library/Formula/rmtrash.rb b/Library/Formula/rmtrash.rb index 565b2f520..d5f5640c6 100644 --- a/Library/Formula/rmtrash.rb +++ b/Library/Formula/rmtrash.rb @@ -1,14 +1,23 @@ -require 'formula' - class Rmtrash < Formula - homepage 'http://www.nightproductions.net/cli.htm' - url 'http://www.nightproductions.net/downloads/rmtrash_source.tar.gz' - sha1 '3e24ca03c2aadcb804681b4790177569ac83a8c6' - version '0.3.3' + homepage "http://www.nightproductions.net/cli.htm" + url "http://www.nightproductions.net/downloads/rmtrash_source.tar.gz" + sha256 "9b30561454529e5923ffb62327d3fe009d23495263efc958534ac6b637e361d6" + version "0.3.3" def install - system "make LDFLAGS='-framework Foundation -prebind' all" - man1.install gzip("rmtrash.1") - bin.install "rmtrash" + # don't install as root + inreplace "Makefile", "-o root -g wheel", "" + # install manpages under share/man/ + inreplace "Makefile", "${DESTDIR}/man", "${DESTDIR}/share/man" + + bin.mkpath + man1.mkpath + + system "make", "CC=#{ENV.cc}", "LDFLAGS=-framework Foundation -prebind" + system "make", "install", "DESTDIR=#{prefix}" + end + + test do + system "#{bin}/rmtrash", "-h" end end |
