summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Gildas MILLON2015-11-30 17:58:04 +0100
committerPierre-Gildas MILLON2015-11-30 18:01:05 +0100
commit5b6cba43a3f68567035f5dfbf571399b34fca7db (patch)
tree4f1d882192d8619414b7088e10694ff683097be6
downloadaur-5b6cba43a3f68567035f5dfbf571399b34fca7db.tar.gz
Initial commit
-rw-r--r--.SRCINFO24
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD41
-rw-r--r--cloudstation.install13
-rwxr-xr-xsynology-cloud-station105
-rw-r--r--synology-cloud-station.desktop8
6 files changed, 196 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..32a5914adc35
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = cloudstation-3.0
+ pkgdesc = Synology Cloud Station. Cloud Station allows you to sync files among your Synology NAS and computers
+ pkgver = 3111
+ pkgrel = 1
+ url = http://www.synology.com
+ install = cloudstation.install
+ arch = i686
+ arch = x86_64
+ license = unknown
+ depends = libsm
+ depends = qt5-base
+ optdepends = nautilus: For nautilus integration
+ conflicts = cloudstation-beta
+ source = synology-cloud-station
+ source = synology-cloud-station.desktop
+ md5sums = db969c467abb89cb503c11753521c5ca
+ md5sums = ad5716993e65b96a104700ffb267da47
+ source_i686 = http://global.download.synology.com/download/Tools/CloudStation/3.0-3111/Linux/Installer/i686/CloudStation-Linux-Installer-3111-32bit.tgz
+ md5sums_i686 = e65e4cdf1e6a2ccee9bc470743382419
+ source_x86_64 = http://global.download.synology.com/download/Tools/CloudStation/3.0-3111/Linux/Installer/x86_64/CloudStation-Linux-Installer-3111-64bit.tgz
+ md5sums_x86_64 = 2c0d3e41e7bc91e308e9c2eb01b9dd7f
+
+pkgname = cloudstation-3.0
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..c13a96356745
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+pkg
+src
+cloudstation-*.pkg.tar.xz
+cloudstation-*.src.tar.gz
+CloudStation-Linux-Installer-*.tgz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0e1e9091c865
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Pierre-Gildas MILLON <pg.millon@gmail.com>
+
+pkgname=cloudstation-3.0
+pkgver=3111
+pkgrel=1
+pkgdesc="Synology Cloud Station. This version is for DSM versions that only works with CloudStation 3.0 (DSM 4.2 on a DS209 for example)"
+arch=('i686' 'x86_64')
+url="http://www.synology.com"
+license=('unknown')
+depends=('libsm' 'qt5-base')
+optdepends=('nautilus: For nautilus integration')
+conflicts=('cloudstation-beta')
+install=cloudstation.install
+source=('synology-cloud-station' 'synology-cloud-station.desktop')
+md5sums=('db969c467abb89cb503c11753521c5ca'
+ 'ad5716993e65b96a104700ffb267da47')
+
+source_i686=(http://global.download.synology.com/download/Tools/CloudStation/3.0-${pkgver}/Linux/Installer/i686/CloudStation-Linux-Installer-${pkgver}-32bit.tgz)
+md5sums_i686=('e65e4cdf1e6a2ccee9bc470743382419')
+source_x86_64=(http://global.download.synology.com/download/Tools/CloudStation/3.0-${pkgver}/Linux/Installer/x86_64/CloudStation-Linux-Installer-${pkgver}-64bit.tgz)
+md5sums_x86_64=('2c0d3e41e7bc91e308e9c2eb01b9dd7f')
+
+prepare() {
+ cd "$srcdir/CloudStation-Linux-Installer-$pkgver"
+ tar xf CloudStation.spkg
+ tar xf CloudStation.tgz
+}
+
+package() {
+ cd "$srcdir/CloudStation-Linux-Installer-$pkgver"
+ mkdir -p "$pkgdir/opt/Synology"
+ cp -r "CloudStation-app" "$pkgdir/opt/Synology/CloudStation"
+
+ install -Dm755 libnautilus-cloud-extension.so "$pkgdir/usr/lib/nautilus/extensions-3.0/libnautilus-cloud-extension.so"
+ install -Dm755 "$srcdir/synology-cloud-station" "$pkgdir/usr/bin/synology-cloud-station"
+
+ mkdir -p "$pkgdir/usr/share/icons/hicolor/scalable/emblems"
+ cp -r "CloudStation-app/images/emblems/"* "$pkgdir/usr/share/icons/hicolor/scalable/emblems"
+
+ install -Dm644 "$srcdir/synology-cloud-station.desktop" "$pkgdir/usr/share/applications/synology-cloud-station.desktop"
+}
diff --git a/cloudstation.install b/cloudstation.install
new file mode 100644
index 000000000000..fcf23c0a1581
--- /dev/null
+++ b/cloudstation.install
@@ -0,0 +1,13 @@
+post_install() {
+ update-desktop-database -q
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
+
diff --git a/synology-cloud-station b/synology-cloud-station
new file mode 100755
index 000000000000..b344bb5cb6cb
--- /dev/null
+++ b/synology-cloud-station
@@ -0,0 +1,105 @@
+#!/bin/sh
+
+# start/stop script adapted from cloudstation client 3.2-3487
+
+INSTALL_PATH="/opt/Synology/CloudStation"
+LIB_PATH="$INSTALL_PATH/lib"
+BIN_PATH="$INSTALL_PATH/bin/syno-cloud-linux"
+
+check_process()
+{
+ pid=$1
+ kill -0 $pid > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ return 1
+ else
+ return 0
+ fi
+}
+
+stop_process()
+{
+ counter=0
+ pid=$1
+ kill $pid
+
+
+ while [ 1 ] ; do
+ check_process $pid
+
+ if [ $? -eq 0 ]; then
+ # already stop
+ break;
+ fi
+
+ if [ $counter -eq 10 ]; then
+ # force kill
+ kill -9 $pid
+ break;
+ fi
+
+ sleep 1
+ counter=$((counter+1))
+ done
+}
+
+gracefull_stop_service()
+{
+ user_name=$1
+ home_path=`eval echo ~"$user_name"`
+ app_path="$home_path/.CloudStation"
+ pid_file="$app_path/ui.pid"
+
+ if [ ! -f "$pid_file" ]; then
+ #not running
+ return 0
+ fi
+
+ pid=`grep pid "$pid_file" | sed 's/pid=//g' | sed 's/"//g'`
+ stop_process $pid
+}
+
+start()
+{
+ env "LD_LIBRARY_PATH=$LIB_PATH" "$BIN_PATH" &
+}
+
+stop()
+{
+ gracefull_stop_service $USER
+}
+
+restart()
+{
+ stop
+ start
+}
+
+autostart()
+{
+ sleep 10
+ start
+}
+
+case $1 in
+ start)
+ start
+ exit $?
+ ;;
+ autostart)
+ autostart
+ exit $?
+ ;;
+ stop)
+ stop
+ exit $?
+ ;;
+ restart)
+ restart
+ exit $?
+ ;;
+ *)
+ start
+ exit $?
+ ;;
+esac
diff --git a/synology-cloud-station.desktop b/synology-cloud-station.desktop
new file mode 100644
index 000000000000..39dac781ef28
--- /dev/null
+++ b/synology-cloud-station.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Synology Cloud Station
+Comment=Synology Cloud Station
+Exec=synology-cloud-station start
+Icon=/opt/Synology/CloudStation/images/ico_72_cloud_station.png
+Terminal=false
+Type=Application
+Categories=Network;FileTransfer;