layout-switcher-package/PKGBUILD

90 lines
3.1 KiB
Bash
Raw Permalink Normal View History

2022-09-07 03:40:56 +00:00
# Maintainer: TROM <contact@tromsite.com>
pkgname=tromjaro-layout-switcher
2024-01-03 18:21:01 +00:00
pkgver=2
2024-09-11 13:31:52 +00:00
pkgrel=3
2022-09-07 03:40:56 +00:00
pkgdesc="TROMjaro Layout switcher application"
arch=('x86_64')
url="https://git.trom.tf/TROMjaro/layout-switcher-package"
2022-09-07 03:40:56 +00:00
license=(unknown)
depends=('xfce4-panel-profiles'
'vala-panel-appmenu-registrar-git'
'util-linux'
2023-12-25 08:27:04 +00:00
'xfconf'
'polkit'
'mate-hud'
'psmisc'
'pacman'
'coreutils'
'vala-panel-appmenu-xfce-git'
2022-09-07 03:40:56 +00:00
'libdbusmenu-gtk2'
'appmenu-gtk-module')
makedepends=('choosenim')
2022-09-07 03:40:56 +00:00
provides=('tromjaro-layout-switcher')
backup=()
options=(!strip)
source=("layoutSwitcher.nim"
"toggleGlobalMenu.nim"
"sharedModule.nim"
2022-09-14 23:28:55 +00:00
"tromjaro-layout-switcher.desktop"
"com.tromjaro.LayoutSwitcher.policy"
"disable-global-menu.hook"
2022-09-20 01:47:50 +00:00
"tromjaro-layout-switcher.svg"
2022-09-14 23:28:55 +00:00
"icons.zip::https://www.drive.tromsite.com/s/SWmAcokLcxLB3gM/download"
"profiles.zip::https://www.drive.tromsite.com/s/6dHoNjar9wJzeLd/download")
2022-09-07 03:40:56 +00:00
sha256sums=('SKIP'
'SKIP'
'SKIP'
2022-09-20 01:23:13 +00:00
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
2022-09-07 03:40:56 +00:00
'SKIP')
prepare() {
# Disable telemetry in choosenim if user is running it for the first time
[ -f "$HOME"/.choosenim/analytics ] || {
mkdir -p "$HOME"/.choosenim
touch "$HOME"/.choosenim/analytics
}
echo 'Install Nim if not already installed:'
choosenim stable
echo 'Update Nim to the latest stable release:'
choosenim update stable
echo 'Refresh nimble package list:'
"$HOME"/.nimble/bin/nimble --nim:"$HOME"/.nimble/bin/nim refresh
echo 'Install owlkettle from the latest git commit:'
"$HOME"/.nimble/bin/nimble --nim:"$HOME"/.nimble/bin/nim install owlkettle
}
build(){
echo 'Compile layoutSwitcher.nim for release build:'
"$HOME"/.nimble/bin/nim c -d:release --out:${srcdir}/layoutSwitcher ${srcdir}/layoutSwitcher.nim
echo 'Compile toggleGlobalMenu.nim for release build:'
"$HOME"/.nimble/bin/nim c -d:release --out:${srcdir}/toggleGlobalMenu ${srcdir}/toggleGlobalMenu.nim
}
2022-09-07 03:40:56 +00:00
package() {
# copy icons
install -d ${pkgdir}/usr/share/tromjaro-layout-switcher/icons
install -Dm644 ${srcdir}/icons/* ${pkgdir}/usr/share/tromjaro-layout-switcher/icons
2022-09-07 03:40:56 +00:00
# copy profiles
install -d ${pkgdir}/usr/share/tromjaro-layout-switcher/profiles
install -Dm644 ${srcdir}/profiles/* ${pkgdir}/usr/share/tromjaro-layout-switcher/profiles
2022-09-07 03:40:56 +00:00
# copy pacman hook file
install -Dm644 ${srcdir}/disable-global-menu.hook ${pkgdir}/usr/share/tromjaro-layout-switcher
# copy executables
install -d ${pkgdir}/usr/share/applications
install -Dm644 ${srcdir}/tromjaro-layout-switcher.desktop ${pkgdir}/usr/share/applications
install -Dm755 ${srcdir}/layoutSwitcher ${pkgdir}/usr/bin/tromjaro-layout-switcher
install -Dm755 ${srcdir}/toggleGlobalMenu ${pkgdir}/usr/bin/toggle-global-menu
2022-09-07 03:40:56 +00:00
# copy polkit action
install -d ${pkgdir}/usr/share/polkit-1/actions
install -Dm644 com.tromjaro.LayoutSwitcher.policy ${pkgdir}/usr/share/polkit-1/actions
2022-09-20 01:23:13 +00:00
# copy desktop icon
install -d ${pkgdir}/usr/share/icons/hicolor/scalable/apps
install -Dm644 ${srcdir}/tromjaro-layout-switcher.svg ${pkgdir}/usr/share/icons/hicolor/scalable/apps
2022-09-07 03:40:56 +00:00
}