diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 47 |
1 files changed, 33 insertions, 14 deletions
@@ -1,33 +1,52 @@ # Maintainer: Fedor Piecka <teplavoda at gmail dot com> pkgname=eidklient -pkgver=3.7.0 -pkgrel=2 +pkgver=4.1 +pkgrel=1 pkgdesc="Slovak eID Client" arch=('i686' 'x86_64') url="https://www.slovensko.sk/" license=('custom') -source_i686=('https://eidas.minv.sk/TCTokenService/download/linux/debian/Aplikacia_pre_eID_i386_debian.tar.gz') -source_x86_64=('https://eidas.minv.sk/TCTokenService/download/linux/debian/Aplikacia_pre_eID_amd64_debian.tar.gz') +_upstream_arch= +[[ "$CARCH" == "x86_64" ]] && _upstream_arch="x86_64" +[[ "$CARCH" == "i686" ]] && _upstream_arch="i386" +_appimage="eID_klient-${_upstream_arch}.AppImage" +_url="https://eidas.minv.sk/downloadservice/eidklient/linux/" +source=("${_url}/eID_klient_release_notes.txt") +source_i686=("${_url}/${_appimage}") +source_x86_64=("${_url}/${_appimage}") +# upstream update would break this PKGBUILD if we used integrity checks +md5sums=('SKIP') md5sums_i686=('SKIP') md5sums_x86_64=('SKIP') options=("!strip") install=eidklient.install -# Upstream uses Debian architecture naming convention. Let's prepare a variable for that. -upstream_arch= -[[ "$CARCH" == "x86_64" ]] && upstream_arch="amd64" -[[ "$CARCH" == "i686" ]] && upstream_arch="i386" - +prepare() { + chmod +x "${_appimage}" + ./"${_appimage}" --appimage-extract +} pkgver() { - # Match Debian package version - ar p ${srcdir}/Aplikacia_pre_eID_${upstream_arch}_debian.deb control.tar.gz | tar -Oxz ./control | grep ^Version: | cut -f2 -d" " | tr -d '[:space:]' + # Match version from upstream release notes + cat eID_klient_release_notes.txt | grep "verzia" | head -n1 | sed 's/^.*verzia \([0-9.]*\).*/\1/' } package() { - depends=("glibc" "pcsclite" "ccid" ) - optdepends=('disig-web-signer: online certificates update support') + depends=( "pcsclite" "ccid" "squashfuse" ) + optdepends=('disig-web-signer: online certificates update support') + + # AppImage + install -Dm755 "${srcdir}/${_appimage}" "${pkgdir}/opt/${pkgname}/${pkgname}.AppImage" + + # Symlink executable + install -dm755 "${pkgdir}/usr/bin" + ln -s "/opt/${pkgname}/${pkgname}.AppImage" "${pkgdir}/usr/bin/${pkgname}" + + # Icons + desktop file + tar -x -C "${pkgdir}/usr" -f "${srcdir}/squashfs-root/share.tar" - ar p ${srcdir}/Aplikacia_pre_eID_${upstream_arch}_debian.deb data.tar.xz | tar -xJ -C "${pkgdir}" + # Adjust .desktop so it will work outside of AppImage container + sed -i -E "s|Exec=[^ ]*|Exec=env DESKTOPINTEGRATION=false /usr/bin/${pkgname}|"\ + "${pkgdir}/usr/share/applications/eID_klient.desktop" } |