aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/rdup.rb
diff options
context:
space:
mode:
authors3+dev@sdfeu.org2012-12-17 10:23:55 +0100
committerMike McQuaid2013-02-02 14:19:36 -0800
commitd6ac079f97d0f3c727635a6b64d46ef450fedfe1 (patch)
treeb4588618defff91ea6aceb0ad3a4ca3d3dd02cc0 /Library/Formula/rdup.rb
parent40e9b90393024bc3c0308b743f8f7e196d529fa6 (diff)
downloadhomebrew-d6ac079f97d0f3c727635a6b64d46ef450fedfe1.tar.bz2
rdup: 1.1.14 (new formula)
Closes #16617. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula/rdup.rb')
-rw-r--r--Library/Formula/rdup.rb48
1 files changed, 48 insertions, 0 deletions
diff --git a/Library/Formula/rdup.rb b/Library/Formula/rdup.rb
new file mode 100644
index 000000000..8a5476e3e
--- /dev/null
+++ b/Library/Formula/rdup.rb
@@ -0,0 +1,48 @@
+require 'formula'
+
+class LibarchiveHeader < Formula
+ url 'https://raw.github.com/libarchive/libarchive/8076b31490c90aaf0edccecf760004c30bd95edc/libarchive/archive.h'
+ sha1 '03c57e135cad9ca9d52604324d798ca1115838ce'
+ version '3.0.4'
+end
+class LibarchiveEntryHeader < Formula
+ url 'https://raw.github.com/libarchive/libarchive/8076b31490c90aaf0edccecf760004c30bd95edc/libarchive/archive_entry.h'
+ sha1 '7eaee18321409fbb249cb59e9997757c740d7ecf'
+ version '3.0.4'
+end
+
+class Rdup < Formula
+ homepage 'http://miek.nl/projects/rdup/index.html'
+ url 'http://miek.nl/projects/rdup/rdup-1.1.14.tar.bz2'
+ sha1 '49dc7570122bfa362f36a26a2ffa8bfe8ad55182'
+
+ depends_on 'automake' => :build
+ depends_on 'nettle'
+ depends_on 'pcre'
+ depends_on 'glib'
+
+ def install
+ ENV.deparallelize
+ # to pick up locally downloaded libarchive headers
+ ENV.append 'CFLAGS', "-I."
+
+ system "./configure", "--prefix=#{prefix}"
+
+ # let rdup know that we actually have dirfd
+ system "echo '#define HAVE_DIRFD 1' >> config.h"
+
+ # get required libarchive headers (they don't come with OS X,
+ # although libarchive itself is there)
+ LibarchiveHeader.new.brew { cp "archive.h", buildpath }
+ LibarchiveEntryHeader.new.brew { cp "archive_entry.h", buildpath }
+
+ system "make", "install"
+ end
+
+ def test
+ # tell rdup to archive itself, then let rdup-tr make a tar archive of it,
+ # and test with tar and grep whether the resulting tar archive actually
+ # contains rdup
+ system "#{bin}/rdup /dev/null #{bin}/rdup | #{bin}/rdup-tr -O tar | tar tvf - | grep #{bin}/rdup"
+ end
+end