diff options
author | Chih-Hsuan Yen | 2023-09-25 12:56:40 +0800 |
---|---|---|
committer | Chih-Hsuan Yen | 2023-09-25 12:56:40 +0800 |
commit | 2249949fe5e6fcc47842c78db93b2ea5d80563ef (patch) | |
tree | 8ccb0f08e4a1534a1698bd299a402d57db1b4d56 | |
parent | 45a81711a24b92046e812ecbf05e629800f126f4 (diff) | |
download | aur-2249949fe5e6fcc47842c78db93b2ea5d80563ef.tar.gz |
nhiicc: adapt to pcsclite changes
Many thanks to louiswpf!
See: https://aur.archlinux.org/packages/nhiicc#comment-934780
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rw-r--r-- | nhiicc.rules | 7 |
3 files changed, 23 insertions, 2 deletions
@@ -1,7 +1,7 @@ pkgbase = nhiicc pkgdesc = 台灣健保卡網路註冊憑證元件 (National Health Insurance IC Card) pkgver = 20220530 - pkgrel = 1 + pkgrel = 2 epoch = 1 url = https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/mEventesting.htm install = nhiicc.install @@ -13,9 +13,11 @@ pkgbase = nhiicc optdepends = lib32-pcsclite: for using card readers with 32-bit driver only source = https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/mLNHIICC_Setup.20220110.tar.gz source = nhiicc.service + source = nhiicc.rules source = regen-certs.sh md5sums = af4c8e12bdadef7e6ab2b9b1dabb21d4 md5sums = 3a7ba068b49eab2edca614ea2495e706 + md5sums = e4a249ff4e638527a0bde9deec6eeb5a md5sums = 605ed8db0ec700bb07ca256c5282ae6a pkgname = nhiicc @@ -1,9 +1,13 @@ # Maintainer: Chih-Hsuan Yen <yan12125@gmail.com> +# Testing pages: +# * https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/webtesting/SampleY.aspx +# * /usr/share/nhiicc/html/ESample.html in this package + pkgname=nhiicc epoch=1 pkgver=20220530 -pkgrel=1 +pkgrel=2 arch=(x86_64) url='https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/mEventesting.htm' license=(custom) @@ -16,10 +20,12 @@ optdepends=( # XXX: Upstream still use 20220110 for the filename source=("https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/mLNHIICC_Setup.20220110.tar.gz" nhiicc.service + nhiicc.rules regen-certs.sh) # See https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/mEventesting.htm for MD5 sums md5sums=('af4c8e12bdadef7e6ab2b9b1dabb21d4' '3a7ba068b49eab2edca614ea2495e706' + 'e4a249ff4e638527a0bde9deec6eeb5a' '605ed8db0ec700bb07ca256c5282ae6a') install=nhiicc.install @@ -29,4 +35,10 @@ package() { cp -dr mLNHIICC_Setup."$pkgver"/html "$pkgdir"/usr/share/nhiicc/ find "$pkgdir" \( -name '*~' -or -name '._*' \) -delete install -Dm644 nhiicc.service -t "$pkgdir"/usr/lib/systemd/system/ + + # Match the directory mode of polkit + # https://gitlab.archlinux.org/archlinux/packaging/packages/polkit/-/blob/main/PKGBUILD + install -d -o root -g 102 -m 750 "$pkgdir"/usr/share/polkit-1/rules.d + + install -Dm644 nhiicc.rules -t "$pkgdir"/usr/share/polkit-1/rules.d } diff --git a/nhiicc.rules b/nhiicc.rules new file mode 100644 index 000000000000..41d365736aa3 --- /dev/null +++ b/nhiicc.rules @@ -0,0 +1,7 @@ +polkit.addRule(function(action, subject) { + if ((action.id == "org.debian.pcsc-lite.access_pcsc" || + action.id == "org.debian.pcsc-lite.access_card") && + subject.user == "nhiicc") { + return polkit.Result.YES; + } +}); |