aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorWinkel Manah <winkel.manah@outlook.com>2015-07-22 10:42:13 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-07-22 10:42:13 +0700
commit945b6bba3a82dfe7cbd4a8d0180ca34d7071b47e (patch)
treeb83fef1a4038b5ebb33d653a76b68ff1df635ae7 /system
parent1facdd736c831889c0043433474b37c5b93a43d2 (diff)
system/anything-sync-daemon: Added (pseudo-daemon).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/anything-sync-daemon/README6
-rw-r--r--system/anything-sync-daemon/anything-sync-daemon.SlackBuild70
-rw-r--r--system/anything-sync-daemon/anything-sync-daemon.info10
-rw-r--r--system/anything-sync-daemon/doinst.sh27
-rw-r--r--system/anything-sync-daemon/rc.asd39
-rw-r--r--system/anything-sync-daemon/slack-desc19
6 files changed, 171 insertions, 0 deletions
diff --git a/system/anything-sync-daemon/README b/system/anything-sync-daemon/README
new file mode 100644
index 0000000000000..f3387709f3b2c
--- /dev/null
+++ b/system/anything-sync-daemon/README
@@ -0,0 +1,6 @@
+Anything-sync-daemon (asd) is a tiny pseudo-daemon designed to manage user
+specified directories referred to as sync targets from here on out, in tmpfs and
+to periodically sync them back to the physical disc (HDD/SSD). This is
+accomplished via a symlinking step and an innovative use of rsync to maintain
+synchronization between a tmpfs copy and media-bound backups. Additionally, asd
+features several crash recovery features.
diff --git a/system/anything-sync-daemon/anything-sync-daemon.SlackBuild b/system/anything-sync-daemon/anything-sync-daemon.SlackBuild
new file mode 100644
index 0000000000000..a89cd8c234505
--- /dev/null
+++ b/system/anything-sync-daemon/anything-sync-daemon.SlackBuild
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+# Slackware build script for "anything-sync-daemon".
+
+# Copyright 2015 Winkel Manah <winkel.manah@outlook.com>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=anything-sync-daemon
+VERSION=${VERSION:-5.74}
+ARCH=noarch
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+rm -rf $TMP/$PRGNAM-$VERSION
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+sed -i 's#/share##g' Makefile
+make
+make install-bin install-man install-cron DESTDIR=$PKG
+
+mv $PKG/etc/cron.hourly/asd-update $PKG/etc/cron.hourly/asd-update.new
+install -D -m 0644 $TMP/$PRGNAM-$VERSION/common/asd.conf $PKG/etc/asd.conf.new
+install -D -m 0644 $CWD/rc.asd $PKG/etc/rc.d/rc.asd.new
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a INSTALL MIT README.md WARNING_READ_THIS $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/anything-sync-daemon/anything-sync-daemon.info b/system/anything-sync-daemon/anything-sync-daemon.info
new file mode 100644
index 0000000000000..3a498336b675d
--- /dev/null
+++ b/system/anything-sync-daemon/anything-sync-daemon.info
@@ -0,0 +1,10 @@
+PRGNAM="anything-sync-daemon"
+VERSION="5.74"
+HOMEPAGE="https://github.com/graysky2/anything-sync-daemon"
+DOWNLOAD="https://github.com/graysky2/anything-sync-daemon/archive/v5.74.tar.gz"
+MD5SUM="cae6e550acb585e93af9d6cea8bda354"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Winkel Manah"
+EMAIL="winkel.manah@outlook.com"
diff --git a/system/anything-sync-daemon/doinst.sh b/system/anything-sync-daemon/doinst.sh
new file mode 100644
index 0000000000000..9add9af13f928
--- /dev/null
+++ b/system/anything-sync-daemon/doinst.sh
@@ -0,0 +1,27 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/rc.d/rc.asd.new
+config etc/cron.hourly/asd-update.new
+config etc/asd.conf.new
diff --git a/system/anything-sync-daemon/rc.asd b/system/anything-sync-daemon/rc.asd
new file mode 100644
index 0000000000000..ababa0a00dabf
--- /dev/null
+++ b/system/anything-sync-daemon/rc.asd
@@ -0,0 +1,39 @@
+#!/bin/sh
+# Adaptation of Marcel Saegebarth's rc.psd script for slackbuilds.org.
+
+description="Directories syncing"
+extra_commands="resync"
+description_resync="Manually sync the directories with running tmpfs image"
+
+start() {
+ echo "Starting Anything-Sync-Daemon"
+ /usr/bin/anything-sync-daemon sync
+}
+
+stop() {
+ echo "Stopping Anything-Sync-Daemon"
+ /usr/bin/anything-sync-daemon unsync
+}
+
+status() {
+ /usr/bin/anything-sync-daemon debug
+}
+
+resync() {
+ echo "Syncing directories in tmpfs to physical disc"
+ /usr/bin/anything-sync-daemon resync
+}
+
+case "$1" in
+ start)
+ start ;;
+ stop)
+ stop ;;
+ resync)
+ resync ;;
+ status)
+ status ;;
+ *)
+ echo $"Usage: $0 {start|stop|resync|status}"
+ exit 1
+esac
diff --git a/system/anything-sync-daemon/slack-desc b/system/anything-sync-daemon/slack-desc
new file mode 100644
index 0000000000000..5cf45644f70c5
--- /dev/null
+++ b/system/anything-sync-daemon/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+anything-sync-daemon: anything-sync-daemon (Manage directories in tmpfs)
+anything-sync-daemon:
+anything-sync-daemon: Anything-sync-daemonAUR (asd) is a tiny pseudo-daemon designed to
+anything-sync-daemon: manage user specified directories referred to as sync targets from
+anything-sync-daemon: here on out, in tmpfs and to periodically sync them back to the
+anything-sync-daemon: physical disc (HDD/SSD). This is accomplished via a symlinking step
+anything-sync-daemon: and an innovative use of rsync to maintain synchronization between
+anything-sync-daemon: a tmpfs copy and media-bound backups.
+anything-sync-daemon:
+anything-sync-daemon: Homepage: https://github.com/graysky2/anything-sync-daemon/
+anything-sync-daemon: