Update PKGBUILD for the new code in Nim
This commit is contained in:
parent
779117672e
commit
b1dc6d7e29
53
PKGBUILD
53
PKGBUILD
|
@ -3,22 +3,25 @@ pkgname=tromjaro-layout-switcher
|
||||||
pkgver=1.4
|
pkgver=1.4
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="TROMjaro Layout switcher application"
|
pkgdesc="TROMjaro Layout switcher application"
|
||||||
arch=(any)
|
arch=('x86_64')
|
||||||
url=""
|
url="https://git.trom.tf/TROMjaro/layout-switcher-package"
|
||||||
license=(unknown)
|
license=(unknown)
|
||||||
depends=('yad'
|
depends=('xfce4-panel-profiles'
|
||||||
'zensu'
|
'util-linux'
|
||||||
'xfce4-panel-profiles'
|
|
||||||
'vala-panel-appmenu-xfce-git'
|
'vala-panel-appmenu-xfce-git'
|
||||||
'vala-panel-appmenu-common-git'
|
'vala-panel-appmenu-common-git'
|
||||||
'libdbusmenu-gtk2'
|
'libdbusmenu-gtk2'
|
||||||
'appmenu-gtk-module')
|
'appmenu-gtk-module')
|
||||||
|
makedepends=('choosenim')
|
||||||
optdepends=('vala-panel-appmenu-registrar')
|
optdepends=('vala-panel-appmenu-registrar')
|
||||||
provides=('tromjaro-layout-switcher')
|
provides=('tromjaro-layout-switcher')
|
||||||
backup=()
|
backup=()
|
||||||
options=(!strip)
|
options=(!strip)
|
||||||
source=("layout-switcher"
|
source=("layoutSwitcher.nim"
|
||||||
|
"toggleGlobalMenu.nim"
|
||||||
|
"sharedModule.nim"
|
||||||
"tromjaro-layout-switcher.desktop"
|
"tromjaro-layout-switcher.desktop"
|
||||||
|
"com.tromjaro.LayoutSwitcher.policy"
|
||||||
"tromjaro-layout-switcher.svg"
|
"tromjaro-layout-switcher.svg"
|
||||||
"icons.zip::https://www.drive.tromsite.com/s/SWmAcokLcxLB3gM/download"
|
"icons.zip::https://www.drive.tromsite.com/s/SWmAcokLcxLB3gM/download"
|
||||||
"profiles.zip::https://www.drive.tromsite.com/s/6dHoNjar9wJzeLd/download")
|
"profiles.zip::https://www.drive.tromsite.com/s/6dHoNjar9wJzeLd/download")
|
||||||
|
@ -26,7 +29,31 @@ sha256sums=('SKIP'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
|
'SKIP'
|
||||||
|
'SKIP'
|
||||||
|
'SKIP'
|
||||||
'SKIP')
|
'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@#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
|
||||||
|
}
|
||||||
package() {
|
package() {
|
||||||
# copy icons
|
# copy icons
|
||||||
install -d ${pkgdir}/usr/share/tromjaro-layout-switcher/icons
|
install -d ${pkgdir}/usr/share/tromjaro-layout-switcher/icons
|
||||||
|
@ -36,13 +63,17 @@ package() {
|
||||||
install -d ${pkgdir}/usr/share/tromjaro-layout-switcher/profiles
|
install -d ${pkgdir}/usr/share/tromjaro-layout-switcher/profiles
|
||||||
install -Dm644 ${srcdir}/profiles/* ${pkgdir}/usr/share/tromjaro-layout-switcher/profiles
|
install -Dm644 ${srcdir}/profiles/* ${pkgdir}/usr/share/tromjaro-layout-switcher/profiles
|
||||||
|
|
||||||
|
|
||||||
# copy executables
|
# copy executables
|
||||||
install -Dm644 ${srcdir}/tromjaro-layout-switcher.desktop ${pkgdir}/usr/share/applications/tromjaro-layout-switcher.desktop
|
install -d ${pkgdir}/usr/share/applications
|
||||||
install -Dm755 ${srcdir}/layout-switcher ${pkgdir}/usr/bin/tromjaro-layout-switcher
|
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
|
||||||
|
|
||||||
# copy icon
|
# copy polkit action
|
||||||
|
install -d ${pkgdir}/usr/share/polkit-1/actions
|
||||||
|
install -Dm644 com.tromjaro.LayoutSwitcher.policy ${pkgdir}/usr/share/polkit-1/actions
|
||||||
|
|
||||||
|
# copy desktop icon
|
||||||
install -d ${pkgdir}/usr/share/icons/hicolor/scalable/apps
|
install -d ${pkgdir}/usr/share/icons/hicolor/scalable/apps
|
||||||
install -Dm644 ${srcdir}/tromjaro-layout-switcher.svg ${pkgdir}/usr/share/icons/hicolor/scalable/apps
|
install -Dm644 ${srcdir}/tromjaro-layout-switcher.svg ${pkgdir}/usr/share/icons/hicolor/scalable/apps
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user