2020-08-08 18:31:45 +00:00
|
|
|
# Maintainer: Felix Yan <felixonmars@archlinux.org>
|
|
|
|
# Maintainer: Morten Linderud <foxboron@archlinux.org>
|
|
|
|
|
|
|
|
# ALARM: Lorenz Steinert <lsteinert@uraziel.de>
|
|
|
|
# - remove makedepends pandoc
|
|
|
|
# - remove rclone.1 MANUAL.html and MANUAL.txt targets from make in build()
|
|
|
|
|
|
|
|
pkgname=rclone
|
2024-09-13 23:28:49 +00:00
|
|
|
pkgver=1.68.0
|
2023-07-02 12:08:54 +00:00
|
|
|
pkgrel=1
|
2020-08-08 18:31:45 +00:00
|
|
|
pkgdesc="Sync files to and from Google Drive, S3, Swift, Cloudfiles, Dropbox and Google Cloud Storage"
|
|
|
|
arch=('x86_64')
|
2023-10-04 18:18:20 +00:00
|
|
|
url="https://github.com/rclone/rclone"
|
2020-08-08 18:31:45 +00:00
|
|
|
license=('MIT')
|
|
|
|
depends=('glibc')
|
2023-05-06 20:55:16 +00:00
|
|
|
optdepends=('fuse3: for rclone mount')
|
|
|
|
makedepends=('python' 'go' 'git' 'fuse3')
|
2020-08-08 18:31:45 +00:00
|
|
|
source=("$pkgname-$pkgver.tar.gz::https://github.com/rclone/rclone/archive/v$pkgver.tar.gz")
|
2024-09-13 23:28:49 +00:00
|
|
|
sha512sums=('899255f6a22c53b7ab5b59c0f3532bc64b9b3b2691e7202a97fea5047cc8cdf042c2e235cdac67c8cf18e3d68ca2b2ca1eb4d871bffcba8c97514c7ef8db0e13')
|
2020-08-08 18:31:45 +00:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd "rclone-$pkgver"
|
|
|
|
sed -i "1s/python$/&2/" bin/make_manual.py bin/make_backend_docs.py
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "rclone-$pkgver"
|
|
|
|
export GOFLAGS="-buildmode=pie -trimpath"
|
|
|
|
export CGO_LDFLAGS="${LDFLAGS}"
|
|
|
|
export CGO_CFLAGS="${CFLAGS}"
|
|
|
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
2021-05-15 18:34:45 +00:00
|
|
|
PATH="/build/go/bin:$PATH" make TAG=v$pkgver rclone || true
|
|
|
|
PATH="/build/go/bin:$PATH" rclone genautocomplete bash rclone.bash_completion
|
|
|
|
PATH="/build/go/bin:$PATH" rclone genautocomplete zsh rclone.zsh_completion
|
2024-01-15 21:03:02 +00:00
|
|
|
PATH="/build/go/bin:$PATH" rclone genautocomplete fish rclone.fish_completion
|
2020-08-08 18:31:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
|
|
|
cd "rclone-$pkgver"
|
2021-05-15 18:34:45 +00:00
|
|
|
PATH="/build/go/bin:$PATH" make TAG=v$pkgver test
|
2020-08-08 18:31:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "rclone-$pkgver"
|
|
|
|
|
|
|
|
install -Dm755 rclone "$pkgdir"/usr/bin/rclone
|
|
|
|
|
|
|
|
install -Dm644 rclone.bash_completion "$pkgdir"/usr/share/bash-completion/completions/rclone
|
|
|
|
install -Dm644 rclone.zsh_completion "$pkgdir"/usr/share/zsh/site-functions/_rclone
|
2024-01-15 21:03:02 +00:00
|
|
|
install -Dm644 rclone.fish_completion "$pkgdir"/usr/share/fish/vendor_completions.d/rclone.fish
|
2020-08-08 18:31:45 +00:00
|
|
|
|
|
|
|
install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
|
|
|
|
|
|
|
|
install -Dm644 rclone.1 "$pkgdir"/usr/share/man/man1/rclone.1
|
|
|
|
install -d "$pkgdir"/usr/share/doc/$pkgname
|
|
|
|
install -t "$pkgdir"/usr/share/doc/$pkgname -m644 MANUAL.html MANUAL.txt
|
2022-12-15 13:39:43 +00:00
|
|
|
|
|
|
|
# Mount helper symlinks
|
|
|
|
ln -s /usr/bin/rclone "${pkgdir}"/usr/bin/mount.rclone
|
|
|
|
ln -s /usr/bin/rclone "${pkgdir}"/usr/bin/rclonefs
|
2020-08-08 18:31:45 +00:00
|
|
|
}
|