aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Leal <antonioleal@yahoo.com>2023-08-26 18:44:51 +0900
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-08-26 19:07:03 +0700
commitbe6d494aa44eae89acd276c229aaef0358050130 (patch)
tree3b4fbc70ff3f7b2c3ca909d261e024396eb95d49
parentdd6aebb1a51e944d1f692c04c2aa722ce95a4c06 (diff)
system/timeshift: Fix build.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/timeshift/timeshift-gtk.desktop.patch54
-rw-r--r--system/timeshift/timeshift-launcher17
-rw-r--r--system/timeshift/timeshift.1.gzbin943 -> 0 bytes
-rw-r--r--system/timeshift/timeshift.SlackBuild9
4 files changed, 20 insertions, 60 deletions
diff --git a/system/timeshift/timeshift-gtk.desktop.patch b/system/timeshift/timeshift-gtk.desktop.patch
deleted file mode 100644
index 845eea53d47f..000000000000
--- a/system/timeshift/timeshift-gtk.desktop.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-*** timeshift-gtk.desktop 2022-11-22 10:11:02.000000000 +0000
---- timeshift-gtk.desktop.new 2022-12-15 21:45:34.173993274 +0000
-***************
-*** 1,6 ****
- [Desktop Entry]
- Name=Timeshift
-- MimeType=
- Exec=timeshift-launcher
- Type=Application
- GenericName=System Restore Utility
---- 1,6 ----
- [Desktop Entry]
-+ Type=Application
- Name=Timeshift
- Exec=timeshift-launcher
- Type=Application
- GenericName=System Restore Utility
-*************** GenericName[nl]=Hulpmiddel voor systeemh
-*** 16,32 ****
- GenericName[ru]=Программа для восстановления системы
- Terminal=false
- Icon=timeshift
-! Comment=System Restore Utility
-! Comment[ca]=Utilitat de restauració del sistema
-! Comment[cs]=Nástroj pro obnovení systému
-! Comment[da]=Værktøj til systemgendannelse
-! Comment[fr]=Utilitaire de restauration système
-! Comment[hr]=Alat obnove sustava
-! Comment[ja]=システムの復元ユーティリティ
-! Comment[ko]=시스템 복원 유틸리티
-! Comment[lt]=Sistemos atkūrimo paslaugų programa
-! Comment[nl]=Hulpmiddel voor systeemherstel
-! Comment[ru]=Программа для восстановления системы
- X-KDE-StartupNotify=false
- Categories=System;
- X-GNOME-UsesNotifications=true
---- 16,32 ----
- GenericName[ru]=Программа для восстановления системы
- Terminal=false
- Icon=timeshift
-! Comment=Timeshift restores your system to an earlier backup
-! Comment[ca]=Timeshift restaura el sistema a una còpia de seguretat anterior
-! Comment[cs]=Timeshift obnoví váš systém do dřívější zálohy
-! Comment[da]=Timeshift gendanner dit system til en tidligere sikkerhedskopi
-! Comment[fr]=Timeshift restaure votre système à une sauvegarde antérieure
-! Comment[hr]=Timeshift vraća vaš sustav na raniju sigurnosnu kopiju
-! Comment[ja]=Timeshift はシステムを以前のバックアップに復元します
-! Comment[ko]=Timeshift는 시스템을 이전 백업으로 복원합니다.
-! Comment[lt]=Timeshift atkuria jūsų sistemos ankstesnę atsarginę kopiją
-! Comment[nl]=Timeshift herstelt uw systeem naar een eerdere back-up
-! Comment[ru]=Timeshift восстанавливает вашу систему до более ранней резервной копии
- X-KDE-StartupNotify=false
- Categories=System;
- X-GNOME-UsesNotifications=true
diff --git a/system/timeshift/timeshift-launcher b/system/timeshift/timeshift-launcher
new file mode 100644
index 000000000000..37e8cb7ab419
--- /dev/null
+++ b/system/timeshift/timeshift-launcher
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+app_command='timeshift-gtk'
+
+if [ "$(id -u)" -eq 0 ]; then
+ # user is admin
+ ${app_command}
+else
+ # user is not admin
+ if echo $- | grep "i" >/dev/null 2>&1; then
+ # script is running in interactive mode
+ su - -c "${app_command}"
+ else
+ # script is running in non-interactive mode
+ gksu ${app_command}
+ fi
+fi
diff --git a/system/timeshift/timeshift.1.gz b/system/timeshift/timeshift.1.gz
deleted file mode 100644
index 24cabcb05fee..000000000000
--- a/system/timeshift/timeshift.1.gz
+++ /dev/null
Binary files differ
diff --git a/system/timeshift/timeshift.SlackBuild b/system/timeshift/timeshift.SlackBuild
index d2336a4d2baf..b7f0464ebc89 100644
--- a/system/timeshift/timeshift.SlackBuild
+++ b/system/timeshift/timeshift.SlackBuild
@@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=timeshift
VERSION=${VERSION:-23.07.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -76,18 +76,15 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
# do not support xapp at this time
-cp $CWD/meson_options.txt .
-
-meson build --prefix=/usr
+meson build --prefix=/usr -Dxapp=false
cd build
meson compile
DESTDIR=$PKG meson install
cd ..
# slackware friendly launcher requiring gksu
-cp $CWD/timeshift-launcher $PKG/usr/bin/
+install -D -m0755 $CWD/timeshift-launcher $PKG/usr/bin/timeshift-launcher
mv $PKG/usr/share/man $PKG/usr/