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
# Contributor: Lex Black <autumn-wind at web dot de>
# Contributor: matthewbauer <[email protected]>
# Contributor: Jan de Groot <[email protected]>
# Contributor: cantabile <cantabile dot desu at gmail dot com>


_pkgname=xdg-utils

pkgname=${_pkgname}-mimeo
_oldver=1.1.0
_gitver=050333e34e2fe7430ad2ead37e5a0420ac0c2a3e # xdg-mime does not search mimeinfo.cache
_gitdate=20121008
pkgver=${_oldver}.git${_gitdate}
pkgrel=2
pkgdesc='Command line tools that assist applications with a variety of desktop integration tasks; patched to use mimeo'
arch=('any')
url='http://portland.freedesktop.org/'
license=('MIT')
depends=('sh' 'xorg-xset' 'mimeo')
makedepends=('docbook-xsl' 'lynx' 'xmlto')
optdepends=('kdebase-runtime: for KDE support in xdg-open'
	'libgnome: for GNOME 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'
	'mimeo: for mimeo support in xdg-open'
	'perl-file-mimeinfo: for generic support in xdg-open')
provides=('xdg-utils')
conflicts=('xdg-utils')
source=(#"ftp://ftp.archlinux.org/other/${_pkgname}/${_pkgname}-${pkgver}.tar.xz"
	#http://portland.freedesktop.org/download/${_pkgname}-${pkgver/rc1/-rc1}.tar.gz
	ftp://ftp.archlinux.org/other/$_pkgname/xdg-utils-${_gitver}.tar.gz
	mimeo-detection.diff)
md5sums=('cc321af15724cf7ee1ef014c4a0120ea'
         'ac6a5d17fb5fc6bb352257e72008d15d')

build() {
	cd ${srcdir}/${_pkgname}-${_gitver}
	patch -p1 -i "${srcdir}"/mimeo-detection.diff
	./configure --prefix=/usr --mandir=/usr/share/man
	make scripts-clean -C scripts
	make man scripts -C scripts
}

package() {
	cd ${srcdir}/${_pkgname}-${_gitver}
	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
}