Code

rules: blacklist more intel-only plugins on non-intel archs
[pkg-collectd.git] / debian / collectd.postinst
index 8fe504880823c3baacc76207cd25e5adba672823..99bfabf4279d96d30892926100d747c0f516e403 100644 (file)
@@ -25,6 +25,17 @@ if [ -x "/etc/init.d/collectd" ]; then
        fi
 fi
 
+# replace the directory provided by older versions of the package with a
+# symlink; dpkg does not handle that according to policy 6.6
+if [ "$1" = "configure" ] \
+               && dpkg --compare-versions "$2" lt-nl "4.10.0-1~"; then
+       if [ -d "/usr/share/doc/collectd/examples" ]; then
+               ! rmdir /usr/share/doc/collectd/examples > /dev/null 2>&1 \
+                       || ln -s ../collectd-core/examples \
+                               /usr/share/doc/collectd/examples
+       fi
+fi
+
 # dh_installdeb will replace this with shell code automatically
 # generated by other debhelper scripts.