# Contributor: Andrey Kolchenko pkgname=rutoken-plugin pkgver=4.8.0 pkgrel=1 pkgdesc="The Rutoken plugin is necessary for connecting USB devices with the browser, it allows you to identify devices and work with them." arch=('i686' 'x86_64') url="https://www.rutoken.ru/support/download/rutoken-plugin/" license=('unknown') makedepends=("findutils" "sed" "grep" "coreutils" "bash") source_x86_64=("${pkgname}-${pkgver}-x86_64.rpm::https://download.rutoken.ru/Rutoken_Plugin/${pkgver}.0/Linux/libnpRutokenPlugin-${pkgver}-1.x86_64.rpm") sha256sums_x86_64=("dea405bd7dc4812d46cf770dea86b4f533812a79709491cd7d3a5d7241d12134") source_i686=("${pkgname}-${pkgver}-i686.rpm::https://download.rutoken.ru/Rutoken_Plugin/${pkgver}.0/Linux/libnpRutokenPlugin-${pkgver}-1.i686.rpm") sha256sums_i686=("2bb53733dd3f97a7e12d05753ab51c51ac8ab6dbd0acc826215ec9b7fda7cfd8") package() { mv "${srcdir}/usr/lib64/mozilla/native-messaging-hosts" "${srcdir}/usr/lib/mozilla/" rm -rf "${srcdir}/usr/lib64" find "${srcdir}" -type d | sed "s#^${srcdir}#${pkgdir}#g" | tail -n +2 | xargs install -d eval $(find ${srcdir} -type f -exec bash -c 'echo install \"{}\" \"@$(dirname {})\"\;' \; | sed "s#@${srcdir}#${pkgdir}#g") eval $(find ${srcdir} -type l -exec bash -c 'echo ln -s \"$(readlink {})\" \"@{}\"\;' \; | grep -v '.rpm' | sed "s#@${srcdir}#${pkgdir}#g") }