diff options
-rw-r--r-- | .SRCINFO | 46 | ||||
-rw-r--r-- | .gitignore | 11 | ||||
-rw-r--r-- | PKGBUILD | 99 | ||||
-rw-r--r-- | grub-btrfs.path | 12 | ||||
-rwxr-xr-x | snapshot-detect | 5 | ||||
-rw-r--r-- | snapshot-detect.desktop | 7 | ||||
-rw-r--r-- | timeshift.install (renamed from timeshift-install.sh) | 10 |
7 files changed, 104 insertions, 86 deletions
@@ -1,31 +1,37 @@ -# Generated by mksrcinfo v8 -# Wed Jan 30 20:33:26 UTC 2019 pkgbase = timeshift pkgdesc = A system restore utility for Linux - pkgver = 19.01 - pkgrel = 2 - url = https://github.com/teejee2008/timeshift - install = timeshift-install.sh + pkgver = 23.07.1 + pkgrel = 1 + url = https://github.com/linuxmint/timeshift + install = timeshift.install arch = i686 arch = x86_64 - license = GPL + arch = armv6h + arch = armv7h + arch = aarch64 + license = GPL2 + checkdepends = appstream-glib + makedepends = git + makedepends = help2man + makedepends = meson makedepends = vala - makedepends = diffutils - makedepends = coreutils - makedepends = vte3 + depends = cronie depends = gtk3 + depends = libgee + depends = libnotify depends = libsoup - depends = desktop-file-utils depends = rsync - depends = libgee>=0.18.0 - depends = json-glib - depends = cronie depends = vte3 - depends = xapps - optdepends = gksu: run timeshift from a menu - options = !emptydirs - source = timeshift_v19.01.tgz::https://github.com/teejee2008/timeshift/archive/v19.01.tar.gz - sha256sums = 557223cf0b9ab0c4848455e1cc4d9068c607b9f5492a2de4935a2f40393e3c5f + depends = which + depends = xapp + depends = xorg-xhost + optdepends = btrfs-progs: BTRFS support + optdepends = grub-btrfs: BTRFS snapshots in grub + source = git+https://github.com/linuxmint/timeshift.git#commit=e7fab11ae99465a8ac405981040482c9369e957a + source = snapshot-detect.desktop + source = snapshot-detect + sha256sums = SKIP + sha256sums = 97b38f4dbd6819542eab0a9217e399f55ec7339af4529432cfab1eb3cff8e0eb + sha256sums = f3c71c6cb42b968c33a24361ff3be1e4cf59000605e74af8e061f0c5679fe315 pkgname = timeshift - diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..582e74809609 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +# Ignore everything +* + +# But not these files... +!.gitignore +!PKGBUILD +!.SRCINFO +!timeshift.install +!grub-btrfs.path +!snapshot-detect +!snapshot-detect.desktop @@ -1,71 +1,50 @@ -# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com +# Maintainer: Mark Wagie <mark dot wagie at proton dot me> +# Contributor: librewish <librewish at gmail dot com> +# Contributor: Chris Severance aur.severach aATt spamgourmet dott com # Contributor: Jay Garcia <morbidj at gmail dot com> # Contributor: Doug Newgard <scimmia22 at outlook dot com> # Contributor: Robert Orzanna <orschiro at gmail dot com> +pkgname=timeshift +pkgver=23.07.1 +pkgrel=1 +pkgdesc="A system restore utility for Linux" +arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') +url="https://github.com/linuxmint/timeshift" +license=('GPL2') +depends=('cronie' 'gtk3' 'libgee' 'libnotify' 'libsoup' 'rsync' 'vte3' 'which' + 'xapp' 'xorg-xhost') +makedepends=('git' 'help2man' 'meson' 'vala') +checkdepends=('appstream-glib') +optdepends=('btrfs-progs: BTRFS support' + 'grub-btrfs: BTRFS snapshots in grub') +install="$pkgname.install" +_commit=e7fab11ae99465a8ac405981040482c9369e957a # tags/23.07.1^0 +source=("git+https://github.com/linuxmint/timeshift.git#commit=$_commit" + 'snapshot-detect.desktop' + 'snapshot-detect') +sha256sums=('SKIP' + '97b38f4dbd6819542eab0a9217e399f55ec7339af4529432cfab1eb3cff8e0eb' + 'f3c71c6cb42b968c33a24361ff3be1e4cf59000605e74af8e061f0c5679fe315') -set -u - -#_ubver='1.7.2~174~ubuntu14.04.1'; _libgee='libgee06' # This won't build with vala=0.12 or vala=0.28.0 -#_ubver='1.7.3~177~ubuntu15.10.1' # not found -#_ubver='1.7.3~177~ubuntu15.04.1' # not found -#_ubver='1.7.3~177~ubuntu14.04.1'; _libgee='libgee>=0.18.0' -#_ubver='1.7.5~180~ubuntu14.04.1'; _libgee='libgee>=0.18.0' -#_ubver='1.7.6~184~ubuntu14.04.1'; _libgee='libgee>=0.18.0' -#_ubver='17.2'; _ubrel='429'; _libgee='libgee>=0.18.0' -#_ubver='17.11'; _libgee='libgee>=0.18.0' -#_ubver='18.1'; _libgee='libgee>=0.18.0' -#_ubver='18.1.1'; _libgee='libgee>=0.18.0' -#_ubver='18.4'; _libgee='libgee>=0.18.0' -#_ubver='18.6.1'; _libgee='libgee>=0.18.0' -#_ubver='18.8'; _libgee='libgee>=0.18.0' -#_ubver='18.9.1'; _libgee='libgee>=0.18.0' -_ubver='19.01'; _libgee='libgee>=0.18.0' -pkgname='timeshift' -pkgver="${_ubver}" -pkgrel='2' -pkgdesc='A system restore utility for Linux' -arch=('i686' 'x86_64') -#url='https://launchpad.net/~teejee2008/+archive/ubuntu/ppa' -#url='https://code.launchpad.net/~teejee2008/timeshift' -#url='https://launchpad.net/timeshift' -url='https://github.com/teejee2008/timeshift' -license=('GPL') -_arch_depends=('rsync' 'libgee06' 'json-glib') # from installer/install.sh -_arch_depends[1]="${_libgee}" -depends=('gtk3' 'libsoup' 'desktop-file-utils' "${_arch_depends[@]}" 'cronie' 'vte3' 'xapps') -unset _arch_depends -optdepends=('gksu: run timeshift from a menu') -makedepends=('vala' 'diffutils' 'coreutils' 'vte3') -options=('!emptydirs') -install="${pkgname}-install.sh" -#_verwatch=("${url//code/bazaar}/trunk/changes" 'v\([0-9\.]\+\)' 't') -#source=("${url}/+files/${_srcdir}.tar.gz") -#_srcdir='~teejee2008/timeshift/trunk' -#source=("timeshift_v${_ubver}_r${_ubrel}.tgz::${url//code/bazaar}/trunk/tarball/${_ubrel}") -_github='teejee2008' -_verwatch=("https://github.com/${_github}/${pkgname}/releases.atom" '\s\+<title>Timeshift v\([0-9\.]\+\)</title>.*' 'f') -_srcdir="${pkgname}-${pkgver}" -source=("${pkgname}_v${pkgver}.tgz::https://github.com/${_github}/${pkgname}/archive/v${pkgver}.tar.gz") -sha256sums=('557223cf0b9ab0c4848455e1cc4d9068c607b9f5492a2de4935a2f40393e3c5f') -#sha256sums[0]='SKIP' - -prepare() { - set -u - cd "${_srcdir}" - # ndowens04 2019-01-30 02:45 - sed -e 's:--thread:& Core/AppExcludeEntry.vala:' -i 'src/makefile' - set +u +pkgver() { + cd "$srcdir/$pkgname" + git describe --tags --exclude master* | sed 's/^v//;s/-/+/g' } build() { - set -u - make -C "${_srcdir}" -s -j1 - set +u + arch-meson "$pkgname" build + meson compile -C build +} + +check() { + cd "$srcdir/$pkgname" + appstream-util validate-relax --nonet "debian/$pkgname.appdata.xml" + desktop-file-validate "src/$pkgname-gtk.desktop" } package() { - set -u - make -C "${_srcdir}" -j1 DESTDIR="${pkgdir}" install - set +u + meson install -C build --destdir "$pkgdir" + + install -Dm644 snapshot-detect.desktop -t "$pkgdir/etc/xdg/autostart/" + install -Dm755 snapshot-detect -t "$pkgdir/usr/bin/" } -set +u diff --git a/grub-btrfs.path b/grub-btrfs.path new file mode 100644 index 000000000000..932f266622e5 --- /dev/null +++ b/grub-btrfs.path @@ -0,0 +1,12 @@ +[Unit] +Description=Monitors for new timeshift snapshots +DefaultDependencies=no +Requires=run-timeshift-backup.mount +After=run-timeshift-backup.mount +BindsTo=run-timeshift-backup.mount + +[Path] +PathModified=/run/timeshift/backup/timeshift-btrfs/snapshots + +[Install] +WantedBy=run-timeshift-backup.mount
\ No newline at end of file diff --git a/snapshot-detect b/snapshot-detect new file mode 100755 index 000000000000..bf73adc41cc8 --- /dev/null +++ b/snapshot-detect @@ -0,0 +1,5 @@ +#!/bin/bash +if grep -q timeshift /proc/cmdline; then +notify-send -u critical -i timeshift 'Detected!' 'Booted into Timeshift Snapshot, please restore the snapshot.' +timeshift-launcher +fi diff --git a/snapshot-detect.desktop b/snapshot-detect.desktop new file mode 100644 index 000000000000..950f27ee2493 --- /dev/null +++ b/snapshot-detect.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=Snapshot Detect +Icon=timeshift +Exec=/usr/bin/snapshot-detect +Terminal=false +Type=Application + diff --git a/timeshift-install.sh b/timeshift.install index bc3bd2167015..df5dba17d821 100644 --- a/timeshift-install.sh +++ b/timeshift.install @@ -1,13 +1,11 @@ -post_upgrade() { - set -u +post_install() { if ! systemctl -q is-enabled 'cronie.service'; then - echo 'TimeShift automatic backups require the cronie.service to be running.' + echo 'TimeShift scheduled backups require the cronie.service to be running.' echo 'Try:' echo ' systemctl enable --now cronie.service' fi - set +u } -post_install() { - post_upgrade +post_upgrade() { + post_install } |