From c704f4388ef4d3fd364337b35828604cb050da4f Mon Sep 17 00:00:00 2001 From: "Eugene San (eugenesan)" Date: Fri, 7 Mar 2014 11:36:37 +0200 Subject: [PATCH] keepassc 1.6.2 KeePassC is a curses-based password manager comparable to KeePass v.1.x and KeePassX. Closes Homebrew/homebrew#27288. Signed-off-by: Adam Vandenberg --- Formula/keepassc.rb | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Formula/keepassc.rb diff --git a/Formula/keepassc.rb b/Formula/keepassc.rb new file mode 100644 index 0000000000..32bfbdde32 --- /dev/null +++ b/Formula/keepassc.rb @@ -0,0 +1,42 @@ +require "formula" + +class Keepassc < Formula + homepage "http://raymontag.github.com/keepassc/" + url "https://github.com/raymontag/keepassc/archive/1.6.0.tar.gz" + sha1 "a8d7d1456149bf798f4e5a5087c250883425bb9d" + + depends_on :python3 + + resource "pycrypto" do + # homepage "https://www.dlitz.net/software/pycrypto" + url "https://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.6.1.tar.gz" + sha1 "aeda3ed41caf1766409d4efc689b9ca30ad6aeb2" + end + + resource "kppy" do + # homepage "https://github.com/raymontag/kppy" + url "https://github.com/raymontag/kppy/archive/1.4.0.tar.gz" + sha1 "12dfad16a6dddf045e23b658b2446d16e0d267f5" + end + + def install + ENV.prepend_create_path 'PYTHONPATH', libexec+'lib/python3.4/site-packages' + install_args = [ "setup.py", "install", "--prefix=#{libexec}" ] + + resource("pycrypto").stage { system "python3", *install_args } + resource("kppy").stage { system "python3", *install_args } + + system "python3", *install_args + + man1.install Dir["*.1"] + + bin.install Dir[libexec/'bin/*'] + bin.env_script_all_files(libexec+'bin', :PYTHONPATH => ENV['PYTHONPATH']) + end + + test do + # Fetching help is the only non-interactive action we can perform, + # and since interactive actions are un-scriptable, there nothing more we can do. + system "#{bin}/keepassc", "--help" + end +end