diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-09-03 16:10:12 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-09-03 16:10:12 -0300 |
commit | 037bcb846a6662420bd0f5d1edaad58bda4c86a7 (patch) | |
tree | 82494884d013c7b2cc9cd5df16c54cae0712d472 /community/cinnamon-screensaver | |
parent | 830afd54d0d990fdb982292bed4c97f577dc195d (diff) | |
parent | 3aa73e2018f321c9ccff8eca801b1c2fa9f18fa8 (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
community/darkhttpd/PKGBUILD
community/gnome-panel/PKGBUILD
community/gpicview/PKGBUILD
community/iftop/PKGBUILD
community/lazarus/PKGBUILD
community/netsurf/PKGBUILD
community/polkit-gnome/PKGBUILD
community/texvc/PKGBUILD
community/unbound/PKGBUILD
community/xfmedia/PKGBUILD
core/glibc/PKGBUILD
extra/arora/PKGBUILD
extra/cairo/PKGBUILD
extra/graphviz/PKGBUILD
extra/libmng/PKGBUILD
extra/mesa/PKGBUILD
extra/nx/PKGBUILD
extra/qt4/PKGBUILD
extra/qt5/PKGBUILD
extra/sqlite/PKGBUILD
libre/midori-libre/PKGBUILD
~fauno/distccd-zeroconf/PKGBUILD
~fauno/kyotocabinet/PKGBUILD
~fauno/kyototycoon/PKGBUILD
Diffstat (limited to 'community/cinnamon-screensaver')
4 files changed, 67 insertions, 31 deletions
diff --git a/community/cinnamon-screensaver/PKGBUILD b/community/cinnamon-screensaver/PKGBUILD index 0fdc354ef..7b0cfa99c 100644 --- a/community/cinnamon-screensaver/PKGBUILD +++ b/community/cinnamon-screensaver/PKGBUILD @@ -5,7 +5,7 @@ pkgname=cinnamon-screensaver pkgver=1.8.0 -pkgrel=1 +pkgrel=2 pkgdesc="Screensaver designed to integrate well with the Cinnamon desktop." arch=('i686' 'x86_64' 'mips64el') license=('GPL') @@ -15,15 +15,13 @@ depends=('cinnamon' 'gnome-screensaver') makedepends=('intltool' 'gnome-common') options=(!emptydirs) source=($pkgname-$pkgver.tar.gz::https://github.com/linuxmint/cinnamon-screensaver/archive/$pkgver.tar.gz - cinnamon-screensaver.desktop - cinnamon2d-screensaver.desktop cinnamon-screensaver.pam - fix-dbus-compatibility.patch) + fix-dbus-compatibility.patch + lock_screen_on_suspend.patch) sha256sums=('e85722d5af2ecbed98f50909285b335d7635214bf8cada49964f60bb5d1339c1' - '2f29a72991deb5cc2b44da06f49d1115148fee6a0a22b1abfecee1c1661abcaa' - '335df8f2fb270484829d94995622521f0a42a12d6887f7de827db34fc81f583a' 'b6ea9e2eb586d94bcabb617a8f1c2958111df87afdbb51f645882bccdc15cbda' - 'eebd1d056c21d2d3f60fb954677b9214fd1d575ed1c2bbb56326cedf41a39eb6') + 'eebd1d056c21d2d3f60fb954677b9214fd1d575ed1c2bbb56326cedf41a39eb6' + '516c479558576c6c5a2509abfcbf4fdafb5953d252e7a4ab972f9db6137daca8') build() { cd $pkgname-$pkgver @@ -32,6 +30,9 @@ build() { # Fix compatibility with gnome-screensaver's D-Bus interface and various fixes patch -Np1 -i ${srcdir}/fix-dbus-compatibility.patch + # Lock screen on suspend with systemd + patch -Np1 -i ${srcdir}/lock_screen_on_suspend.patch + ./autogen.sh --prefix=/usr --sysconfdir=/etc \ --libexecdir=/usr/lib/cinnamon-screensaver \ --localstatedir=/var \ @@ -48,6 +49,12 @@ package() { rm "$pkgdir"/usr/bin/gnome-screensaver{,-command} # Autostart only in Cinnamon - install -m644 "$srcdir/cinnamon-screensaver.desktop" "$pkgdir/etc/xdg/autostart/cinnamon-screensaver.desktop" - install -m644 "$srcdir/cinnamon2d-screensaver.desktop" "$pkgdir/etc/xdg/autostart/cinnamon2d-screensaver.desktop" + cp "$pkgdir/etc/xdg/autostart/cinnamon-screensaver.desktop" \ + "$pkgdir/etc/xdg/autostart/cinnamon2d-screensaver.desktop" + sed -i 's/^OnlyShowIn=.*/OnlyShowIn=GNOME;/' \ + "$pkgdir"/etc/xdg/autostart/cinnamon{,2d}-screensaver.desktop + echo 'AutostartCondition=GNOME3 if-session cinnamon' \ + >> "$pkgdir/etc/xdg/autostart/cinnamon-screensaver.desktop" + echo 'AutostartCondition=GNOME3 if-session cinnamon2d' \ + >> "$pkgdir/etc/xdg/autostart/cinnamon2d-screensaver.desktop" } diff --git a/community/cinnamon-screensaver/cinnamon-screensaver.desktop b/community/cinnamon-screensaver/cinnamon-screensaver.desktop deleted file mode 100644 index 75c81ca26..000000000 --- a/community/cinnamon-screensaver/cinnamon-screensaver.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Type=Application -Name=Cinnamon Screensaver -Comment=Launch screensaver and locker program -Icon=preferences-desktop-screensaver -Exec=cinnamon-screensaver -OnlyShowIn=GNOME; -AutostartCondition=GNOME3 if-session cinnamon -NoDisplay=true -X-GNOME-Autostart-Phase=Application -X-GNOME-Autostart-Notify=true diff --git a/community/cinnamon-screensaver/cinnamon2d-screensaver.desktop b/community/cinnamon-screensaver/cinnamon2d-screensaver.desktop deleted file mode 100644 index d9d50012c..000000000 --- a/community/cinnamon-screensaver/cinnamon2d-screensaver.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Type=Application -Name=Cinnamon Screensaver -Comment=Launch screensaver and locker program -Icon=preferences-desktop-screensaver -Exec=cinnamon-screensaver -OnlyShowIn=GNOME; -AutostartCondition=GNOME3 if-session cinnamon2d -NoDisplay=true -X-GNOME-Autostart-Phase=Application -X-GNOME-Autostart-Notify=true diff --git a/community/cinnamon-screensaver/lock_screen_on_suspend.patch b/community/cinnamon-screensaver/lock_screen_on_suspend.patch new file mode 100644 index 000000000..5c273c70e --- /dev/null +++ b/community/cinnamon-screensaver/lock_screen_on_suspend.patch @@ -0,0 +1,51 @@ +From f8f9beb6a3bf81240d36bfec43e5db9b102ea91e Mon Sep 17 00:00:00 2001 +From: Martin Pitt <martinpitt@gnome.org> +Date: Wed, 1 May 2013 10:55:49 -0700 +Subject: [PATCH] Lock screen on suspend + +Listen for logind's PrepareForSleep signal, and lock the screen (if configured +to do so). This mirrors what gnome-shell's screensaver does. +--- + src/gs-listener-dbus.c | 28 ++++++++++++++++++++++++++++ + src/gs-listener-dbus.h | 1 + + src/gs-monitor.c | 20 ++++++++++++++++++++ + 3 files changed, 49 insertions(+) + +diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c +index 7f718fa..49586fd 100644 +--- a/src/gs-listener-dbus.c ++++ b/src/gs-listener-dbus.c +@@ -871,6 +872,17 @@ listener_dbus_handle_system_message (DBusConnection *connection, + } + + return DBUS_HANDLER_RESULT_HANDLED; ++ } else if (dbus_message_is_signal (message, SYSTEMD_LOGIND_INTERFACE, "PrepareForSleep")) { ++ gboolean active; ++ if (dbus_message_get_args (message, NULL, ++ DBUS_TYPE_BOOLEAN, &active, ++ DBUS_TYPE_INVALID) && active) { ++ gs_debug ("systemd notified that system is about to sleep"); ++ g_signal_emit (listener, signals [LOCK], 0); ++ } else { ++ gs_debug ("cannot parse PrepareForSleep"); ++ } ++ return DBUS_HANDLER_RESULT_HANDLED; + } else if (dbus_message_is_signal (message, DBUS_INTERFACE_PROPERTIES, "PropertiesChanged")) { + + if (_listener_message_path_is_our_session (listener, message)) { +@@ -1370,6 +1392,12 @@ gs_listener_acquire (GSListener *listener, + ",interface='"DBUS_INTERFACE_PROPERTIES"'" + ",member='PropertiesChanged'", + NULL); ++ dbus_bus_add_match (listener->priv->system_connection, ++ "type='signal'" ++ ",sender='"SYSTEMD_LOGIND_SERVICE"'" ++ ",interface='"SYSTEMD_LOGIND_INTERFACE"'" ++ ",member='PrepareForSleep'", ++ NULL); + + return (res != -1); + } +-- +1.8.1.2 + |