summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lambiris2021-04-13 23:34:25 -0400
committerTony Lambiris2021-04-13 23:34:25 -0400
commit4ce9b86f26a697d6f49c590403c63a39d243723e (patch)
tree4f5fa59a26a67021c53fd204f09b14fa6939172d
parentdab3c44806e5145d85053c124c4315860f98d32f (diff)
downloadaur-4ce9b86f26a697d6f49c590403c63a39d243723e.tar.gz
Version bump
-rw-r--r--.SRCINFO10
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD98
-rw-r--r--cpupower.install12
4 files changed, 76 insertions, 48 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6acd5fa2a36a..1c008bfabe57 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,17 @@
pkgbase = gnome-shell-extension-cpupower-git
pkgdesc = Gnome-Shell Extension for intel-pstate driver
- pkgver = r198.e2320e9
- pkgrel = 2
- url = https://github.com/martin31821/cpupower
+ pkgver = v9.0.4.r0.gc1d8863
+ pkgrel = 1
+ url = https://github.com/martin31821/cpupower.git
install = cpupower.install
arch = any
license = GPL3
makedepends = git
+ makedepends = zip
+ makedepends = unzip
depends = gnome-shell
depends = polkit
- source = git+https://github.com/martin31821/cpupower.git
+ source = gnome-shell-extension-cpupower-git::git+https://github.com/martin31821/cpupower.git
sha256sums = SKIP
pkgname = gnome-shell-extension-cpupower-git
diff --git a/.gitignore b/.gitignore
index ca167ec4b96f..bcb361033ef4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
src
pkg
-cpupower
-*pkg.tar.xz
+gnome-shell-extension-cpupower-git
+*.pkg.tar.*
tags
diff --git a/PKGBUILD b/PKGBUILD
index f621dda31386..bc1c9686f9a7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,57 +1,77 @@
# Maintainer: Tony Lambiris <tony@libpcap.net>
pkgname=gnome-shell-extension-cpupower-git
-_gitname=cpupower
-pkgver=r198.e2320e9
-pkgrel=2
+pkgver=v9.0.4.r0.gc1d8863
+pkgrel=1
pkgdesc="Gnome-Shell Extension for intel-pstate driver"
arch=('any')
-url="https://github.com/martin31821/cpupower"
+url="https://github.com/martin31821/cpupower.git"
license=('GPL3')
depends=('gnome-shell' 'polkit')
-makedepends=('git')
+makedepends=('git' 'zip' 'unzip')
install='cpupower.install'
-source=('git+https://github.com/martin31821/cpupower.git')
+source=("${pkgname}::git+${url}")
sha256sums=('SKIP')
pkgver() {
- cd $_gitname
+ cd "${srcdir}/${pkgname}"
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
-package() {
- cd $_gitname
+prepare() {
+ cd "${srcdir}/${pkgname}"
+
+ sed -i -e "s|VERSION=.*|VERSION=$pkgver|" Makefile
+}
+
+
+build() {
+ cd "${srcdir}/${pkgname}"
- # building/installation
make build
+}
+
- EXTPATH="${pkgdir}/usr/share/gnome-shell/extensions/cpupower@mko-sl.de"
- install -dm755 "${EXTPATH}"
- cp -a * "${EXTPATH}"
-
- # install cpufreqctl tool to /usr/bin/cpufreqctl
- install -Dm555 "tool/cpufreqctl" "${pkgdir}/usr/bin/cpufreqctl"
-
- # polkit policy file, authorizes /usr/bin/cpufreqctl to run
- POLICYDIR="${pkgdir}/usr/share/polkit-1/actions"
- POLICYFILE="mko.cpupower.setcpufreq.policy"
- install -dm755 "${POLICYDIR}"
- install -Dm644 "data/mko.cpupower.policy.in" "${POLICYDIR}/${POLICYFILE}"
-
- # polkit rules file, handles policy requests
- RULESDIR="${pkgdir}/usr/share/polkit-1/rules.d"
- RULESFILE="10-mko.cpupower.setcpufreq.rules"
- install -dm750 "${RULESDIR}"
- install -Dm644 "data/${RULESFILE}" "${RULESDIR}/${RULESFILE}"
-
- # gsettings xml schema file
- SCHEMADIR="${pkgdir}/usr/share/glib-2.0/schemas"
- SCHEMAFILE="org.gnome.shell.extensions.cpupower.gschema.xml"
- install -dm755 "${SCHEMADIR}"
- install -Dm644 "schemas/${SCHEMAFILE}" "${SCHEMADIR}/${SCHEMAFILE}"
-
- # update policy to reflect cpufreqctl path
- sed -i -e 's:{{PATH}}:/usr/bin/cpufreqctl:g' \
- -e 's:{{ID}}:mko.cpupower.setcpufreq:g' "${POLICYDIR}/${POLICYFILE}"
+package() {
+ cd "${srcdir}/${pkgname}"
+
+ make PREFIX="${pkgdir}/usr" install install-tool
+ find "${pkgdir}/usr" -type f -exec sed -i -e "s|$pkgdir||g" "{}" \;
}
+
+#package() {
+# cd $_gitname
+#
+# # building/installation
+# make build
+#
+# EXTPATH="${pkgdir}/usr/share/gnome-shell/extensions/cpupower@mko-sl.de"
+# install -dm755 "${EXTPATH}"
+# cp -a * "${EXTPATH}"
+#
+# # install cpufreqctl tool to /usr/bin/cpufreqctl
+# install -Dm555 "tool/cpufreqctl" "${pkgdir}/usr/bin/cpufreqctl"
+#
+# # polkit policy file, authorizes /usr/bin/cpufreqctl to run
+# POLICYDIR="${pkgdir}/usr/share/polkit-1/actions"
+# POLICYFILE="mko.cpupower.setcpufreq.policy"
+# install -dm755 "${POLICYDIR}"
+# install -Dm644 "data/mko.cpupower.policy.in" "${POLICYDIR}/${POLICYFILE}"
+#
+# # polkit rules file, handles policy requests
+# RULESDIR="${pkgdir}/usr/share/polkit-1/rules.d"
+# RULESFILE="10-mko.cpupower.setcpufreq.rules"
+# install -dm750 "${RULESDIR}"
+# install -Dm644 "data/${RULESFILE}" "${RULESDIR}/${RULESFILE}"
+#
+# # gsettings xml schema file
+# SCHEMADIR="${pkgdir}/usr/share/glib-2.0/schemas"
+# SCHEMAFILE="org.gnome.shell.extensions.cpupower.gschema.xml"
+# install -dm755 "${SCHEMADIR}"
+# install -Dm644 "schemas/${SCHEMAFILE}" "${SCHEMADIR}/${SCHEMAFILE}"
+#
+# # update policy to reflect cpufreqctl path
+# sed -i -e 's:{{PATH}}:/usr/bin/cpufreqctl:g' \
+# -e 's:{{ID}}:mko.cpupower.setcpufreq:g' "${POLICYDIR}/${POLICYFILE}"
+#}
diff --git a/cpupower.install b/cpupower.install
index 05e5aef0514c..b3d9d7e650fa 100644
--- a/cpupower.install
+++ b/cpupower.install
@@ -1,15 +1,13 @@
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_remove
}
instructions_install() {
@@ -28,3 +26,11 @@ instructions_upgrade() {
EOT
}
+
+instructions_remove() {
+ cat <<-EOT
+
+ Restart GNOME Shell ([Alt]+[F2], r) to unload the removed extension.
+
+ EOT
+}