homebrew-core/Formula/aqbanking.rb
2018-09-24 15:56:20 +02:00

97 lines
2.9 KiB
Ruby

class Aqbanking < Formula
desc "Generic online banking interface"
homepage "https://www.aquamaniac.de/sites/aqbanking/"
url "https://www.aquamaniac.de/sites/download/download.php?package=03&release=217&file=02&dummy=aqbanking-5.7.8.tar.gz"
sha256 "16f86e4cc49a9eaaa8dfe3206607e627873208bce45a70030c3caea9b5afc768"
revision 1
bottle do
sha256 "153049e5417652e7dbf7ea864751552faf1eb0d4fd5abcdf1f67208bb6c1ef04" => :mojave
sha256 "454fb80632eebfc602c32f417dfd761b83a3fb7a047a6a74e8c05bec00c6f930" => :high_sierra
sha256 "76d2ae1f5935d4e4ffd666a8f84ba612d83a1e1777d17f7c76bee3d8aa3a98dc" => :sierra
sha256 "a0a0d87e3aa8fc53f5e2fef317be081c30be7472ef2e2fda9b64d4ea3fd21357" => :el_capitan
end
head do
url "https://git.aquamaniac.de/git/aqbanking.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
depends_on "pkg-config" => :build
depends_on "gettext"
depends_on "gmp"
depends_on "gwenhywfar"
depends_on "ktoblzcheck"
depends_on "libxml2"
depends_on "libxmlsec1"
depends_on "libxslt"
def install
ENV.deparallelize
system "autoreconf", "-fiv" if build.head?
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--enable-cli",
"--with-gwen-dir=#{HOMEBREW_PREFIX}"
system "make", "check"
system "make", "install"
end
test do
ENV["TZ"] = "UTC"
context = "balance.ctx"
(testpath/context).write <<~EOS
accountInfoList {
accountInfo {
char bankCode="110000000"
char bankName="STRIPE TEST BANK"
char accountNumber="000123456789"
char accountName="demand deposit"
char iban="US44110000000000123456789"
char bic="BYLADEM1001"
char owner="JOHN DOE"
char currency="USD"
int accountType="0"
int accountId="2"
statusList {
status {
int time="1388664000"
notedBalance {
value {
char value="123456%2F100"
char currency="USD"
} #value
int time="1388664000"
} #notedBalance
} #status
status {
int time="1388750400"
notedBalance {
value {
char value="132436%2F100"
char currency="USD"
} #value
int time="1388750400"
} #notedBalance
} #status
} #statusList
} # accountInfo
} # accountInfoList
EOS
match = "Account 110000000 000123456789 STRIPE TEST BANK 03.01.2014 12:00 1324.36 USD"
out = shell_output("#{bin}/aqbanking-cli listbal -c #{context}")
assert_match match, out.gsub(/\s+/, " ")
end
end