_name=webcord pkgname=${_name}-bin pkgver=4.8.0 pkgrel=1 pkgdesc='A Discord and SpaceBar Electron-based client implemented without Discord API (binary release)' arch=('x86_64' 'aarch64' 'armv7h') url="https://github.com/SpacingBat3/WebCord" license=('MIT') provides=("${_name}") conflicts=("${_name}") options=('!strip' '!emptydirs') _get_source() { echo "${url}/releases/download/v${pkgver}/${_name}-${pkgver}-1.${1}.rpm" } source_x86_64=("$(_get_source x86_64)") source_aarch64=("$(_get_source arm64)") source_armv7h=("$(_get_source armv7hl)") sha256sums_x86_64=('f954131a2fda71b39a3124fb2e7a7c6a2bfbbe3c2468547357a8547da617c048') sha256sums_aarch64=('455b0a002b047b385954c558b673a13ea1c1727ca4dbd09086c6cfcbbdd0dcf8') sha256sums_armv7h=('71b26d0ff906781dc99fa3c3d41cb218f7a604f066fb7b0c57459c2548b4cfb8') noextract=( "${source_x86_64[0]##*/}" "${source_aarch64[0]##*/}" "${source_armv7h[0]##*/}" ) package() { local sname="source_${CARCH}" bsdtar -xf "${!sname[0]##*/}" \ -C "${pkgdir}" \ --exclude="usr/lib/.build-id" \ --exclude="usr/bin" \ --exclude="usr/share/doc" local bin="${pkgdir}/usr/bin" install -dm755 "${bin}" mv "${pkgdir}/usr/lib" "${pkgdir}/opt" ln -s "/opt/${_name}/${_name}" "${bin}/${_name}" }