pkgname=webcord-bin pkgver=4.0.0 pkgrel=1 pkgdesc="A Discord and Fosscord client made with the Electron API." arch=('x86_64' 'aarch64' 'armv7h') _repo='SpacingBat3/WebCord' url="https://github.com/${_repo}" license=('MIT') _name="${pkgname%-*}" provides=("${_name}") conflicts=("${_name}") options=('!emptydirs') _get_source() { local archive="webcord-${pkgver}-1.$1.rpm" echo "${archive}::${url}/releases/download/v${pkgver}/${archive}" } source=("${pkgname}-${pkgver}-LICENSE::https://raw.githubusercontent.com/${_repo}/v${pkgver}/LICENSE") source_x86_64=("$(_get_source x86_64)") source_aarch64=("$(_get_source arm64)") source_armv7h=("$(_get_source armv7hl)") sha256sums=('1611f35d608dd3b100f66d4e6954bceef80ff73209679ba38def974254a04f40') sha256sums_x86_64=('0057c87274331c98e4921c69190109896a7f336ab2c48b6f891fea011ee06551') sha256sums_aarch64=('fe653229593973a920998c6446ad81f1e8766a4d17635eaacb035ed67531081d') sha256sums_armv7h=('de5014cf73d7511ebc4e7b642a32012a973f9996341340e964e522c0e002cdbe') 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" local licenses="${pkgdir}/usr/share/licenses/${pkgname}" install -dm755 "${bin}" "${licenses}" mv "${pkgdir}/usr/lib" "${pkgdir}/opt" ln -s "/opt/${_name}/${_name}" "${bin}/${_name}" install -Dm644 "${source[0]%%::*}" "${licenses}/LICENSE" }