pkgname=webcord-bin pkgver=3.8.5 pkgrel=1 pkgdesc="A Discord and Fosscord client made with the Electron API." arch=('x86_64' 'aarch64' 'armv7h') url="https://github.com/SpacingBat3/WebCord" license=('MIT') _name="${pkgname%-bin}" provides=("${_name}") conflicts=("${_name}") options=('!emptydirs') _get_source() { local archive="webcord-${pkgver}-1.$1.rpm" echo "${archive}::${url}/releases/download/v${pkgver}/${archive}" } source_x86_64=("$(_get_source x86_64)") source_aarch64=("$(_get_source arm64)") source_armv7h=("$(_get_source armv7hl)") sha256sums_x86_64=('f2e7ac0e11a341b84488849c464546e2777a9d961e26c62816c2e21d5995da91') sha256sums_aarch64=('d2159897dabbac5d1e7dfcac144fbb0860d56e4730beeb8cca4977c80d84cbfb') sha256sums_armv7h=('29466704a7df1d6369f7794b1f859bc9773fd6723966d8c8a235cdb7a3b5ad5e') noextract=( "${source_x86_64[0]%%::*}" "${source_aarch64[0]%%::*}" "${source_armv7h[0]%%::*}" ) package() { cd "${srcdir}" local sname="source_${CARCH}" bsdtar -xf "${!sname[0]%%::*}" \ -C "${pkgdir}" \ --exclude="usr/lib/.build-id" \ --exclude="usr/bin" local bin="${pkgdir}/usr/bin" local licenses="${pkgdir}/usr/share/licenses" install -dm755 "${bin}" "${licenses}" mv "${pkgdir}/usr/lib" "${pkgdir}/opt" mv "${pkgdir}/usr/share/doc/${_name}" "${licenses}/${pkgname}" ln -s "/opt/${_name}/${_name}" "${bin}/${_name}" }