summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f702d832364a85103d898a8dd1398f4a2f384625 (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
# Maintainer: Mark Wagie <mark dot wagie at tutanota dot com>
pkgname=('drill-search-cli' 'drill-search-gtk')
pkgbase=drill-search
pkgver=2.1.1
pkgrel=7
pkgdesc="Search files without indexing, but clever crawling"
arch=('x86_64')
url="https://drill.software"
license=('GPL2')
makedepends=('dmd' 'dub')
install="$pkgbase.install"
source=("$pkgbase-$pkgver.tar.gz::https://github.com/yatima1460/Drill/archive/$pkgver.tar.gz"
        "$pkgbase"
        "$pkgbase-gtk.desktop")
sha256sums=('ecd3a976e85210a21d0bb0082b490993d9c152c7b0b2183293e003a20b512d54'
            'b875f928546aee7855cb1db9afc8ab3f1a8a34d43de5bbd62f7076d7ba9f3917'
            '5bafb37baf608a3168abba2ab9ea174a1d0f0472f52d3222ea0a05957c997c50')

build() {
    cd "Drill-$pkgver"
    dub build --parallel -b release -c CLI
    dub build --parallel -b release -c GTK
}

package_drill-search-cli() {
	pkgdesc+=" (CLI version)"

	cd "Drill-$pkgver/Build/Drill-CLI-linux-$arch-release"
	install -d "$pkgdir/"{opt/$pkgname,usr/bin}
	cp -r Assets "$pkgdir/opt/$pkgname"
	install -Dm755 "$pkgname" -t "$pkgdir/opt/$pkgname"
	install -Dm755 "$srcdir/$pkgbase" "$pkgdir/usr/bin/$pkgname"
	echo "/opt/$pkgname/$pkgname" "\$@" >> "$pkgdir/usr/bin/$pkgname"
}

package_drill-search-gtk() {
	pkgdesc+=" (GTK version)"
	depends=('gtk3' 'xdg-utils')

	cd "Drill-$pkgver/Build/Drill-GTK-linux-$arch-release"
	install -d "$pkgdir/"{opt/$pkgname,usr/bin}
	cp -r Assets "$pkgdir/opt/$pkgname"
	install -Dm755 "$pkgname" -t "$pkgdir/opt/$pkgname"
	install -Dm755 "$srcdir/$pkgbase" "$pkgdir/usr/bin/$pkgname"
	echo "/opt/$pkgname/$pkgname" "\$@" >> "$pkgdir/usr/bin/$pkgname"
	install -Dm644 Assets/icon.svg \
		"$pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgname.svg"
	install -Dm644 "$srcdir/$pkgname.desktop" -t \
		"$pkgdir/usr/share/applications"
}