summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Fontenelle2017-03-08 19:16:49 -0300
committerRafael Fontenelle2017-03-08 19:19:48 -0300
commit77041055a135100767780aabcdc165a8dbaa8ff1 (patch)
treec8a6605d76e65618900642e82965e255085be845
downloadaur-77041055a135100767780aabcdc165a8dbaa8ff1.tar.gz
Initial commit
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD99
-rw-r--r--warsaw.install8
-rw-r--r--warsaw.service13
4 files changed, 143 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0afb941e767b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+# Generated by mksrcinfo v8
+# Wed Mar 8 22:19:37 UTC 2017
+pkgbase = warsaw
+ pkgdesc = GAS Tecnologia's banking security system used by Banco do Brasil
+ pkgver = 1.12.3.11
+ pkgrel = 1
+ url = https://seg.bb.com.br
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = chrpath
+ depends = openssl
+ depends = nss
+ options = !strip
+ source = warsaw.service
+ sha256sums = dde06741817b8b77d9b1150bd10110d8b22330f8e2900fcae06dcedeee10a09e
+ source_i686 = https://cloud.gastecnologia.com.br/bb/downloads/ws/warsaw_32_installer.run
+ sha256sums_i686 = 00c14f1695e39029f75288517128861715be7fac8d8ff742854331c18ce9125c
+ source_x86_64 = https://cloud.gastecnologia.com.br/bb/downloads/ws/warsaw_64_installer.run
+ sha256sums_x86_64 = d8d637a2910aed6ab5e9baa9d2bd85c00259ee133e4aa6219bbf7d1dd3b04f40
+
+pkgname = warsaw
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..72e41cae1337
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,99 @@
+# Maintainer: Rafael Fontenlle <rafaelff@gnome.org>
+
+pkgname=warsaw
+pkgver=1.12.3.11
+pkgrel=1
+pkgdesc="GAS Tecnologia's banking security system used by Banco do Brasil"
+arch=(i686 x86_64)
+url="https://seg.bb.com.br"
+license=('custom')
+depends=('openssl' 'nss')
+makedepends=('chrpath')
+options=(!strip)
+source=(warsaw.service)
+source_i686=(https://cloud.gastecnologia.com.br/bb/downloads/ws/warsaw_32_installer.run)
+source_x86_64=(https://cloud.gastecnologia.com.br/bb/downloads/ws/warsaw_64_installer.run)
+sha256sums=('dde06741817b8b77d9b1150bd10110d8b22330f8e2900fcae06dcedeee10a09e')
+sha256sums_i686=('00c14f1695e39029f75288517128861715be7fac8d8ff742854331c18ce9125c')
+sha256sums_x86_64=('d8d637a2910aed6ab5e9baa9d2bd85c00259ee133e4aa6219bbf7d1dd3b04f40')
+
+ # Overwrites SRCDEST and, combined with "makepkg -fsC", this will
+ # always download the source installer in order to find out a change
+ # in the checksum - if thats the case, probably a new version was
+ # release and we definitely want to update this package.
+#SRCDEST=$srcdir
+
+if [[ $CARCH == x86_64 ]]; then
+ _installer=warsaw_64_installer.run
+ _warsawdir=tmp/warsaw_x64
+else
+ _installer=warsaw_32_installer.run
+ _warsawdir=tmp/warsaw_x86
+fi
+
+prepare() {
+ cd $srcdir
+
+ # Make sure to have a cleaned up warsaw directory
+ [ ! -d $pkgname-$pkgver ] && mkdir $pkgname-$pkgver
+ [ -d $_warsawdir ] && rm -rf $_warsawdir
+
+ # Extracts the binary content starting from the line number "L"
+ # (L was informed within the installer)
+ L=363
+ tail -n +$L $_installer | tar -zxvf - -C $pkgname-$pkgver
+}
+
+build() {
+ cd $pkgname-$pkgver/$_warsawdir
+ ./configure --prefix=/usr --sysconfdir=/etc
+}
+
+package() {
+ cd $pkgname-$pkgver/$_warsawdir
+ make DESTDIR="$pkgdir" install
+
+ # Enable executable permission for binaries
+ chmod +x "$pkgdir/usr/bin/warsaw/core"
+ chmod +x "$pkgdir/usr/bin/warsaw/migratecache"
+ chmod +x "$pkgdir/usr/bin/warsaw/wsatspi"
+ chmod +x "$pkgdir/usr/bin/warsaw/wscertmgr"
+
+ # Set paths in comply with Arch Packaging Standards
+ # i.e. Use /usr/bin, /etc, and /tmp
+ sed -i 's|/usr/local/etc|/etc|g;s|/var/tmp|/tmp|' \
+ "$pkgdir/usr/bin/warsaw/wscertmgr"
+ sed -i 's|/usr/local/bin|/usr/bin|' \
+ "$pkgdir/etc/xdg/autostart/warsaw.desktop"
+
+ # Install copyright and license in proper directory
+ install -Dm644 "$pkgdir"/usr/share/{doc,licenses}/warsaw/copyright
+ rm -rf "$pkgdir/usr/share/doc"
+
+ # Fix insecure RPATH to /usr/local/ directories
+ chrpath -d "$pkgdir/usr/bin/warsaw/migratecache"
+ chrpath -d "$pkgdir/usr/lib/warsaw/wsftuan.so"
+ chrpath -d "$pkgdir/usr/bin/warsaw/migratecache"
+ chrpath -d "$pkgdir/usr/lib/warsaw/wsftuan.so"
+ chrpath -d "$pkgdir/usr/lib/warsaw/wslbmid.so"
+ chrpath -d "$pkgdir/usr/lib/warsaw/wsftup.so"
+ chrpath -d "$pkgdir/usr/lib/warsaw/wsftbmo.so"
+ chrpath -d "$pkgdir/usr/lib/warsaw/wsftbco.so"
+ chrpath -d "$pkgdir/usr/lib/warsaw/wsftbid.so"
+ chrpath -d "$pkgdir/usr/lib/warsaw/wsftdl.so"
+ chrpath -d "$pkgdir/usr/lib/warsaw/wsbrmu.so"
+
+ # Use systemd service; SysVinit is deprecated
+ install -Dm644 "$srcdir/warsaw.service" \
+ "$pkgdir/usr/lib/systemd/system/warsaw.service"
+ rm -rf "$pkgdir/etc/init.d"
+
+ # Warsaw has to be called as root to open socket, not as normal user
+ rm -rf "$pkgdir/etc/xdg"
+
+ # Symlink to /usr/local, as the binaries still expect them to be valid
+ install -dm755 "$pkgdir/usr/local/"{etc,bin,lib}
+ ln -s /etc/warsaw/ "$pkgdir/usr/local/etc/warsaw"
+ ln -s /usr/bin/warsaw/ "$pkgdir/usr/local/bin/warsaw"
+ ln -s /usr/lib/warsaw/ "$pkgdir/usr/local/lib/warsaw"
+}
diff --git a/warsaw.install b/warsaw.install
new file mode 100644
index 000000000000..cd6d81c53829
--- /dev/null
+++ b/warsaw.install
@@ -0,0 +1,8 @@
+post_install() {
+ echo "To use Warsaw, start its service using:"
+ echo "# systemctl start warsaw"
+}
+
+pre_remove() {
+ systemctl stop warsaw
+}
diff --git a/warsaw.service b/warsaw.service
new file mode 100644
index 000000000000..d2a46ca807f6
--- /dev/null
+++ b/warsaw.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Warsaw Technology (core)
+After=remote-fs.service
+After=syslog.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStartPre=/usr/bin/warsaw/wscertmgr
+ExecStart=/usr/bin/warsaw/core
+
+[Install]
+WantedBy=multi-user.target