Skip to content

Commit

Permalink
rdup 1.1.15
Browse files Browse the repository at this point in the history
- 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#49674.

Signed-off-by: Alex Dunn <[email protected]>
  • Loading branch information
ilovezfs authored and dunn committed Mar 3, 2016
1 parent ffa00b3 commit 961b6c9
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions Library/Formula/rdup.rb
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -12,20 +12,37 @@ 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"
depends_on "glib"
depends_on "libarchive"
depends_on "mcrypt"

def install
ENV.deparallelize
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
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
Expand Down

0 comments on commit 961b6c9

Please sign in to comment.