Skip to content

Instantly share code, notes, and snippets.

@joscdk

joscdk/PKGBUILD Secret

Created July 1, 2021 05:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joscdk/ed47ccbd61ca1e7272b03ce9698e69cd to your computer and use it in GitHub Desktop.
Save joscdk/ed47ccbd61ca1e7272b03ce9698e69cd to your computer and use it in GitHub Desktop.
# Maintainer: Solomon Choina<shlomochoina@gmail.com>
# Contributor: Vlad <ejiek at mail.ru>
# Contributor: intrnl
pkgname=microsoft-edge-dev-bin
_pkgname=microsoft-edge-dev
_pkgshortname=msedge-dev
pkgver=93.0.933.1
pkgrel=1
pkgdesc="A browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier"
arch=('x86_64')
url="https://www.microsoftedgeinsider.com/en-us/download"
license=('custom')
provides=('microsoft-edge-dev' 'edge-dev')
conflicts=('microsoft-edge-dev' 'edge-dev' 'edge-dev-bin' 'edge')
depends=('gtk3' 'libcups' 'nss' 'alsa-lib' 'libxtst' 'libdrm' 'mesa')
makedepends=('imagemagick')
optdepends=('libpipewire02: WebRTC desktop sharing under Wayland'
'kdialog: for file dialogs in KDE'
'gnome-keyring: for storing passwords in GNOME keyring'
'kwallet: for storing passwords in KWallet'
'gtk3: for printing'
'libunity: for download progress on KDE'
'ttf-liberation: fix fonts for some PDFs - CRBug #369991'
'xdg-utils')
options=(!strip !zipman)
_channel=dev
source=("https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-dev/${_pkgname}_${pkgver}-1_amd64.deb"
"microsoft-edge-dev.sh"
"Microsoft Standard Application License Terms - Standalone (free) Use Terms.pdf")
sha256sums=('85182706f14702a4d48f76125ddd3a682cf4239671d663fc8174bc364cc8c72e'
'285afe53b2cd617ae7f4930a1d0befe12a97ae31c30cfad74e97bf695c6f6a8a'
'edf2ed596eb068f168287fc76aa713ad5e0afb59f0a0a47a4f29c0c124ade15e')
package() {
bsdtar -xf data.tar.xz -C "$pkgdir/"
# suid sandbox
chmod 4755 "${pkgdir}/opt/microsoft/${_pkgshortname}/msedge-sandbox"
# 256 and 24 are proper colored icons
for res in 128 64 48 32; do
convert "${pkgdir}/opt/microsoft/${_pkgshortname}/product_logo_256_dev.png" \
-resize ${res}x${res} \
"${pkgdir}/opt/microsoft/${_pkgshortname}/product_logo_${res}_dev.png"
done
for res in 22 16; do
convert "${pkgdir}/opt/microsoft/${_pkgshortname}/product_logo_24_dev.png" \
-resize ${res}x${res} \
"${pkgdir}/opt/microsoft/${_pkgshortname}/product_logo_${res}_dev.png"
done
# install icons
for res in 16 22 24 32 48 64 128 256; do
install -Dm644 "${pkgdir}/opt/microsoft/${_pkgshortname}/product_logo_${res}_dev.png" \
"${pkgdir}/usr/share/icons/hicolor/${res}x${res}/apps/${_pkgname}.png"
done
# User flag aware launcher
install -m755 microsoft-edge-dev.sh "${pkgdir}/usr/bin/microsoft-edge-dev"
# License
install -Dm644 'Microsoft Standard Application License Terms - Standalone (free) Use Terms.pdf' "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE.pdf"
rm -r "${pkgdir}/etc/cron.daily/" "${pkgdir}/opt/microsoft/${_pkgshortname}/cron/"
# Globbing seems not to work inside double parenthesis
rm "${pkgdir}/opt/microsoft/${_pkgshortname}"/product_logo_*.png
}
@1024-Kibibytes
Copy link

Thank you for creating this PKBUILD. When I tried to build it, I ran into the following error:

==> ERROR: microsoft-edge-dev.sh was not found in the build directory and is not a URL.

It downloaded the deb file, but did not unpack it.

@joscdk
Copy link
Author

joscdk commented Jul 8, 2021

@1024-Kibibytes this is only an updated PKGBUILD, since the AUR is not really being updated. To install this version first clone the AUR and replace the PKGBUILD with this file:

git clone https://aur.archlinux.org/microsoft-edge-dev-bin.git
cd microsoft-edge-dev-bin
rm PKGBUILD
curl -O https://gist.githubusercontent.com/joscdk/ed47ccbd61ca1e7272b03ce9698e69cd/raw/7632a7f1ad16f527a52ab0b6fb89998b316f5fcd/PKGBUILD
makepkg -si

I hope this helps :)

@1024-Kibibytes
Copy link

I have not tried this until now. It works great! Thank you so much for your help and putting this PKGBUILD together!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment