summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9c7f6eae375c1e25e823f5d20d4700021acabf39 (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
# Maintainer: Stanislav Vasilev <contact@i-use-gentoo-btw.com>

PKG_REAL_NAME="UntitledDESessionLogout"
PKG_FRAMEWORK_VERSION="0.9.8.10"

pkgname=ude-session-logout
pkgver=2.1.0.0
pkgrel=1
pkgdesc="A simple session logout utility"
url="https://github.com/MadLadSquad/${PKG_REAL_NAME}"
arch=(x86_64 aarch64)
license=('MIT')
depends=("gcc-libs" "glibc" "pkgconf" "untitled-imgui-framework")
provides=("lib${pkgname}Lib.so" "${pkgname}")
makedepends=("cmake" "make" "pkgconf" "untitled-imgui-framework")
source=("https://github.com/MadLadSquad/UntitledImGuiFramework/releases/download/v${PKG_FRAMEWORK_VERSION}/untitled-imgui-framework.tar.xz" "https://github.com/MadLadSquad/${PKG_REAL_NAME}/releases/download/v${pkgver}/${pkgname}.tar.xz")
sha256sums=('7844ae7820bfb202bfb11c10d86361a7dbbdb788b422e837e78e7b1afe375663'
            '242f66251d68972343169f6ef21e631faa3b387d1f0702bdbf420537e8638e13')
noextract=("${pkgname}.tar.xz")

prepare() {
	mkdir -p "${srcdir}"/"${PKG_REAL_NAME}"/Exported || exit
	bsdtar -xf "${srcdir}"/${pkgname}.tar.xz -C "${srcdir}/${PKG_REAL_NAME}" || exit
}

build() {
	cd $srcdir || exit
	sed -i "s/lib64/lib/g" "${srcdir}"/UVKBuildTool/src/UntitledImGuiFramework/ReleaseBuild.cpp
	./install.sh ci || exit
	cp -r "${srcdir}/${PKG_REAL_NAME}" "${srcdir}/Projects/"
	
	cd "${srcdir}"/UVKBuildTool/build
	./UVKBuildTool --generate ../../Projects/"${PKG_REAL_NAME}" || exit	

	sed -i "s/install-framework: true/install-framework: false/g" "${srcdir}"/Projects/"${PKG_REAL_NAME}"/uvproj.yaml
	sed -i "s/build-mode-vendor: true/build-mode-vendor: false/g" "${srcdir}"/Projects/"${PKG_REAL_NAME}"/uvproj.yaml	
	echo "install-framework: false" >> "${srcdir}"/Projects/${PKG_REAL_NAME}/uvproj.yaml
	sed -i "s/lib64/lib/g" "${srcdir}"/Projects/"${PKG_REAL_NAME}"/uvproj.yaml
}

package() {
	cd $srcdir/UVKBuildTool/build || exit
	./UVKBuildTool --build "${pkgdir}"/usr /usr ../../Projects/"${PKG_REAL_NAME}" || exit
	
	# Delete unneeded files
	rm -rf "${pkgdir}"/usr/share/utf8cpp "${pkgdir}"/usr/include/utf8cpp "${pkgdir}"/share/utf8cpp "${pkgdir}"/include/utf8cpp || exit
}