summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schendel2022-12-01 00:03:40 +0100
committerChristian Schendel2022-12-01 00:03:40 +0100
commitbf804c1d6745adf9e1fbdb4f56fffad4fbbf1317 (patch)
tree5bf82855711aefb5cc73ff085bf5c7e2448eeeca
downloadaur-bf804c1d6745adf9e1fbdb4f56fffad4fbbf1317.tar.gz
initial commit
-rw-r--r--.SRCINFO18
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD55
-rw-r--r--gnome-shell-extension-dynamic-calendar-and-clocks-icons.install30
4 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..77517fbc6e62
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = gnome-shell-extension-dynamic-calendar-and-clocks-icons
+ pkgdesc = A GNOME shell extension that let Calendar and Clocks icons show current date and time.
+ pkgver = r8.388f2d7
+ pkgrel = 1
+ url = https://github.com/fcusr/dynamic-calendar-and-clocks-icons
+ install = gnome-shell-extension-dynamic-calendar-and-clocks-icons.install
+ arch = any
+ license = GPL3
+ makedepends = git
+ makedepends = glib2
+ depends = gnome-shell>=1:43
+ provides = gnome-shell-extension-dynamic-calendar-and-clocks-icons
+ conflicts = gnome-shell-extension-dynamic-calendar-and-clocks-icons
+ options = !strip
+ source = gnome-shell-extension-dynamic-calendar-and-clocks-icons::git+https://github.com/fcusr/dynamic-calendar-and-clocks-icons.git
+ sha256sums = SKIP
+
+pkgname = gnome-shell-extension-dynamic-calendar-and-clocks-icons
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..833085309a2e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.tar.gz
+*.pkg.tar.zst
+*/*
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f38b06026ed2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Christian Schendel <doppelhelix@gmail.com>
+
+pkgname=gnome-shell-extension-dynamic-calendar-and-clocks-icons
+pkgver=r8.388f2d7
+pkgrel=1
+pkgdesc="A GNOME shell extension that let Calendar and Clocks icons show current date and time."
+arch=('any')
+url="https://github.com/fcusr/dynamic-calendar-and-clocks-icons"
+install="${pkgname%-git}.install"
+license=('GPL3')
+depends=('gnome-shell>=1:43')
+makedepends=('git'
+ 'glib2')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+options=('!strip')
+source=("${pkgname%-git}::git+${url}.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "${srcdir}/${pkgname%-git}"
+
+ # support repositories that start without a tag but get tagged later on
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+package() {
+ # Some extensions use make only to zip. We need to harcode the existing path
+ local extension_dir="${srcdir}/${pkgname%-git}/dynamic-calendar-and-clocks-icons@fcusr.github.com"
+
+ cd "${extension_dir}"
+
+ # It's nice to have a well-formed metadata.json but we need to work around some hickups that may occur
+ local uuid=$(grep -Po '(?<="uuid": ")[^"]*' metadata.json)
+ local schema=$(grep -Po '(?<="settings-schema": ")[^"]*' metadata.json).gschema.xml
+ local schema=org.gnome.shell.extensions.dynamic-calendar-and-clocks-icons.gschema.xml
+ local destdir="${pkgdir}/usr/share/gnome-shell/extensions/${uuid}"
+
+ install -dm755 "${destdir}"
+ # Don't install unnecessary files
+ find . -regextype posix-egrep -regex ".*\.(js|json|xml|png|css|compiled)$" -exec\
+ install -Dm 644 {} ${destdir}/{} \;
+
+ install -Dm644 "schemas/${schema}" \
+ "${pkgdir}/usr/share/glib-2.0/schemas/${schema}"
+
+ # rebuild compiled GSettings schemas if missing
+ if [[ ! -f "${destdir}/schemas/gschemas.compiled" ]]; then
+ glib-compile-schemas "${destdir}/schemas"
+ fi
+}
+
diff --git a/gnome-shell-extension-dynamic-calendar-and-clocks-icons.install b/gnome-shell-extension-dynamic-calendar-and-clocks-icons.install
new file mode 100644
index 000000000000..7f4546e45017
--- /dev/null
+++ b/gnome-shell-extension-dynamic-calendar-and-clocks-icons.install
@@ -0,0 +1,30 @@
+post_install() {
+ /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/
+ instructions_install
+}
+
+post_upgrade() {
+ /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/
+ instructions_upgrade
+}
+
+post_remove() {
+ /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/
+}
+
+instructions_install() {
+ /bin/cat << EOF
+
+Restart GNOME Shell ([Alt]+[F2], r).
+Activate the extension with gnome-tweak-tool.
+
+EOF
+}
+
+instructions_upgrade() {
+ /bin/cat << EOF
+
+Restart GNOME Shell ([Alt]+[F2], r) to load the upgraded extension.
+
+EOF
+}