summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVyacheslav Artemiev2017-05-09 07:06:21 +0300
committerVyacheslav Artemiev2017-05-09 07:10:22 +0300
commitc6a9516f41c56189bd2194761d88a456947f6056 (patch)
treeebd088b21693abcbace144c813dc8125cb3e6a75
downloadaur-c6a9516f41c56189bd2194761d88a456947f6056.tar.gz
Initial commit
-rw-r--r--.SRCINFO31
-rw-r--r--.gitignore15
-rw-r--r--PKGBUILD55
-rw-r--r--slock_support.diff45
-rw-r--r--support_for_KDE_Frameworks_5.6.diff43
5 files changed, 189 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..85e781eb8d9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,31 @@
+pkgbase = xdg-utils-slock
+ pkgdesc = Command line tools that assist applications with a variety of desktop integration tasks; patched to support slock lockscreen
+ pkgver = 1.1.1
+ pkgrel = 1
+ url = https://www.freedesktop.org/wiki/Software/xdg-utils/
+ arch = any
+ license = MIT
+ makedepends = docbook-xsl
+ makedepends = lynx
+ makedepends = xmlto
+ makedepends = git
+ depends = sh
+ depends = xorg-xset
+ optdepends = kde-cli-tools: for KDE Plasma5 support in xdg-open
+ optdepends = exo: for Xfce support in xdg-open
+ optdepends = xorg-xprop: for Xfce support in xdg-open
+ optdepends = pcmanfm: for LXDE support in xdg-open
+ optdepends = perl-file-mimeinfo: for generic support in xdg-open
+ optdepends = perl-net-dbus: Perl extension to dbus used in xdg-screensaver
+ optdepends = perl-x11-protocol: Perl X11 protocol used in xdg-screensaver
+ provides = xdg-utils
+ conflicts = xdg-utils
+ source = https://portland.freedesktop.org/download/xdg-utils-1.1.1.tar.gz
+ source = support_for_KDE_Frameworks_5.6.diff
+ source = slock_support.diff
+ md5sums = 2d0aec6037769a5f138ff404b1bb4b15
+ md5sums = fc0a612362e00cc091d2c1ebbfbfc500
+ md5sums = eab28cbb6c84860c19fb2a1bf58b9a55
+
+pkgname = xdg-utils-slock
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..da453707d8f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,15 @@
+src/
+pkg/
+*.gz
+*.xz
+*.bz2
+*.zip
+*.part
+*.sig
+*.sign
+*.txt
+*.log
+*.scm
+xdg-utils/
+*.pkg
+*.asc
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..bc8c58731e6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Vyacheslav Artemiev <artemiev.vyacheslav a gmail d com>
+# Contributor: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: Jan de Groot <jgc@archlinux.org>
+
+_pkgname=xdg-utils
+pkgname=$_pkgname-slock
+pkgver=1.1.1
+pkgrel=1
+pkgdesc="Command line tools that assist applications with a variety of desktop integration tasks; patched to support slock lockscreen"
+arch=('any')
+url="https://www.freedesktop.org/wiki/Software/xdg-utils/"
+license=('MIT')
+depends=('sh' 'xorg-xset') # xset needed inside xdg-screensaver
+makedepends=('docbook-xsl' 'lynx' 'xmlto' 'git')
+optdepends=('kde-cli-tools: for KDE Plasma5 support in xdg-open'
+ 'exo: for Xfce support in xdg-open'
+ 'xorg-xprop: for Xfce support in xdg-open'
+ 'pcmanfm: for LXDE support in xdg-open'
+ 'perl-file-mimeinfo: for generic support in xdg-open'
+ 'perl-net-dbus: Perl extension to dbus used in xdg-screensaver'
+ 'perl-x11-protocol: Perl X11 protocol used in xdg-screensaver')
+provides=($_pkgname)
+conflicts=($_pkgname)
+source=(https://portland.freedesktop.org/download/$_pkgname-$pkgver.tar.gz
+ support_for_KDE_Frameworks_5.6.diff
+ slock_support.diff)
+md5sums=('2d0aec6037769a5f138ff404b1bb4b15'
+ 'fc0a612362e00cc091d2c1ebbfbfc500'
+ 'eab28cbb6c84860c19fb2a1bf58b9a55')
+
+prepare() {
+ cd $_pkgname-$pkgver
+ # fix wrong hardcoded chromium binary name - FS#50184
+ sed -i "s:chromium-browser:chromium:" scripts/xdg-open.in
+
+ # fix KDE support, FS#48668
+ patch -Np1 -i $srcdir/support_for_KDE_Frameworks_5.6.diff
+ # add slock lockscreen support
+ patch -p1 -i ${srcdir}/slock_support.diff
+}
+
+build() {
+ cd $_pkgname-$pkgver
+ ./configure --prefix=/usr --mandir=/usr/share/man
+ make
+}
+
+package() {
+ cd $_pkgname-$pkgver
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ # install empty directory to prevent xdg-desktop-menu install *.desktop to fail, see FS#33316
+ install -dm755 $pkgdir/usr/share/desktop-directories
+}
diff --git a/slock_support.diff b/slock_support.diff
new file mode 100644
index 00000000000..02df6b2e6d4
--- /dev/null
+++ b/slock_support.diff
@@ -0,0 +1,45 @@
+diff -ura xdg-utils-1.1.1/scripts/xdg-screensaver.in xdg-utils-1.1.1.new/scripts/xdg-screensaver.in
+--- xdg-utils-1.1.1/scripts/xdg-screensaver.in 2015-10-05 21:59:19.000000000 +0300
++++ xdg-utils-1.1.1.new/scripts/xdg-screensaver.in 2017-05-09 06:03:28.554966637 +0300
+@@ -102,6 +102,10 @@
+ screensaver_mate_screensaver "$1"
+ ;;
+
++ slock_screensaver)
++ screensaver_slock "$1"
++ ;;
++
+ xscreensaver)
+ screensaver_xscreensaver "$1"
+ ;;
+@@ -372,6 +376,21 @@
+ esac
+ }
+
++screensaver_slock()
++{
++ case "$1" in
++ lock)
++ slock > /dev/null
++ result=$?
++ ;;
++
++ *)
++ echo "ERROR: Unknown command '$1'" >&2
++ return 1
++ ;;
++ esac
++}
++
+ screensaver_xserver()
+ {
+ case "$1" in
+@@ -790,6 +809,8 @@
+ dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.mate.ScreenSaver > /dev/null 2>&1 && DE="mate_screensaver"
+ # Consider "xautolock" a separate DE
+ xautolock -enable > /dev/null 2>&1 && DE="xautolock_screensaver"
++# Consider "slock" a separate DE
++slock -v > /dev/null 2>&1 && DE="slock_screensaver"
+
+ if [ "$action" = "resume" ] ; then
+ do_resume
diff --git a/support_for_KDE_Frameworks_5.6.diff b/support_for_KDE_Frameworks_5.6.diff
new file mode 100644
index 00000000000..eee4684c17c
--- /dev/null
+++ b/support_for_KDE_Frameworks_5.6.diff
@@ -0,0 +1,43 @@
+From 31db8136bdf61e7f9cb866f9d47c99c63343558d Mon Sep 17 00:00:00 2001
+From: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
+Date: Fri, 15 Apr 2016 11:17:37 +0200
+Subject: xdg-mime: support for KDE Frameworks 5.6
+
+
+diff --git a/scripts/xdg-mime.in b/scripts/xdg-mime.in
+index 129850f..63b8a82 100644
+--- a/scripts/xdg-mime.in
++++ b/scripts/xdg-mime.in
+@@ -428,13 +428,9 @@ defapp_kde()
+ case "${KDE_SESSION_VERSION}" in
+ 4)
+ KTRADER=`which ktraderclient 2> /dev/null`
+- MIMETYPE="--mimetype"
+- SERVICETYPE="--servicetype"
+ ;;
+ 5)
+ KTRADER=`which ktraderclient${KDE_SESSION_VERSION} 2> /dev/null`
+- MIMETYPE="--mimetype"
+- SERVICETYPE="--servicetype"
+ ;;
+ esac
+ else
+@@ -442,8 +438,8 @@ defapp_kde()
+ fi
+ if [ -n "$KTRADER" ] ; then
+ DEBUG 1 "Running KDE trader query \"$MIME\" mimetype and \"Application\" servicetype"
+- trader_result=`$KTRADER $MIMETYPE "$MIME" $SERVICETYPE Application 2>/dev/null \
+- | grep DesktopEntryPath | head -n 1 | cut -d ':' -f 2 | cut -d \' -f 2`
++ trader_result=`$KTRADER --mimetype "$MIME" --servicetype Application 2>/dev/null \
++ | grep -E "^DesktopEntryPath : |\.desktop$" | head -n1 | sed "s/^DesktopEntryPath : '\(.*\.desktop\)'\$/\1/"`
+ if [ -n "$trader_result" ] ; then
+ basename "$trader_result"
+ exit_success
+@@ -954,4 +950,3 @@ esac
+ update_mime_database $xdg_base_dir
+
+ exit_success
+-
+--
+cgit v0.10.2
+