build: add snap installation

I ( @boukendesho ) have volunteered to maintain the snap package so
this adds it back into the installation instructions.

It will set a `snap` tag visible in `rclone version` so we know where
it came from for support queries.
This commit is contained in:
hideo aoyama 2023-08-18 19:57:25 +09:00 committed by GitHub
parent cf65e36cf3
commit 923989d1d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 0 deletions

View File

@ -19,6 +19,7 @@ Current active maintainers of rclone are:
| wiserain | @wiserain | pikpak backend | | wiserain | @wiserain | pikpak backend |
| albertony | @albertony | | | albertony | @albertony | |
| Chun-Hung Tseng | @henrybear327 | Proton Drive Backend | | Chun-Hung Tseng | @henrybear327 | Proton Drive Backend |
| Hideo Aoyama | @boukendesho | snap packaging |
**This is a work in progress Draft** **This is a work in progress Draft**

View File

@ -290,6 +290,28 @@ docker run --rm \
ls ~/data/mount ls ~/data/mount
kill %1 kill %1
``` ```
## Snap installation {#snap}
[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/rclone)
Make sure you have [Snapd installed](https://snapcraft.io/docs/installing-snapd)
```bash
$ sudo snap install rclone
```
Due to the strict confinement of Snap, rclone snap cannot acess real /home/$USER/.config/rclone directory, default config path is as below.
- Default config directory:
- /home/$USER/snap/rclone/current/.config/rclone
Note: Due to the strict confinement of Snap, `rclone mount` feature is `not` supported.
If mounting is wanted, either install a precompiled binary or enable the relevant option when [installing from source](#source).
Note that this is controlled by [community maintainer](https://github.com/boukendesho/rclone-snap) not the rclone developers so it may be out of date. Its current version is as below.
[![rclone](https://snapcraft.io/rclone/badge.svg)](https://snapcraft.io/rclone)
## Source installation {#source} ## Source installation {#source}

8
lib/buildinfo/snap.go Normal file
View File

@ -0,0 +1,8 @@
//go:build snap
// +build snap
package buildinfo
func init() {
Tags = append(Tags, "snap")
}