homebrew-core/Formula/aqbanking.rb
2017-09-24 19:48:47 +02:00

92 lines
2.7 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=208&file=01&dummy=aqbanking-5.6.12.tar.gz"
sha256 "0652706a487d594640a7d544271976261165bf269d90dc70447b38b363e54b22"
bottle do
sha256 "55d0359a888464040bedd5a893d2894435ad388d5374bab9728abe49a4dc00e1" => :sierra
sha256 "ff953f175c8f6ddf772da822e133201c48085c2e7ccc08b7c53135daeafa5200" => :el_capitan
sha256 "3cdbfa38e1459b83e70dae91fd68640207ca838098e1de21966583dea8122a63" => :yosemite
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 "gwenhywfar"
depends_on "libxmlsec1"
depends_on "libxslt"
depends_on "libxml2"
depends_on "gettext"
depends_on "gmp"
depends_on "pkg-config" => :build
depends_on "ktoblzcheck" => :recommended
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.undent
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
assert_match /^Account\s+110000000\s+000123456789\s+STRIPE TEST BANK\s+03.01.2014\s+12:00\s+1324.36\s+USD\s+$/, shell_output("#{bin}/aqbanking-cli listbal -c #{context}")
end
end