summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d5edce28401ed203af9ce596bfe408465f764616 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Maintainer: Kimiblock Moe
# Contributor: Integral

pkgname=qcm-git
pkgver=1.0.2.r5.gab29b2cd
pkgrel=3
pkgdesc="Qt client for netease cloud music"
arch=('x86_64')
url="https://github.com/hypengw/Qcm"
license=('GPL-2.0-or-later')
depends=(
	'qt6-base'
	'qt6-shadertools'
	'hicolor-icon-theme'
	'curl'
	'openssl'
	'qt6-tools'
	'qt6-declarative'
	'gcc-libs'
	'glibc'
	'dbus'
	'libnghttp2'
	'libidn2'
	'krb5'
	'zstd'
	'zlib'
	'qt6-wayland'
	'libx11'
	'libxkbcommon'
	'libpng'
	'freetype2'
	'icu'
	'pcre2'
	'gnutls'
	'graphite'
	'lz4'
	'libgpg-error'
	'ffmpeg')
makedepends=(
	'git'
	'cmake'
	'extra-cmake-modules'
	'ninja')
provides=("qcm")
source=('git+https://github.com/hypengw/Qcm.git')
sha256sums=('SKIP')
conflicts=("qcm")

function prepare() {
	cd Qcm
	#git submodule update --init --depth 1 --remote
	git submodule update --init
	if [ -d "${srcdir}"/Qcm/build ]; then
		rm -r "${srcdir}"/Qcm/build
	fi
}

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

function build(){
	cd Qcm
	mkdir build
	cd build
	cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release
	ninja
}

function package(){
	local appID=io.github.hypengw.Qcm
	install -Dm644 "${srcdir}/Qcm/app/assets/Qcm.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${appID}.svg"
	install -Dm644 "${srcdir}/Qcm/app/assets/Qcm.desktop" "${pkgdir}/usr/share/applications/${appID}.desktop"
	install -Dm755 "${srcdir}/Qcm/build/app/Qcm" "${pkgdir}/usr/bin/Qcm"
}