summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e2c42459ea0def5fdc4bbe7b1040b83c8b885249 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Maintainer: Zesko
pkgname="limine-snapper-sync-git"
pkgver=r116.6b665a6
pkgrel=2
pkgdesc="The tool syncs Snapper snapshots with Limine bootloader"
arch=("any")
url="https://gitlab.com/Zesko/limine-snapper-sync"
source=(git+$url.git)
license=("GPL3")
depends=(
       'bash'
       'java-environment-openjdk>=17'
       'limine'
       'snapper'
       'btrfs-progs'
       'inotify-tools'
       'libnotify')
optdepends=(
        'dunst: Displays a desktop notification for one-click restoration.'
        'limine-dracut-support: Automates kernel installation/removal and Limine boot entry management.'
        'rsync: Provides an alternative method for restoring snapshots.'
        'journalctl-desktop-notification: Sends desktop notifications for errors, including detected hardware issues.'
        'b3sum: Blake3 fast hash function that avoids duplication.'
)
makedepends=('git' 'maven')
sha1sums=('SKIP')
backup=(etc/limine-snapper-sync.conf)
conflicts=('limine-snapper-sync')


pkgver() {
  cd "$srcdir/${pkgname%-git}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}


build() {
    cd "$srcdir/${pkgname%-git}"
    mvn clean package
}

package() {
  cd "$srcdir/${pkgname%-git}"
  src_path="install/arch-linux/"
  install -dm 755 $src_path/usr/share/java/
  install -Dm 644 target/limine-snapper-sync.jar $src_path/usr/share/java/
  install -dm 755 $src_path/usr/share/doc/${pkgname%-git}/
  cp -r README.md CHANGELOG.md screenshots $src_path/usr/share/doc/${pkgname%-git}/
  cp -r $src_path/usr $src_path/etc "$pkgdir"
}