summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 59ca09eec06a3119bbe1407b27b9f8750ca45213 (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
51
52
53
54
55
56
57
58
59
60
# Maintainer: Miran Kljun <miran.kljun@gmail.com>
pkgname=rclone-wiz
pkgver=1.7.4.r0.ge166485
pkgrel=1
pkgdesc="A simple and easy to use tool to configure, script, and mount cloud drives using rclone"
arch=('any')
url="https://github.com/themix88/Clone-WIZ"
_giturl="https://github.com/themix88/Clone-WIZ.git"
license=('GPL-3.0-only')

depends=(
    'python'
    'python-pyqt6'
    'rclone'
    'fuse3'
)

optdepends=(
    'konsole: Supported terminal for rclone config'
    'alacritty: Supported terminal for rclone config'
    'gnome-terminal: Supported terminal for rclone config'
    'xterm: Supported terminal for rclone config'
    'kitty: Supported terminal for rclone config'
    'ghostty: Supported terminal for rclone config'
)

makedepends=('git')

source=("$pkgname::git+$_giturl#branch=master")
sha256sums=('SKIP')

pkgver() {
    cd "$srcdir/$pkgname"
    # Format: <version tag>.<commits since tag>.g<short hash>
    # Falls back to r<commit count>.g<hash> if no tags exist
    git describe --long --tags 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' \
        || printf "r%s.g%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
    cd "$srcdir/$pkgname"

    # 1. Install the executable
    install -Dm755 "rclone-wiz.py" "$pkgdir/usr/bin/rclone-wiz"

    # 2. Install the desktop file
    install -Dm644 "rclone-wiz.desktop" "$pkgdir/usr/share/applications/rclone-wiz.desktop"

    # 3. Install the icon
    install -Dm644 "rclone-wiz.svg" "$pkgdir/usr/share/pixmaps/rclone-wiz.svg"

    # 4. Install the license
    install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

    # 5. Install the VERSION changelog
    install -Dm644 "VERSION" "$pkgdir/usr/share/$pkgname/VERSION"

    # 6. Install the README
    install -Dm644 "README.md" "$pkgdir/usr/share/$pkgname/README.md"
}