Rewrite TROMjaro Welcome app in Nim #1

Merged
tio merged 5 commits from nim-rewrite into master 2023-11-04 15:37:18 +00:00
Showing only changes of commit 686af9abf9 - Show all commits

View File

@ -3,31 +3,61 @@ pkgname=tromjaro-welcome-app
pkgver=1.0
pkgrel=4
pkgdesc="Welcome app for TROMjaro OS"
arch=(any)
url=""
arch=('x86_64')
url="https://git.trom.tf/TROMjaro/welcome-app"
license=(unknown)
depends=('tromjaro-fixes'
'gtk4'
'xfdesktop'
'xfce4-settings'
'xdg-utils'
'util-linux'
'tromjaro-layout-switcher'
'tromjaro-theme-switcher'
'tblock-gui')
makedepends=('choosenim')
provides=('tromjaro-welcome-app')
backup=()
options=(!strip)
source=()
sha256sums=()
source=("tromjaroWelcomeApp.nim"
"tromjaro-welcome-app.desktop"
"tromjaro-welcome-app.svg"
"pictures.zip::https://www.drive.tromsite.com/s/8KEgm5JZksaqdjW/download")
sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP')
prepare() {
cp -R ../*.png ../*.svg ../welcome.py ../tromjaro-welcome-app.desktop .
# 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 tromjaroWelcomeApp.nim for release build:'
"$HOME"/.nimble/bin/nim c -d:release --out:${srcdir}/tromjaroWelcomeApp ${srcdir}/tromjaroWelcomeApp.nim
}
package() {
install -d ${pkgdir}/usr/share/tromjaro-welcome-app
install -Dm644 ${srcdir}/*.png ${pkgdir}/usr/share/tromjaro-welcome-app
install -Dm644 ${srcdir}/*.svg ${pkgdir}/usr/share/tromjaro-welcome-app
install -Dm755 ${srcdir}/welcome.py ${pkgdir}/usr/share/tromjaro-welcome-app
# copy pictures
install -d ${pkgdir}/usr/share/tromjaro-welcome-app/pictures
install -Dm644 ${srcdir}/pictures/* ${pkgdir}/usr/share/tromjaro-welcome-app/pictures
install -d ${pkgdir}/usr/bin
ln -s /usr/share/tromjaro-welcome-app/welcome.py ${pkgdir}/usr/bin/tromjaro-welcome-app
# copy executables
install -Dm644 ${srcdir}/tromjaro-welcome-app.desktop ${pkgdir}/usr/share/applications/tromjaro-welcome-app.desktop
install -Dm755 ${srcdir}/tromjaroWelcomeApp ${pkgdir}/usr/bin/tromjaro-welcome-app
install -d ${pkgdir}/usr/share/applications
install -Dm644 ${srcdir}/tromjaro-welcome-app.desktop ${pkgdir}/usr/share/applications
# copy the icon
install -d ${pkgdir}/usr/share/icons/hicolor/scalable/apps
install -Dm644 ${srcdir}/tromjaro-welcome-app.svg ${pkgdir}/usr/share/icons/hicolor/scalable/apps
}