Commit [r10107] Maximize Restore History

This should fix the install scripts so they reflect the proper CMAKE_INSTALL_PREFIX.

wdashley 2014-05-27

changed /main/trunk/CMakeLists.txt
copied /main/trunk/platform/unix/debian/cmake/postinst -> /main/trunk/platform/unix/debian/cmake/postinst.in
copied /main/trunk/platform/unix/rpm_preun.txt -> /main/trunk/platform/unix/rpm_post
copied /main/trunk/platform/unix/rpm_post.txt -> /main/trunk/platform/unix/rpm_post.in
/main/trunk/CMakeLists.txt Diff Switch to side-by-side view
Loading...
/main/trunk/platform/unix/debian/cmake/postinst to /main/trunk/platform/unix/debian/cmake/postinst.in
--- a/main/trunk/platform/unix/debian/cmake/postinst
+++ b/main/trunk/platform/unix/debian/cmake/postinst.in
@@ -38,11 +38,11 @@
 
 # Debian specific set up for rxapid
 if [ -x /usr/bin/systemctl ] || [ -x /usr/sbin/systemctl ]; then
-   systemctl link /usr/share/ooRexx/rxapid.service
+   systemctl link @CMAKE_INSTALL_PREFIX@/share/ooRexx/rxapid.service
    systemctl --system daemon-reload
    systemctl start rxapid.service
 else
-   cp /usr/bin/rxapid       /etc/init.d
+   cp @INSTALL_EXECUTABLE_DIR@/rxapid       /etc/init.d
    update-rc.d rxapid start 89 2 3 4 5 . stop 89 0 1 6 . > /dev/null 2>&1
    /etc/init.d/rxapid start
 fi
/main/trunk/platform/unix/rpm_preun.txt to /main/trunk/platform/unix/rpm_post
--- a/main/trunk/platform/unix/rpm_preun.txt
+++ b/main/trunk/platform/unix/rpm_post
@@ -1,16 +1,16 @@
-# Remove rxapi service
+# Add the rxapi service
 if [ -x /usr/bin/systemctl ]; then
-   systemctl stop rxapid.service
-   rm -f /etc/systemd/system/rxapid.service
+   systemctl link /usr/share/ooRexx/rxapid.service
    systemctl --system daemon-reload
+   systemctl start rxapid.service
 elif [ -x /sbin/insserv ]; then
-   service rxapid stop
+   ln -sf /usr/bin/rxapid /etc/init.d/rxapid
    # try insserv first (for Suse)
    insserv -f rxapid
-   # Remove the rxapi daemon
-   rm -f /etc/init.d/rxapid
+   service rxapid start
 else
-   service rxapid stop
-   chkconfig --del rxapid
-   rm -f /etc/init.d/rxapid
+   ln -sf /usr/bin/rxapid /etc/init.d/rxapid
+   # else, try good old chkconfig
+   chkconfig --add rxapid
+   service rxapid start
 fi
/main/trunk/platform/unix/rpm_post.txt to /main/trunk/platform/unix/rpm_post.in
--- a/main/trunk/platform/unix/rpm_post.txt
+++ b/main/trunk/platform/unix/rpm_post.in
@@ -1,15 +1,15 @@
 # Add the rxapi service
 if [ -x /usr/bin/systemctl ]; then
-   systemctl link %{_datadir}/ooRexx/rxapid.service
+   systemctl link @CMAKE_INSTALL_PREFIX@/share/ooRexx/rxapid.service
    systemctl --system daemon-reload
    systemctl start rxapid.service
 elif [ -x /sbin/insserv ]; then
-   ln -sf %{_bindir}/rxapid /etc/init.d/rxapid
+   ln -sf @INSTALL_EXECUTABLE_DIR@/rxapid /etc/init.d/rxapid
    # try insserv first (for Suse)
    insserv -f rxapid
    service rxapid start
 else
-   ln -sf %{_bindir}/rxapid /etc/init.d/rxapid
+   ln -sf @INSTALL_EXECUTABLE_DIR@/rxapid /etc/init.d/rxapid
    # else, try good old chkconfig
    chkconfig --add rxapid
    service rxapid start