Package Details: gnome-shell-extension-media-controls 2.4.3-0

Git Clone URL: https://aur.archlinux.org/gnome-shell-extension-media-controls.git (read-only, click to copy)
Package Base: gnome-shell-extension-media-controls
Description: A media indicator for the GNOME shell
Upstream URL: https://github.com/sakithb/media-controls
Keywords: extension gnome mpris
Licenses: MIT
Provides: gnome-shell-extension-media-controls
Submitter: sakithb
Maintainer: sakithb (nfraprado)
Last Packager: nfraprado
Votes: 4
Popularity: 0.008220
First Submitted: 2021-09-16 15:42 (UTC)
Last Updated: 2026-02-04 03:15 (UTC)

Latest Comments

hyunbin commented on 2026-05-12 06:57 (UTC) (edited on 2026-05-12 06:57 (UTC) by hyunbin)

This repository has been archived, but here is a working PKGBUILD file for the latest version, 2.4.5.

pkgname=gnome-shell-extension-media-controls
pkgver=2.4.5
pkgrel=1
pkgdesc="A media indicator for the GNOME shell"
arch=('any')
url="https://github.com/sakithb/media-controls"
license=('MIT')
depends=('gnome-shell' 'glib2')
makedepends=('pnpm' 'nodejs')
provides=("${pkgname}")
options=(!strip !emptydirs)

_uuid="mediacontrols@cliffniff.github.com"
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/sakithb/media-controls/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('SKIP')

build() {
    cd "media-controls-$pkgver"

    pnpm install
    pnpm run build
}

package() {
    cd "media-controls-$pkgver"

    _destdir="$pkgdir/usr/share/gnome-shell/extensions/$_uuid"
    install -dm755 "$_destdir"

    _zipfile=$(find . -maxdepth 1 -name "*.zip" -print -quit)

    if [[ -n "$_zipfile" ]]; then
        bsdtar -xf "$_zipfile" -C "$_destdir/"
    else
        if [[ -d "dist" ]]; then
            cp -a dist/* "$_destdir/"
        elif [[ -d "extension" ]]; then
            cp -a extension/* "$_destdir/"
        else
            cp -a . "$_destdir/"
            rm -rf "$_destdir"/{node_modules,src,tests,.git,.github,*.tar.gz,*.zip}
        fi

        for item in metadata.json schemas stylesheet.css; do
            if [[ -e "$item" ]] && [[ ! -e "$_destdir/$item" ]]; then
                cp -a "$item" "$_destdir/"
            fi
        done
    fi

    if [[ -d "$_destdir/schemas" ]]; then
        glib-compile-schemas "$_destdir/schemas/"
    fi

    if [[ -f "$_destdir/metadata.json" ]]; then
        chmod 644 "$_destdir/metadata.json"
    fi
}

nfraprado commented on 2025-09-18 02:06 (UTC)

In order to update the package to the latest version, 2.2.0, and get that working (as a few tweaks were needed), the following patch is needed:

diff --git a/PKGBUILD b/../../gnome-shell-extension-media-controls/PKGBUILD
index 3d0ccdd2d484..6a929479a0d1 100644
--- a/PKGBUILD
+++ b/../../gnome-shell-extension-media-controls/PKGBUILD
@@ -1,5 +1,5 @@
 pkgname=gnome-shell-extension-media-controls
-pkgver=2.1.0
+pkgver=2.2.0
 pkgrel=0
 pkgdesc="A media indicator for the GNOME shell"
 arch=('any')
@@ -9,7 +9,7 @@ makedepends=()
 depends=('gnome-shell' 'glib2')
 provides=("${pkgname}")
 options=(!strip !emptydirs)
-source=("https://github.com/sakithb/media-controls/releases/download/v${pkgver}/mediacontrols@cliffniff.github.com.shell-extension.zip")
+source=("https://github.com/sakithb/media-controls/releases/download/v${pkgver}/mediacontrolscliffniff.github.com.shell-extension.zip")
 sha256sums=('SKIP')

 pkgver() {
@@ -19,7 +19,9 @@ pkgver() {

 package() {
     glib-compile-schemas $srcdir/schemas/
-    rm $srcdir/mediacontrols@cliffniff.github.com.shell-extension.zip
+    rm $srcdir/mediacontrolscliffniff.github.com.shell-extension.zip
+    
+    chmod 644 $srcdir/metadata.json

     destdir="$pkgdir/usr/share/gnome-shell/extensions/mediacontrols@cliffniff.github.com/"
     mkdir -p "$destdir"