rdup 1.1.15

- 1.1.15 includes parallelization and HAVE_DIRFD fixes
- author now distributes the release as a source archive on GitHub
- switch homepage to GitHub since author's site no longer has rdup info
- `autoreconf` required because source archive doesn't include configure
- run `make check` optionally by passing `--with-test`

Closes Homebrew/homebrew#49674.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
This commit is contained in:
ilovezfs 2016-02-29 22:24:46 -08:00 committed by Xu Cheng
parent 83167e63f4
commit 0b48a9ab6d

View file

@ -1,9 +1,9 @@
class Rdup < Formula
desc "Utility to create a file list suitable for making backups"
homepage "https://archive.miek.nl/projects/rdup/"
url "https://archive.miek.nl/projects/rdup/rdup-1.1.14.tar.bz2"
sha256 "b25e2b0656d2e6a9cb97a37f493913c4156468d4c21cea15a9a0c7b353e3742a"
revision 2
homepage "https://github.com/miekg/rdup"
url "https://github.com/miekg/rdup/archive/1.1.15.tar.gz"
sha256 "787b8c37e88be810a710210a9d9f6966b544b1389a738aadba3903c71e0c29cb"
head "https://github.com/miekg/rdup.git"
bottle do
cellar :any
@ -12,6 +12,10 @@ class Rdup < Formula
sha256 "955fc1c20fd4d9daddef07f0cc4f8475f310040ed797ba0e00e1a76f91a74a46" => :mavericks
end
option "with-test", "Verify the build with `make check`"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "pkg-config" => :build
depends_on "nettle"
depends_on "pcre"
@ -19,13 +23,26 @@ class Rdup < Formula
depends_on "libarchive"
depends_on "mcrypt"
if build.with? "test"
depends_on "deja-gnu" => :build
depends_on "gnu-sed" => :build
depends_on "coreutils" => :build
depends_on "gnu-tar" => :build
end
def install
ENV.deparallelize
system "autoreconf", "-fiv"
system "./configure", "--prefix=#{prefix}"
system "make"
# let rdup know that we actually have dirfd
system "echo '#define HAVE_DIRFD 1' >> config.h"
if build.with? "test"
saved_path = ENV["PATH"]
ENV.prepend_path "PATH", Formula["gnu-sed"].opt_libexec/"gnubin"
ENV.prepend_path "PATH", Formula["coreutils"].opt_libexec/"gnubin"
ENV.prepend_path "PATH", Formula["gnu-tar"].opt_libexec/"gnubin"
system "make", "check"
ENV["PATH"] = saved_path
end
system "make", "install"
end