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

93 lines
2.8 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 "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 "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
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