summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjaap aarts2017-09-13 17:44:15 +0200
committerjaap aarts2018-03-18 15:04:16 +0100
commiteb362f63c3225bade05c9c0ff74ca2b7002f3976 (patch)
tree1e4f6cdd492a95a7c1961308e6da9ea62121856f
parentc2a9e4a2e1089043d9e682ce71c44ad7f1ee2123 (diff)
downloadaur-eb362f63c3225bade05c9c0ff74ca2b7002f3976.tar.gz
\sept-13-2017/ 2.0.0beta4.b786 version of synergy
-rw-r--r--PKGBUILD8
-rw-r--r--synergy2-bin.install34
2 files changed, 35 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f0536a4cba97..22f7732b42f0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -27,6 +27,12 @@ package(){
install -D -m644 "${pkgdir}/usr/share/doc/synergy/copyright" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
mkdir -p usr/lib 2> /dev/null; cp -r lib/* usr/lib; rm -rf lib
+ # Fix directories structure differencies
+ cd "${pkgdir}"
+
+ install -D -m644 "/usr/share/doc/synergy/copyright" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ mkdir -p usr/lib 2> /dev/null; mv lib/* usr/lib; rm -rf lib
+
cd ..
- tput setaf 1; echo "this is the beta package for the AUR, if you want to move to the stable builds go and download the synergy2 package. and make sure to remove this one."; tput sgr0
+
}
diff --git a/synergy2-bin.install b/synergy2-bin.install
index e4f4a49d54a8..bf0e8443fa67 100644
--- a/synergy2-bin.install
+++ b/synergy2-bin.install
@@ -3,12 +3,27 @@ post_install() {
chmod 777 /var/lib/synergy
chmod 777 /etc/synergy
xdg-icon-resource forceupdate --theme hicolor &> /dev/null
-
- systemctl enable synergy.service >/dev/null || true
-
+ # This will only remove masks created by d-s-h on package removal.
+ deb-systemd-helper unmask synergy.service >/dev/null || true
+
+ # was-enabled defaults to true, so new installations run enable.
+ if deb-systemd-helper --quiet was-enabled synergy.service; then
+ # Enables the unit on first installation, creates new
+ # symlinks on upgrades if the unit file has changed.
+ deb-systemd-helper enable synergy.service >/dev/null || true
+ else
+ # Update the statefile to add new symlinks (if any), which need to be
+ # cleaned up on purge. Also remove old symlinks.
+ deb-systemd-helper update-state synergy.service >/dev/null || true
+ fi
+ if [ -x "/etc/init.d/synergy" ]; then
+ update-rc.d synergy defaults >/dev/null
+ invoke-rc.d synergy start || exit $?
+ fi
+ fi
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
- systemctl start synergy.service >/dev/null || true
+ deb-systemd-invoke start synergy.service >/dev/null || true
fi
if which update-icon-caches >/dev/null 2>&1 ; then
update-icon-caches /usr/share/icons/synergy.svg
@@ -28,7 +43,10 @@ pre_remove() {
pre_remove() {
if [ -d /run/systemd/system ]; then
- systemctl stop synergy.service >/dev/null
+ deb-systemd-invoke stop synergy.service >/dev/null
+ fi
+ if [ -x "/etc/init.d/synergy" ]; then
+ invoke-rc.d synergy stop || exit $?
fi
}
@@ -40,7 +58,11 @@ post_remove() {
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
fi
-
+ if [ "$1" = "purge" ] ; then
+ update-rc.d synergy remove >/dev/null
+ fi
+
+
# In case this system is running systemd, we make systemd reload the unit files
# to pick up changes.
if [ -d /run/systemd/system ] ; then