aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominyk Tiller2014-11-02 23:56:36 +0000
committerMike McQuaid2014-11-06 08:33:06 +0000
commit5495b7d07707996e89d3f36bc01988d72ef835d2 (patch)
tree4839bf2cfbb6b49489f6e9682ec33ea1499ad793
parent65abfd7853a4d6c959be375f17940cfa9d5e70d8 (diff)
downloadhomebrew-5495b7d07707996e89d3f36bc01988d72ef835d2.tar.bz2
aescrypt-packetizer 3.0.9 (new formula)
Closes #32846.
-rw-r--r--Library/Formula/aescrypt-packetizer.rb64
1 files changed, 64 insertions, 0 deletions
diff --git a/Library/Formula/aescrypt-packetizer.rb b/Library/Formula/aescrypt-packetizer.rb
new file mode 100644
index 000000000..2b96bdc60
--- /dev/null
+++ b/Library/Formula/aescrypt-packetizer.rb
@@ -0,0 +1,64 @@
+require "formula"
+
+class AescryptPacketizer < Formula
+ homepage "https://www.aescrypt.com"
+ url "https://www.aescrypt.com/download/v3/linux/aescrypt-3.0.9.tgz"
+ sha256 "3f3590f9b7e50039611ba9c0cf1cae1b188a44bd39cfc41553db7ec5709c0882"
+
+ head do
+ url "https://github.com/paulej/AESCrypt.git"
+
+ depends_on "automake" => :build
+ depends_on "autoconf" => :build
+ depends_on "libtool" => :build
+ end
+
+ depends_on :xcode => :build
+
+ option "with-default-names", "Build with the binaries named as expected upstream"
+
+ def install
+ if build.head?
+ cd "linux"
+ system "autoreconf", "-ivf"
+ system "./configure", "prefix=#{prefix}", "--enable-iconv",
+ "--disable-gui"
+ system "make", "install"
+ end
+
+ if build.stable?
+ cd "src"
+ # https://www.aescrypt.com/mac_aes_crypt.html
+ inreplace "Makefile", "#LIBS=-liconv", "LIBS=-liconv"
+ system "make", "prefix=#{prefix}"
+
+ bin.install "aescrypt"
+ bin.install "aescrypt_keygen"
+ end
+
+ # To prevent conflict with our other aescrypt, rename the binaries.
+ if build.without? "default-names"
+ mv "#{bin}/aescrypt", "#{bin}/paescrypt"
+ mv "#{bin}/aescrypt_keygen", "#{bin}/paescrypt_keygen"
+ end
+ end
+
+ def caveats; <<-EOS.undent
+ To avoid conflicting with our other AESCrypt package the binaries
+ have been renamed paescrypt and paescrypt_keygen, unless you chose
+ to exercise the default-names option.
+ EOS
+ end
+
+ test do
+ path = testpath/"secret.txt"
+ original_contents = "What grows when it eats, but dies when it drinks?"
+ path.write original_contents
+
+ system bin/"paescrypt", "-e", "-p", "fire", path
+ assert File.exist?("#{path}.aes")
+
+ system bin/"paescrypt", "-d", "-p", "fire", "#{path}.aes"
+ assert_equal original_contents, path.read
+ end
+end