2022-02-05 14:23:32 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
# Copyright (C) 2021-present Xargon (https://github.com/XargonWan)
|
2022-04-03 14:48:52 +00:00
|
|
|
# Copyright (C) 2022-present Fewtarius
|
2022-02-05 14:23:32 +00:00
|
|
|
|
|
|
|
PKG_NAME="rclone"
|
2023-08-19 15:09:38 +00:00
|
|
|
PKG_VERSION="1.63.1"
|
2022-04-03 16:38:59 +00:00
|
|
|
PKG_DEPENDS_TARGET="toolchain fuse rsync"
|
2022-02-05 14:23:32 +00:00
|
|
|
PKG_SECTION="tools"
|
|
|
|
PKG_SHORTDESC="rsync for cloud storage"
|
|
|
|
PKG_TOOLCHAIN="manual"
|
|
|
|
|
2022-10-28 21:37:37 +00:00
|
|
|
case ${ARCH} in
|
|
|
|
aarch64)
|
|
|
|
RCLONE_ARCH="arm64"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
RCLONE_ARCH="amd64"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
PKG_URL="https://downloads.rclone.org/v${PKG_VERSION}/rclone-v${PKG_VERSION}-linux-${RCLONE_ARCH}.zip"
|
|
|
|
PKG_RCLONE="rclone-v${PKG_VERSION}-linux-${RCLONE_ARCH}/rclone"
|
|
|
|
|
2022-10-30 10:43:35 +00:00
|
|
|
unpack() {
|
2022-10-31 10:11:38 +00:00
|
|
|
mkdir -p ${PKG_BUILD}
|
|
|
|
mv ${SOURCES}/rclone/rclone-${PKG_VERSION}.zip ${SOURCES}/rclone/rclone-${PKG_VERSION}-${RCLONE_ARCH}.zip
|
|
|
|
unzip ${SOURCES}/rclone/rclone-${PKG_VERSION}-${RCLONE_ARCH}.zip -d ${PKG_BUILD}/
|
|
|
|
rm -f ${SOURCES}/rclone/rclone-${PKG_VERSION}*
|
2022-10-30 10:43:35 +00:00
|
|
|
}
|
|
|
|
|
2022-02-05 14:23:32 +00:00
|
|
|
makeinstall_target() {
|
2022-04-03 14:48:52 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/bin/
|
|
|
|
mkdir -p ${INSTALL}/usr/config/
|
2022-10-29 11:57:20 +00:00
|
|
|
cp rclonectl ${INSTALL}/usr/bin/
|
|
|
|
cp cloud_backup ${INSTALL}/usr/bin/
|
|
|
|
cp cloud_restore ${INSTALL}/usr/bin/
|
2022-10-28 21:37:37 +00:00
|
|
|
cp ${PKG_BUILD}/${PKG_RCLONE} ${INSTALL}/usr/bin/
|
2022-04-03 15:11:58 +00:00
|
|
|
chmod 0755 ${INSTALL}/usr/bin/*
|
2022-10-29 11:57:20 +00:00
|
|
|
cp rsync-rules.conf ${INSTALL}/usr/config/
|
|
|
|
cp rsync.conf ${INSTALL}/usr/config/
|
2022-04-03 14:48:52 +00:00
|
|
|
chmod 755 ${INSTALL}/usr/bin/rclone
|
2022-04-03 17:46:03 +00:00
|
|
|
mkdir -p ${INSTALL}/usr/config/modules
|
2022-04-03 18:09:21 +00:00
|
|
|
ln -sf /usr/bin/cloud_backup ${INSTALL}/usr/config/modules/cloud_backup.sh
|
|
|
|
ln -sf /usr/bin/cloud_restore ${INSTALL}/usr/config/modules/cloud_restore.sh
|
2022-04-03 14:48:52 +00:00
|
|
|
}
|