summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ff43e53d1c4aad119e0c1e295269c5825318ed67 (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: lpt <aur AT lucapetrucci DOT net>
pkgname="qdiskinfo"
_pkgname="QDiskInfo"
pkgver="0.2"
pkgrel="1"
pkgdesc="CrystalDiskInfo alternative for Linux"
url="https://github.com/edisionnano/QDiskInfo"
license=("GPL-3.0-only")
source=(
	"$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz"
	"qdiskinfo.desktop"
)
sha256sums=(
	"e4c0d352c75ca0dd8f152b09e17c7542aebd1d320e5fee8e9bd8c35cb1d3cbb2"
	"4754bf3c5c718723ed47a06772134a393a8b8996eeb3ee75c2711811d140ff8a"
)
arch=("x86_64")
depends=(
	"qt6-base"
	"qt6-svg"
	"smartmontools"
	"polkit"
	"hicolor-icon-theme"
)
makedepends=(
	"cmake"
	"imagemagick"
)

prepare () {
	cd "$_pkgname-$pkgver"
	convert -background none -size 48x48 src/icon.svg "$srcdir/qdiskinfo-48x48.png"
}

build () {
	cd "$_pkgname-$pkgver"
	cmake \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DQT_VERSION_MAJOR=6 \
		-G"Unix Makefiles" \
		-Bbuilddir \
		-S.
	cmake --build builddir
}

package () {
	cd "$_pkgname-$pkgver"
	DESTDIR="$pkgdir" cmake --build builddir --target install
	install -Dm0644 src/icon.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/qdiskinfo.svg"
	install -Dm0644 "$srcdir/qdiskinfo-48x48.png" "$pkgdir/usr/share/icons/hicolor/48x48/apps/qdiskinfo.png"
	install -Dm0644 "$srcdir/qdiskinfo.desktop" "$pkgdir/usr/share/applications/qdiskinfo.desktop"
}