diff options
-rw-r--r-- | .SRCINFO | 32 | ||||
-rw-r--r-- | PKGBUILD | 48 | ||||
-rw-r--r-- | indicator-sensors.install | 13 | ||||
-rw-r--r-- | is-udisks2.rules | 11 | ||||
-rw-r--r-- | menu-cleanup.patch | 56 |
5 files changed, 160 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9932042fceb8 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,32 @@ +# Generated by mksrcinfo v8 +# Sun Mar 26 14:53:57 UTC 2017 +pkgbase = indicator-sensors-git + pkgdesc = Small application to provide hardware sensor readings using the AppIndicator framework (git version) + pkgver = 0.8.r28.gd267b5c + pkgrel = 1 + url = https://github.com/alexmurray/indicator-sensors + install = indicator-sensors.install + arch = i686 + arch = x86_64 + license = GPL3 + makedepends = gnome-common + makedepends = intltool + depends = dconf + depends = libappindicator-gtk3 + depends = libatasmart + depends = libnotify + depends = libpeas + depends = lm_sensors + depends = udisks2 + optdepends = libxnvctrl: NVIDIA GPU support + provides = indicator-sensors + conflicts = indicator-sensors + source = git+https://github.com/alexmurray/indicator-sensors + source = menu-cleanup.patch + source = is-udisks2.rules + md5sums = SKIP + md5sums = 7f41886142704131faba29ce87ae07ed + md5sums = 73468b5a1034ed57cb94c48ba26d2300 + +pkgname = indicator-sensors-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b130dcd3bd88 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Que Quotion <quequotion@bugmenot.com> + +pkgname=indicator-sensors-git +pkgver=0.8.r28.gd267b5c +pkgrel=1 +pkgdesc="Small application to provide hardware sensor readings using the AppIndicator framework (git version)" +arch=('i686' 'x86_64') +url="https://github.com/alexmurray/indicator-sensors" +license=('GPL3') +provides=('indicator-sensors') +conflicts=('indicator-sensors') +depends=('dconf' 'libappindicator-gtk3' 'libatasmart' 'libnotify' 'libpeas' 'lm_sensors' 'udisks2') +optdepends=('libxnvctrl: NVIDIA GPU support') +makedepends=('gnome-common' 'intltool') +install=indicator-sensors.install +source=(git+https://github.com/alexmurray/indicator-sensors + menu-cleanup.patch + is-udisks2.rules) +md5sums=('SKIP' + '7f41886142704131faba29ce87ae07ed' + '73468b5a1034ed57cb94c48ba26d2300') + +pkgver() { + cd "indicator-sensors" + git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd indicator-sensors + + #Cleanup indicator menu (remove "about" and "quit") + patch -Np2 < ../menu-cleanup.patch +} + +build() { + cd indicator-sensors + sh ./autogen.sh + ./configure --disable-schemas-compile --prefix=/usr + make +} + +package() { + cd indicator-sensors + make DESTDIR="$pkgdir" install + mkdir -p "$pkgdir"/etc/polkit-1/rules.d/ + install -m 644 ../is-udisks2.rules "$pkgdir"/etc/polkit-1/rules.d/ +} + diff --git a/indicator-sensors.install b/indicator-sensors.install new file mode 100644 index 000000000000..2d40a7b03f98 --- /dev/null +++ b/indicator-sensors.install @@ -0,0 +1,13 @@ +post_install() { + post_remove $1 +} + +post_upgrade() { + post_remove $1 +} + +post_remove() { + glib-compile-schemas usr/share/glib-2.0/schemas + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + diff --git a/is-udisks2.rules b/is-udisks2.rules new file mode 100644 index 000000000000..dd209d38e7af --- /dev/null +++ b/is-udisks2.rules @@ -0,0 +1,11 @@ +polkit.addRule(function(action, subject) { + var YES = polkit.Result.YES; + var permission = { + // only required for udisks2: + "org.freedesktop.udisks2.ata-check-power": YES, + "org.freedesktop.udisks2.ata-smart-update": YES, + }; + if (subject.isInGroup("users")) { + return permission[action.id]; + } +}); diff --git a/menu-cleanup.patch b/menu-cleanup.patch new file mode 100644 index 000000000000..3a886992bd3f --- /dev/null +++ b/menu-cleanup.patch @@ -0,0 +1,56 @@ +--- src/indicator-sensors-0.8/indicator-sensors/is-indicator.c 2014-10-11 19:21:18.000000000 +0900 ++++ src/indicator-sensors-0.8/indicator-sensors/is-indicator.c 2015-11-17 12:24:44.989487160 +0900 +@@ -154,10 +154,6 @@ + + static void prefs_action(GtkAction *action, + IsIndicator *self); +-static void about_action(GtkAction *action, +- IsIndicator *self); +-static void quit_action(GtkAction *action, +- IsIndicator *self); + + static GtkActionEntry entries[] = + { +@@ -165,14 +161,6 @@ + "Preferences", "application-preferences", N_("Preferences…"), NULL, + N_("Preferences"), G_CALLBACK(prefs_action) + }, +- { +- "About", "about", N_("About…"), NULL, +- N_("About"), G_CALLBACK(about_action) +- }, +- { +- "Quit", NULL, N_("_Quit"), NULL, +- N_("Quit"), G_CALLBACK(quit_action) +- }, + }; + static guint n_entries = G_N_ELEMENTS(entries); + +@@ -180,8 +168,6 @@ + "<ui>" + " <popup name='Indicator'>" + " <menuitem action='Preferences' />" +- " <menuitem action='About' />" +- " <menuitem action='Quit' />" + " </popup>" + "</ui>"; + +@@ -191,18 +177,6 @@ + is_application_show_preferences(self->priv->application); + } + +-static void about_action(GtkAction *action, +- IsIndicator *self) +-{ +- is_application_show_about(self->priv->application); +-} +- +-static void quit_action(GtkAction *action, +- IsIndicator *self) +-{ +- is_application_quit(self->priv->application); +-} +- + static void + is_indicator_set_label(IsIndicator *self, + const gchar *label) |