diff options
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 |