diff options
author | Chih-Hsuan Yen | 2024-05-09 21:46:07 +0800 |
---|---|---|
committer | Chih-Hsuan Yen | 2024-05-09 21:46:07 +0800 |
commit | 64ae296b415d66abb7bab9c93e69a6ed53acb495 (patch) | |
tree | 3768ee124c2c89fdac7bac7738584b458d163886 /PKGBUILD | |
parent | 24f914024a0da0edb05aeff8f120baae9da074ff (diff) | |
download | aur-chunghwa-post-webatm.tar.gz |
Allow building in clean chroots
Tested with `pkgctl build`
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -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 |