2022-09-07 03:40:56 +00:00
|
|
|
# Maintainer: TROM <contact@tromsite.com>
|
|
|
|
pkgname=tromjaro-layout-switcher
|
2023-08-08 15:41:47 +00:00
|
|
|
pkgver=1.4
|
2023-10-16 22:20:21 +00:00
|
|
|
pkgrel=1
|
2022-09-07 03:40:56 +00:00
|
|
|
pkgdesc="TROMjaro Layout switcher application"
|
2023-12-25 08:01:59 +00:00
|
|
|
arch=('x86_64')
|
|
|
|
url="https://git.trom.tf/TROMjaro/layout-switcher-package"
|
2022-09-07 03:40:56 +00:00
|
|
|
license=(unknown)
|
2023-12-25 08:01:59 +00:00
|
|
|
depends=('xfce4-panel-profiles'
|
2024-01-01 15:12:06 +00:00
|
|
|
'vala-panel-appmenu-registrar'
|
2023-12-25 08:01:59 +00:00
|
|
|
'util-linux'
|
2023-12-25 08:27:04 +00:00
|
|
|
'xfconf'
|
|
|
|
'polkit'
|
|
|
|
'mate-hud'
|
|
|
|
'psmisc'
|
|
|
|
'pacman'
|
|
|
|
'coreutils'
|
2022-11-17 15:18:26 +00:00
|
|
|
'vala-panel-appmenu-xfce-git'
|
|
|
|
'vala-panel-appmenu-common-git'
|
2022-09-07 03:40:56 +00:00
|
|
|
'libdbusmenu-gtk2'
|
|
|
|
'appmenu-gtk-module')
|
2023-12-25 08:01:59 +00:00
|
|
|
makedepends=('choosenim')
|
2022-09-20 01:04:24 +00:00
|
|
|
optdepends=('vala-panel-appmenu-registrar')
|
2022-09-07 03:40:56 +00:00
|
|
|
provides=('tromjaro-layout-switcher')
|
|
|
|
backup=()
|
|
|
|
options=(!strip)
|
2023-12-25 08:01:59 +00:00
|
|
|
source=("layoutSwitcher.nim"
|
|
|
|
"toggleGlobalMenu.nim"
|
|
|
|
"sharedModule.nim"
|
2022-09-14 23:28:55 +00:00
|
|
|
"tromjaro-layout-switcher.desktop"
|
2023-12-25 08:01:59 +00:00
|
|
|
"com.tromjaro.LayoutSwitcher.policy"
|
2024-01-01 15:12:06 +00:00
|
|
|
"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'
|
2023-12-25 08:01:59 +00:00
|
|
|
'SKIP'
|
|
|
|
'SKIP'
|
|
|
|
'SKIP'
|
2024-01-01 15:12:06 +00:00
|
|
|
'SKIP'
|
2022-09-07 03:40:56 +00:00
|
|
|
'SKIP')
|
2023-12-25 08:01:59 +00:00
|
|
|
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@#head
|
|
|
|
}
|
|
|
|
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() {
|
2023-12-25 08:01:59 +00:00
|
|
|
# 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
|
|
|
|
2023-12-25 08:01:59 +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
|
|
|
|
2024-01-01 15:12:06 +00:00
|
|
|
# copy pacman hook file
|
|
|
|
install -Dm644 ${srcdir}/disable-global-menu.hook ${pkgdir}/usr/share/tromjaro-layout-switcher
|
|
|
|
|
2023-12-25 08:01:59 +00:00
|
|
|
# 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
|
|
|
|
2023-12-25 08:01:59 +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
|
|
|
|
2023-12-25 08:01:59 +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
|
|
|
}
|