summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 288dfdfe122e8b7d1e109e3a1e44370e58721baa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Maintainer: TheCynicalTeam <TheCynicalTeam@github.com>
# Contributor: 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.3
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=('exo: for Xfce support in xdg-open'
            'xorg-xprop: for Xfce support in xdg-open'
            'pcmanfm: for LXDE support in xdg-open'
            'pcmanfm-qt: for LXQT 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
        slock_support.diff)
md5sums=('902042508b626027a3709d105f0b63ff'
         'eab28cbb6c84860c19fb2a1bf58b9a55')

prepare() {
	cd $_pkgname-$pkgver
	# fix wrong hardcoded chromium binary name - FS#50184
	sed -i "s:chromium-browser:chromium:" scripts/xdg-open.in

	# 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
}