From eeb8a3f7f2361f2cec5c8a5e3cd3a763f3b9b25f Mon Sep 17 00:00:00 2001 From: adigitoleo Date: Fri, 7 Apr 2023 17:35:06 +1000 Subject: [PATCH] New package: wraith-master-1.2.1 Package for RGB control of AMD Wraith Master cooling fans. As far as I am aware, the gradle build system is not capable of producing PIE executables, hence the use of `nopie_files`. The GTK3 and cli frontends can be built separately, as per upstream build options (and the AUR PKGBUILD). --- srcpkgs/wraith-master-cli | 1 + srcpkgs/wraith-master-gtk | 1 + srcpkgs/wraith-master/template | 60 ++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 120000 srcpkgs/wraith-master-cli create mode 120000 srcpkgs/wraith-master-gtk create mode 100644 srcpkgs/wraith-master/template diff --git a/srcpkgs/wraith-master-cli b/srcpkgs/wraith-master-cli new file mode 120000 index 000000000000..dbdab2cf8071 --- /dev/null +++ b/srcpkgs/wraith-master-cli @@ -0,0 +1 @@ +wraith-master \ No newline at end of file diff --git a/srcpkgs/wraith-master-gtk b/srcpkgs/wraith-master-gtk new file mode 120000 index 000000000000..dbdab2cf8071 --- /dev/null +++ b/srcpkgs/wraith-master-gtk @@ -0,0 +1 @@ +wraith-master \ No newline at end of file diff --git a/srcpkgs/wraith-master/template b/srcpkgs/wraith-master/template new file mode 100644 index 000000000000..76305f5f8c07 --- /dev/null +++ b/srcpkgs/wraith-master/template @@ -0,0 +1,60 @@ +# Template file for 'wraith-master' + +pkgname=wraith-master +version=1.2.1 +revision=1 + +build_style=gnu-makefile +# Don't build experimental ELF frontend yet, https://gitlab.com/serebit/wraith-master/-/issues/26. +make_build_target="common cli gtk" +# Don't download gradle. +make_build_args="GRADLE=gradle" +# Gradle can't build PIE executables? +nopie_files="/usr/bin/wraith-master /usr/bin/wraith-master-gtk" + +hostmakedepends="scdoc openjdk8 gradle tar" +makedepends="libusb-devel gtk+3-devel" +short_desc="Wraith Prism RGB control application built with GTK+ and Kotlin/Native" +maintainer="adigitoleo " +license="Apache-2.0" +homepage="https://gitlab.com/serebit/wraith-master" +changelog="https://gitlab.com/serebit/wraith-master/-/raw/master/CHANGELOG.md" +distfiles="https://gitlab.com/serebit/wraith-master/-/archive/v$version/$pkgname-v$version.tar.gz" +checksum=fcf150b5f45e9b9ffad60e1a72f7251d4488fba28d5b325688c931f5098e21ca + +pre_build() { + export GRADLE_USER_HOME=$PWD/.gradle + export KONAN_DATA_DIR=$PWD/.konan +} + +pkg_install() { + cd build/PACKAGE + vmkdir /etc/udev/rules.d/ + vcopy udev/* /etc/udev/rules.d/ +} + +wraith-master-cli_package() { + short_desc+=" - CLI frontend" + depends="$sourcepkg>=$version_$revision" + pkg_install() { + cd build/PACKAGE + vbin wraith-master + vman man/wraith-master.1 + } +} + +wraith-master-gtk_package() { + short_desc+=" - GTK frontend" + depends="$sourcepkg>=$version_$revision" + pkg_install() { + cd build/PACKAGE + vbin wraith-master-gtk + vman man/wraith-master-gtk.1 + vmkdir /usr/share/icons/ + vcopy icons/* /usr/share/icons/ + vmkdir /usr/share/metainfo/ + vcopy metainfo/* /usr/share/metainfo/ + vmkdir /usr/share/applications/ + vcopy desktop/* /usr/share/applications/ + } +}