summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAakash Hemadri2024-04-20 14:11:01 +0530
committerAakash Hemadri2024-04-20 14:11:01 +0530
commit34bc1e2f63e374dfd03ecc85810ef5135b3d4e1a (patch)
tree1c938c2526438d5cf851f31905bbed73c303650e
parent41b6f8efff7034f32703667eccc6fbe11c87530d (diff)
downloadaur-34bc1e2f63e374dfd03ecc85810ef5135b3d4e1a.tar.gz
migrate PKGBUILD to rpm source
* removed opt dependencies * removed icon resizing * changed source from deb to rpm ** thanks nowy for your contribution Signed-off-by: Aakash Hemadri <aakashhemadri123@gmail.com>
-rw-r--r--.SRCINFO10
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD49
-rwxr-xr-xupdate_version.sh27
4 files changed, 36 insertions, 51 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7cad7f4682de..5b9fc2bef2f8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -5,7 +5,6 @@ pkgbase = microsoft-edge-stable-bin
url = https://www.microsoftedgeinsider.com/en-us/download
arch = x86_64
license = custom
- makedepends = imagemagick
depends = gtk3
depends = libcups
depends = nss
@@ -13,13 +12,10 @@ pkgbase = microsoft-edge-stable-bin
depends = libxtst
depends = libdrm
depends = mesa
- optdepends = libpipewire02: WebRTC desktop sharing under Wayland
+ optdepends = pipewire: WebRTC desktop sharing under Wayland
optdepends = kdialog: for file dialogs in KDE
optdepends = gnome-keyring: for storing passwords in GNOME keyring
optdepends = kwallet: for storing passwords in KWallet
- optdepends = libunity: for download progress on KDE
- optdepends = ttf-liberation: fix fonts for some PDFs - CRBug #369991
- optdepends = xdg-utils
provides = microsoft-edge-stable
provides = edge-stable
conflicts = microsoft-edge-stable
@@ -28,10 +24,10 @@ pkgbase = microsoft-edge-stable-bin
conflicts = edge
options = !strip
options = !zipman
- source = https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_124.0.2478.51-1_amd64.deb
+ source = https://packages.microsoft.com/yumrepos/edge/Packages/m/microsoft-edge-stable-124.0.2478.51-1.x86_64.rpm
source = microsoft-edge-stable.sh
source = Microsoft Standard Application License Terms - Standalone (free) Use Terms.pdf
- sha256sums = 7408934be2af295c0bead369e18b107c7e3074d209a0126781c2c15e01c0ae31
+ sha256sums = 8a235a2dfd426858529df4a050c9f0b39b8f49e20ba243970909d615858a92ac
sha256sums = dc3765d2de6520b13f105b8001aa0e40291bc9457ac508160b23eea8811e26af
sha256sums = edf2ed596eb068f168287fc76aa713ad5e0afb59f0a0a47a4f29c0c124ade15e
diff --git a/.gitignore b/.gitignore
index d8c40fb744af..3d3446ddcc64 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
*.log
*.zst
*.deb
+*.rpm
diff --git a/PKGBUILD b/PKGBUILD
index 1f49acaf79bd..83acb3f4519e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,65 +1,54 @@
# Maintainer: Nicolas Narvaez <nicomix1006@gmail.com>
+# Co-Maintainer: Aakash Hemadri <aakashhemadri123@gmail.com>
# Contributor: EsauPR
# Contributor: bittin
+# Contributor: nowy
pkgname=microsoft-edge-stable-bin
_pkgname=microsoft-edge
_pkgshortname=msedge
+_channel=stable
pkgver=124.0.2478.51
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-stable' 'edge-stable')
conflicts=('microsoft-edge-stable' 'edge-stable' 'edge-stable-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'
- 'libunity: for download progress on KDE'
- 'ttf-liberation: fix fonts for some PDFs - CRBug #369991'
- 'xdg-utils')
+optdepends=(
+ 'pipewire: 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'
+ )
options=(!strip !zipman)
-_channel=stable
-source=("https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/${_pkgname}-stable_${pkgver}-1_amd64.deb"
+source=("https://packages.microsoft.com/yumrepos/edge/Packages/m/${_pkgname}-stable-${pkgver}-1.x86_64.rpm"
"microsoft-edge-stable.sh"
"Microsoft Standard Application License Terms - Standalone (free) Use Terms.pdf")
-sha256sums=('7408934be2af295c0bead369e18b107c7e3074d209a0126781c2c15e01c0ae31'
+sha256sums=('8a235a2dfd426858529df4a050c9f0b39b8f49e20ba243970909d615858a92ac'
'dc3765d2de6520b13f105b8001aa0e40291bc9457ac508160b23eea8811e26af'
- 'edf2ed596eb068f168287fc76aa713ad5e0afb59f0a0a47a4f29c0c124ade15e')
+ 'edf2ed596eb068f168287fc76aa713ad5e0afb59f0a0a47a4f29c0c124ade15e')
package() {
- bsdtar -xf data.tar.xz -C "$pkgdir/"
+ cp --parents -a {opt,usr} "$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.png" \
- -resize ${res}x${res} \
- "${pkgdir}/opt/microsoft/${_pkgshortname}/product_logo_${res}.png"
- done
- for res in 22 16; do
- convert "${pkgdir}/opt/microsoft/${_pkgshortname}/product_logo_24.png" \
- -resize ${res}x${res} \
- "${pkgdir}/opt/microsoft/${_pkgshortname}/product_logo_${res}.png"
- done
-
# install icons
- for res in 16 22 24 32 48 64 128 256; do
+ for res in 16 24 32 48 64 128 256; do
install -Dm644 "${pkgdir}/opt/microsoft/${_pkgshortname}/product_logo_${res}.png" \
"${pkgdir}/usr/share/icons/hicolor/${res}x${res}/apps/${_pkgname}.png"
done
- # User flag aware launcher
- install -m755 microsoft-edge-stable.sh "${pkgdir}/usr/bin/microsoft-edge-stable"
# 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
+
+ # User flag aware launcher
+ install -m755 microsoft-edge-stable.sh "${pkgdir}/usr/bin/microsoft-edge-stable"
+
rm "${pkgdir}/opt/microsoft/${_pkgshortname}"/product_logo_*.png
}
diff --git a/update_version.sh b/update_version.sh
index cf796a936abe..b6f9590a25c7 100755
--- a/update_version.sh
+++ b/update_version.sh
@@ -10,13 +10,19 @@ git pull
CHANNEL=$(awk -F '=' '/^_channel/{ print $2 }' PKGBUILD)
PKG="microsoft-edge-${CHANNEL}"
+#Get filelists URL
+FILELISTS=$(curl -sSf "https://packages.microsoft.com/yumrepos/edge/repodata/repomd.xml" |
+ xmllint --xpath 'string(//*[local-name()="data"][@type="filelists"]/*[local-name()="location"]/@href)' -)
+
# Get latest version
-VER=$(curl -sSf https://packages.microsoft.com/repos/edge/dists/stable/main/binary-amd64/Packages |
- grep -A6 "Package: ${PKG}" |
- awk '/Version/{print $2}' |
- cut -d '-' -f1 |
- sort -rV |
- head -n1)
+VER=$(curl -sSf "https://packages.microsoft.com/yumrepos/edge/${FILELISTS}" |
+ gzip -dc |
+ xmllint --xpath 'string(//*[local-name()="package"][@name="microsoft-edge-stable"][last()]/*[local-name()="version"]/@ver)' -)
+
+# updpkgsums
+SUM256=$(curl -sSf "https://packages.microsoft.com/yumrepos/edge/${FILELISTS}" |
+ gzip -dc |
+ xmllint --xpath 'string(//*[local-name()="package"][@name="microsoft-edge-stable"][last()]/@pkgid)' -)
# Insert latest version into PKGBUILD and update hashes
sed -i \
@@ -29,13 +35,6 @@ if (git diff --exit-code PKGBUILD); then
exit 0
fi
-# updpkgsums
-SUM256=$(curl -sSf https://packages.microsoft.com/repos/edge/dists/stable/main/binary-amd64/Packages |
- grep -A15 "Package: ${PKG}" |
- grep -A14 "Version: ${VER}" |
- awk '/SHA256/{print $2}' |
- head -n1)
-
# Insert latest shasum into PKGBUILD and update hashes
sed -i \
-e "s/^sha256sums=('.*/sha256sums=('${SUM256}'/" \
@@ -63,4 +62,4 @@ makepkg --printsrcinfo >.SRCINFO
# Commit changes
git add PKGBUILD .SRCINFO
git commit -s -m "Update ${PKG} to v${VER}"
-rm -rf *.deb *.log *.zst
+rm -rf *.deb *.rpm *.log *.zst