summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c22e13271da423cadbde20ff947d53b7bf2e865d (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: Matrix <thysupremematrix atttt tuta dottt io>

pkgname=hexchat-theme-manager-git
_root_pkgname=hexchat
pkgver=2.16.1.r33.g6155c183
pkgrel=1
pkgdesc='A simple application to manage HexChat themes'
arch=('i686' 'x86_64')
url='https://hexchat.github.io'
license=('GPL')
depends=('mono' 'hexchat>=2.16.1')
makedepends=('monodevelop' 'meson')
source=("git+https://github.com/hexchat/hexchat.git")
sha256sums=('SKIP')

_files=(
	"usr/share/applications/io.github.Hexchat.ThemeManager.desktop"
	"usr/share/mime/packages/io.github.Hexchat.ThemeManager.xml"
	"usr/bin/thememan.exe"
	"usr/bin/thememan"
)

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

build() {
	cd "${srcdir}"
	arch-meson $_root_pkgname build -Dtheme-manager=true
	meson compile -C build
}

package() {
	cd "${srcdir}"
	meson install -C build --destdir "${srcdir}/full" # It also builds stuff already in hexchat package
	
	# Only install stuff not in hexchat package
	install -d "${pkgdir}/usr/bin"
	install -d "${pkgdir}/usr/share/mime/packages"
	install -d "${pkgdir}/usr/share/applications"
	
	for file in "${_files[@]}"
	do
		echo $file
		cp "${srcdir}/full/${file}" "${pkgdir}/${file}"
	done
}