summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Hsuan Yen2024-05-09 21:46:07 +0800
committerChih-Hsuan Yen2024-05-09 21:46:07 +0800
commit64ae296b415d66abb7bab9c93e69a6ed53acb495 (patch)
tree3768ee124c2c89fdac7bac7738584b458d163886
parent24f914024a0da0edb05aeff8f120baae9da074ff (diff)
downloadaur-chunghwa-post-webatm.tar.gz
Allow building in clean chroots
Tested with `pkgctl build`
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD16
2 files changed, 17 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2b470b51e62b..83a145a2ee81 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -8,14 +8,19 @@ pkgbase = chunghwa-post-webatm
license = unknown
makedepends = msitools
makedepends = gendesk
- makedepends = pev
+ makedepends = perl-image-exiftool
+ makedepends = p7zip
makedepends = imagemagick
- depends = wine-wow64
depends = gnutls
depends = pcsclite
+ depends = sh
source = ATMSetup-1.2307.31.1.msi::https://webatm.post.gov.tw/postatm/cab/ATMSetup.msi
source = chunghwa-post-webatm
sha256sums = bccd273d60d3a9cb2b4221ee797ac596aa7d9917ed2c96b072e28e45088684bd
sha256sums = 2a21dba5dea4132d3693cf3d6332cee2f3a0be650f0e19e76ece27cd834abb75
pkgname = chunghwa-post-webatm
+ depends = gnutls
+ depends = pcsclite
+ depends = sh
+ depends = wine-wow64
diff --git a/PKGBUILD b/PKGBUILD
index ab53e09ff613..ea8a7647a865 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,9 +8,8 @@ pkgdesc='WebATM plugin for Chunghwa Post (中華郵政 WebATM 元件)'
arch=(any)
url='https://webatm.post.gov.tw/'
license=(unknown)
-# Per https://bugs.winehq.org/show_bug.cgi?id=54661, 32-bit winscard.dll will be supported through wow64 thunks
-depends=(wine-wow64 gnutls pcsclite)
-makedepends=(msitools gendesk pev imagemagick)
+depends=(gnutls pcsclite sh)
+makedepends=(msitools gendesk perl-image-exiftool p7zip imagemagick)
source=("ATMSetup-$pkgver.msi"::"https://webatm.post.gov.tw/postatm/cab/ATMSetup.msi"
"$pkgname")
sha256sums=('bccd273d60d3a9cb2b4221ee797ac596aa7d9917ed2c96b072e28e45088684bd'
@@ -21,12 +20,13 @@ prepare() {
}
pkgver() {
- peres -v ATMXHRService.exe | grep 'Product Version' | cut -f 2 -d : | sed 's# ##g'
+ # Credit: https://askubuntu.com/a/717855
+ exiftool -ProductVersion ATMXHRService.exe | cut -f 2 -d : | sed 's# ##g'
}
build() {
- peres -x ATMXHRService.exe
- for icon in resources/icons/*.ico; do
+ 7z x ATMXHRService.exe .rsrc
+ for icon in .rsrc/*/ICON/*.ico; do
dimension=$(identify -format "%wx%h" $icon)
mkdir -p icons/$dimension/apps
convert $icon icons/$dimension/apps/$pkgname.png
@@ -36,6 +36,10 @@ build() {
}
package() {
+ # Per https://bugs.winehq.org/show_bug.cgi?id=54661, 32-bit winscard.dll will be supported through wow64 thunks
+ # Keep wine-wow64 here, so that this package can be built with only official packages
+ depends+=(wine-wow64)
+
install -Dm755 $pkgname -t "$pkgdir"/usr/bin
install -Dm644 ATMXHRService.exe -t "$pkgdir"/usr/share/$pkgname
install -Dm644 cert.pem -t "$pkgdir"/usr/share/$pkgname