rdup: 1.1.14 (new formula)
Closes Homebrew/homebrew#16617. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
1bf78f6793
commit
f758ce9452
1 changed files with 48 additions and 0 deletions
48
Formula/rdup.rb
Normal file
48
Formula/rdup.rb
Normal file
|
@ -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
|
Loading…
Reference in a new issue