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

pkgname=hexchat-theme-manager-git
_root_pkgname=hexchat
pkgver=2.16.1.r34.gcda96128
pkgrel=3
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=('meson' 'msbuild')
source=("git+https://github.com/hexchat/hexchat.git" "thememan")
sha256sums=('SKIP'
            '2ac84fb550986eacaa45d2e16644589652101ab092fd7e1571d0726605efc889')

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

build() {
	cd "${srcdir}/${_root_pkgname}/src/htm"

	_platform="x86"
	if [ "${CARCH}" == 'x86_64' ]; then
	    _platform="x64"
	    sed -i "s/x86/x64/g" htm.csproj
	fi

	msbuild /property:Configuration=Release /property:Platform="${platform}"
}

package() {
	install -Dm755 "${srcdir}/${_root_pkgname}/src/htm/obj/${_platform}/Release/thememan.exe" "${pkgdir}/usr/bin/thememan.exe"
	install -Dm755 "${srcdir}/thememan" "${pkgdir}/usr/bin/thememan"
	install -Dm644 "${srcdir}/${_root_pkgname}/data/misc/io.github.Hexchat.ThemeManager.desktop.in" "${pkgdir}/usr/share/applications/io.github.Hexchat.ThemeManager.desktop"
	install -Dm644 "${srcdir}/${_root_pkgname}/data/misc/io.github.Hexchat.ThemeManager.xml" "${pkgdir}/usr/share/mime/packages/io.github.Hexchat.ThemeManager.xml"
}