aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2014-09-09 17:41:58 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2014-09-09 17:42:22 +0000
commita5b8e233b6a0c7de7ab544e741192422b46816bb (patch)
tree2465a509442ed1a7b51719430f5af6c275a0c822
parent3be0f608fd170e39f6a506fc9975f1e080adf5f2 (diff)
downloadaports-a5b8e233b6a0c7de7ab544e741192422b46816bb.tar.bz2
aports-a5b8e233b6a0c7de7ab544e741192422b46816bb.tar.xz
main/lsyncd: fix lpostcmd
-rw-r--r--main/lsyncd/APKBUILD6
-rw-r--r--main/lsyncd/lpostcmd.patch44
2 files changed, 49 insertions, 1 deletions
diff --git a/main/lsyncd/APKBUILD b/main/lsyncd/APKBUILD
index eec7ca4be3..0f03484db7 100644
--- a/main/lsyncd/APKBUILD
+++ b/main/lsyncd/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lsyncd
pkgver=2.0.7
-pkgrel=0
+pkgrel=1
pkgdesc="Live Syncing (Mirror) Daemon"
url="http://code.google.com/p/lsyncd/"
arch="all"
@@ -14,6 +14,7 @@ install=""
subpackages="$pkgname-doc"
source="http://lsyncd.googlecode.com/files/lsyncd-$pkgver.tar.gz
fix-realpath.patch
+ lpostcmd.patch
$pkgname.initd"
_builddir="$srcdir"/lsyncd-$pkgver
@@ -54,10 +55,13 @@ package() {
md5sums="4ef8787f6e3a402a9a2bcb84c123fb17 lsyncd-2.0.7.tar.gz
a8ad7a0a5faddd8b19f45b1c3086eee3 fix-realpath.patch
+a70439e6b21b15cc62ea0fa9f2e95a9b lpostcmd.patch
b3d38982ef1a6e09a76586418ec6c35d lsyncd.initd"
sha256sums="3c76a6e8acfceea742154afd21f74b220277e54b1ffdb71ee1dc2eb104b0bbde lsyncd-2.0.7.tar.gz
f956ed6243675018ac646e0789f4ddf37a60ad7526cdfdf59f633fd86efb9a68 fix-realpath.patch
+7aba1c30ac079ea13ddd362021413d8d9ec027f3b38889b236a7c1efbd72c9ce lpostcmd.patch
2797d06c74154290ec183cbe5ba22dde818c384bee1434c6d95923626890cfe0 lsyncd.initd"
sha512sums="4ba99853b7962f40bd6a7cd2b51eebf33b37a9536511d39f5650da04465c67080cc89568537981165c357c76841221c1fcc83b42ee0d8ab4713619f8c008af40 lsyncd-2.0.7.tar.gz
b3cedf4c0a456a7eb1b43c63faf40c7a77d1d6435d8980c15a30139a999d8e2f471f2f2758542408574f99079eb1ea5fa087cfa19e3e38a21bb6f06d69815a06 fix-realpath.patch
+c606e915de80b52786ac3368b837632db9fce3297bb7f7abfc2fe6b2b259730e54194c08509d1d00d9851247038ef492591bc7cc75e98c4466518b84fc961ee3 lpostcmd.patch
db9b65817b25e9853e5e6fab479eb54e19bcbd37cb8682cbe5549b539866a85db94969deed0b311f92af81f91af31efc638acd5bec05e7722f74b2fc314d7922 lsyncd.initd"
diff --git a/main/lsyncd/lpostcmd.patch b/main/lsyncd/lpostcmd.patch
new file mode 100644
index 0000000000..46ca7b9785
--- /dev/null
+++ b/main/lsyncd/lpostcmd.patch
@@ -0,0 +1,44 @@
+--- a/examples/lpostcmd.lua
++++ b/examples/lpostcmd.lua
+@@ -6,7 +6,7 @@
+ -- after every successfullycompleted rsync operation.
+ -- for example to restart servlets on the target host or so.
+
+-local rsyncpostcmd = {
++rsyncpostcmd = {
+
+ -- based on default rsync.
+ default.rsync,
+@@ -25,7 +25,7 @@
+ -- uses rawget to test if "isPostcmd" has been set without
+ -- triggering an error if not.
+ local isPostcmd = rawget(event, "isPostcmd")
+- if event.isPostcmd then
++ if isPostcmd then
+ spawn(event, "/usr/bin/ssh",
+ config.host, config.postcmd)
+ return
+@@ -58,7 +58,7 @@
+ return default.collect(agent,exitcode)
+ end
+ error("this should never be reached")
+- end
++ end,
+
+ -- called before anything else
+ -- builds the target from host and targetdir
+@@ -74,14 +74,5 @@
+ end
+ return default.rsync.prepare(config)
+ end
+-}
+-
+-
+-sync {
+- rsyncpostcmd,
+- source = "src",
+- host = "beetle",
+- targetdir = "/path/to/trg",
+- postcmd = "/usr/local/bin/restart-servelt.sh",
+ }
+