summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 483c2f3671e117fcd6f6a37b22aa6fbf08bc681a (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
# Maintainer: bpozdena <https://github.com/bpozdena>

pkgname=onedrivegui-git
_pkgname=OneDriveGUI
pkgver=1.1.1a.r0.gff7edf1
pkgrel=4
pkgdesc="A simple GUI for OneDrive Linux client, with multi-account support."
url="https://github.com/bpozdena/${_pkgname}"
license=("GPL-3.0-or-later")
depends=("pyside6" "python-requests" "onedrive-abraunegg" "qt6-webengine")
makedepends=("git")
conflicts=("onedrivegui")
provides=("onedrivegui")
arch=("any")
source=(
	"git+${url}.git"
	"${_pkgname}-desktop-file.patch::${url}/pull/215.patch"
)
sha256sums=('SKIP'
            '213640add88486963daaa4d8d751fdf7fde81d8d2d1adc286c8a8ed104d8f53e')

pkgver() {
	cd "${_pkgname}/"
	git describe --tags --long | sed 's/v//;s/-/.r/;s/-/./g'
}

prepare() {
	cd "${_pkgname}/"
	patch -p1 -i "../${_pkgname}-desktop-file.patch"
}

package() {
	cd "${_pkgname}/src/"
	install -Dm755 "${_pkgname}.py" -t "${pkgdir}/usr/lib/${_pkgname}/"
	cp -r {resources,ui} "${pkgdir}/usr/lib/${_pkgname}/"

	cd resources
	install -Dm644 "images/${_pkgname}.png" -t "${pkgdir}/usr/share/icons/hicolor/48x48/apps/"
	install -Dm644 "${_pkgname}.desktop" -t "${pkgdir}/usr/share/applications/"

	install -d "${pkgdir}/usr/bin/"
	ln -sf "/usr/lib/${_pkgname}/${_pkgname}.py" "${pkgdir}/usr/bin/${_pkgname}"
}