# Maintainer: Cedric Roijakkers . # Inspired from the PKGBUILD for ferdi-bin. _pkgname='ferdium' pkgname="$_pkgname-bin" pkgverorg='6.0.0-nightly.42' pkgver='6.0.0.nightly.42' pkgrel='1' pkgdesc='A messaging browser that allows you to combine your favorite messaging services into one application (binary release).' arch=('x86_64' 'armv7l' 'arm64') url="https://$_pkgname.org" license=('Apache') depends=('nss' 'atk' 'at-spi2-atk' 'libcups' 'libdrm' 'gdk-pixbuf2' 'gtk3' 'alsa-lib' 'c-ares' 'ffmpeg' 'libevent' 'libxkbfile' 'libxslt' 'minizip' 're2' 'snappy') provides=("$_pkgname") conflicts=("$_pkgname") _releaseurl="https://github.com/$_pkgname/$_pkgname-app/releases/download/v$pkgverorg" source_x86_64=("$pkgname-$pkgverorg-$pkgrel-amd64.zip::${_releaseurl}/${_pkgname}_${pkgverorg}_amd64.deb") source_armv7l=("$pkgname-$pkgverorg-$pkgrel-armv7l.zip::${_releaseurl}/${_pkgname}_${pkgverorg}_armv7l.deb") source_arm64=("$pkgname-$pkgverorg-$pkgrel-arm64.zip::${_releaseurl}/${_pkgname}_${pkgverorg}_arm64.deb") sha512sums_x86_64=('5b6246324d9914dcacbf6ef20f8b0590d1095a7cead491f6242a291aeb75c00abd52dc1bf354a1a6f7495d44cb6510f7ed44033c27f495afe635d7a3d8165d5b') sha512sums_armv7l=('63e572e2704d7a24a2418104e84a96f67d0e0454a18d6967fdcb21931b31a69a930f3a67cf9a96abd8b55447c2c6a30b7927f4fa384e0b10e0792a9286457b40') sha512sums_arm64=('04db56e54feecf4c6477611540c73dd05fa982744bc81fabd96bc72a42837b85efbc6cb5235ba022f4baa8b73dc14167e60dbb8f5c7caee03853c2bf79681607') _sourcedirectory="$pkgname-$pkgverorg-$pkgrel" prepare() { cd "$srcdir/" mkdir -p "$_sourcedirectory/" bsdtar -xf 'data.tar.xz' -C "$_sourcedirectory/" cd "$srcdir/$_sourcedirectory/" sed -E -i -e "s|Exec=/opt/${_pkgname^}/$_pkgname|Exec=/usr/bin/$_pkgname|" "usr/share/applications/$_pkgname.desktop" } package() { cd "$srcdir/$_sourcedirectory/" install -dm755 "$pkgdir/opt/" cp -r --no-preserve=ownership --preserve=mode "opt/${_pkgname^}/" "$pkgdir/opt/$pkgname/" chmod u+s "$pkgdir/opt/$pkgname/chrome-sandbox" install -dm755 "$pkgdir/usr/bin/" ln -sf "/opt/$pkgname/$_pkgname" "$pkgdir/usr/bin/$_pkgname" install -Dm644 "usr/share/applications/$_pkgname.desktop" "$pkgdir/usr/share/applications/$_pkgname.desktop" for _size in 16 24 32 48 64 96 128 256 512 1024; do install -Dm644 "usr/share/icons/hicolor/${_size}x${_size}/apps/$_pkgname.png" "$pkgdir/usr/share/icons/hicolor/${_size}x${_size}/apps/$_pkgname.png" done install -dm755 "$pkgdir/usr/share/licenses/$pkgname/" for _license in 'LICENSE.electron.txt' 'LICENSES.chromium.html'; do ln -sf "/opt/$pkgname/$_license" "$pkgdir/usr/share/licenses/$pkgname/$_license" done }