summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgraysky2015-06-08 17:56:55 -0400
committergraysky2015-06-08 17:56:55 -0400
commit88a990afe36ca0ae1a5453fe27d768ee1c99ca5c (patch)
treeb9cf46df8a49b2e940844035f24e15965774fd64
downloadaur-88a990afe36ca0ae1a5453fe27d768ee1c99ca5c.tar.gz
Initial import
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD26
-rw-r--r--asd.install64
3 files changed, 112 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..8dfea749839
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = anything-sync-daemon
+ pkgdesc = Offload anything to RAM (tmpfs) for speed and wear reduction.
+ pkgver = 5.73
+ pkgrel = 1
+ url = https://github.com/graysky2/anything-sync-daemon
+ install = asd.install
+ arch = any
+ license = MIT
+ depends = procps-ng
+ depends = rsync
+ conflicts = monitorix-sync-daemon
+ conflicts = user-profile-sync-daemon
+ conflicts = goanysync
+ conflicts = goanysync-git
+ conflicts = tmpfs-store
+ conflicts = tmpfs-sync
+ backup = etc/asd.conf
+ source = http://repo-ck.com/source/anything-sync-daemon/anything-sync-daemon-5.73.tar.xz
+ sha256sums = 69488b8f206abd00625381db05c8220ca251a2882224f568c8d177184bed27f8
+
+pkgname = anything-sync-daemon
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..8921b54698e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer: graysky <graysky AT archlinux DOT us>
+
+pkgname='anything-sync-daemon'
+pkgver=5.73
+pkgrel=1
+pkgdesc='Offload anything to RAM (tmpfs) for speed and wear reduction.'
+arch=('any')
+url='https://github.com/graysky2/anything-sync-daemon'
+license=('MIT')
+depends=('procps-ng' 'rsync')
+conflicts=('monitorix-sync-daemon' 'user-profile-sync-daemon' 'goanysync' 'goanysync-git' 'tmpfs-store' 'tmpfs-sync')
+source=("http://repo-ck.com/source/$pkgname/$pkgname-$pkgver.tar.xz")
+backup=('etc/asd.conf')
+install=asd.install
+sha256sums=('69488b8f206abd00625381db05c8220ca251a2882224f568c8d177184bed27f8')
+
+build() {
+ cd "$pkgname-$pkgver"
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install-systemd-all
+ install -Dm644 MIT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/asd.install b/asd.install
new file mode 100644
index 00000000000..71cb86943d7
--- /dev/null
+++ b/asd.install
@@ -0,0 +1,64 @@
+DAEMON_FILE="/run/asd"
+
+pre_upgrade() {
+ ## arg 1: the new package version
+ ## arg 2: the old package version
+ oldpkgver=${2%-*}
+
+ if [[ $oldpkgver < 5.69 ]]; then
+ if [ -e $DAEMON_FILE ]; then
+ if ! systemd-notify --booted; then # not using systemd
+ echo '--> Pacman must stop asd before it can upgrade.'
+ echo '--> Please start it manually once the upgrade is complete.'
+ /etc/rc.d/asd stop
+ else
+ echo '--> Pacman must stop asd before it can upgrade.'
+ echo '--> Please start it manually once the upgrade is complete.'
+ /usr/bin/systemctl stop asd
+ fi
+ fi
+ fi
+}
+
+post_install() {
+ echo '--------------------------------------------------------------------------'
+ echo ' Define what to sync in /etc/asd.conf'
+ echo ' Read the manpage before use and also see the wiki page'
+ echo ' https://wiki.archlinux.org/index.php/Anything-sync-daemon'
+ echo
+ echo ' ALWAYS backup your important data before using utils like asd!'
+ echo '--------------------------------------------------------------------------'
+}
+
+post_upgrade() {
+ ## arg 1: the new package version
+ ## arg 2: the old package version
+ oldpkgver=${2%-*}
+ #newpkgver=${1%-*}
+
+ if [[ $oldpkgver < 3.13 ]]; then
+ echo '-------------------------------------------------------------------'
+ echo ' Support for cron has been deprecated in favor of a systemd timer.'
+ echo ' This package now provides both asd.service and asd-resync.service'
+ echo
+ echo ' systemctl enable asd asd-resync'
+ echo ' systemctl start asd asd-resync'
+ echo
+ echo ' See the wiki or man page for more info.'
+ echo '-------------------------------------------------------------------'
+ else
+ /bin/true
+ fi
+}
+
+pre_remove() {
+ if [ -e $DAEMON_FILE ]; then
+ if ! systemd-notify --booted; then # not using systemd
+ echo '--> Automatically stopping asd to rotate data back out of tmpfs.'
+ /etc/rc.d/asd stop
+ else
+ echo '--> Automatically stopping asd to rotate data back out of tmpfs.'
+ /usr/bin/systemctl stop asd
+ fi
+ fi
+}