summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4a0b6c50ca65d5c91dd5aa42bfb9a2a005f75387 (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
# Maintainer: SiƓn le Roux <sion@leroux.hu>

pkgname="gnome-thumbnailers-git"
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
pkgver=r23.6d695f6
pkgrel=3
pkgdesc="Thumbnailing utilities for 3D files for GNOME 42+"
arch=(any)
url="https://github.com/rcarmo/gnome-thumbnailers"
license=('MIT')
depends=('python')
makedepends=('git')
optdepends=('xorg-server-xvfb: OpenSCAD support'
			'openscad: OpenSCAD support'
			'imagemagick: OpenSCAD support'
			'blender: Blender support')
source=("${pkgname}::git+${url}.git"
		"no-stl.patch")
md5sums=('SKIP'
		'f28a407987f6c319552ebf3d7fa19d5b')

pkgver() {
	cd "$srcdir/${pkgname}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
	cd "$srcdir/${pkgname}"
	patch -p1 -i "$srcdir/no-stl.patch"
	sed -i "/^Exec=/ s+/usr/local/bin/+/usr/bin/+" "$srcdir/${pkgname}"/*.thumbnailer
}

package() {
	mkdir -p "${pkgdir}/usr/bin"
	cp "$srcdir/${pkgname}"/*_thumbnailer "${pkgdir}/usr/bin"
	mkdir -p "${pkgdir}/usr/share/thumbnailers"
	cp "$srcdir/${pkgname}"/*.thumbnailer "${pkgdir}/usr/share/thumbnailers"
}