summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0eb99bb602aa5e17ac3315cf0a2b1aaf673b8e3e (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
53
# Maintainer: SelfRef <arch@selfref.dev>

_basename=ab-download-manager
pkgname=${_basename}-git
pkgver=1.4.1.r7.gd0c6ae5
pkgrel=1
pkgdesc="A Download Manager that speeds up your downloads"
arch=('any')
url="https://abdownloadmanager.com"
license=('Apache-2.0')
depends=(
	'libxrender'
	'libxtst'
	'harfbuzz'
	'fontconfig'
)
makedepends=(
	'git'
	'java-environment=17'
	'gradle'
)
optdepends=(
	'libappindicator-gtk3: Tray icon support'
)
provides=("$_basename")
conflicts=("$_basename" abdownloadmanager-bin)
source=(
	"$_basename::git+https://github.com/amir1376/ab-download-manager.git"
	'abdownloadmanager.desktop'
)
sha256sums=('SKIP'
						'd194cf142921d78c8a2a8c6c2b3a8b41bf2545eb2c7147a8f866946528227031')

pkgver() {
	cd "$_basename"
	git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
}

build() {
	cd "$_basename"
	export JAVA_HOME=/usr/lib/jvm/java-17-openjdk
	gradle createReleaseDistributable
}

package() {
	cd "$_basename"
	mkdir -p "$pkgdir/opt/abdownloadmanager/"
	cp -r desktop/app/build/compose/binaries/main-release/app/ABDownloadManager/* "$pkgdir/opt/abdownloadmanager/"

	install -Dm644 desktop/app/icons/icon.png "$pkgdir/usr/share/icons/hicolor/512x512/apps/abdownloadmanager.png"
	install -Dm644 "$srcdir/../abdownloadmanager.desktop" "$pkgdir/usr/share/applications/abdownloadmanager.desktop"
}