# Maintainer: Justin Kromlinger <hashworks@archlinux.org>

pkgname="roundcubemail-plugin-twofactor-webauthn"
pkgver=1.3.0
pkgrel=1
pkgdesc="Roundcube plugin for FIDO2/WebAuthn 2-factor authentication"
url="https://github.com/bartnv/twofactor_webauthn"
license=("GPL3")
arch=("any")
depends=("roundcubemail")
source=("${pkgname}-v${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('8223a93942e836575c6e0f89bef069cd4d5fc70019b1be9346ba224ad2efc9ca')
options=("!strip")

package() {
    cd "twofactor_webauthn-${pkgver}"
    install -d "${pkgdir}/usr/share/webapps/roundcubemail/plugins/twofactor_webauthn"
    cp -r ./* "${pkgdir}/usr/share/webapps/roundcubemail/plugins/twofactor_webauthn"

    install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}
