Hi, I'm working on adding installation of a polkit action file into GParted's build and install system, however the polkit daemon only recongises action files installed into the single location of /usr/share/polkit-1/action/.
Currently the Makefile.am contains this line: (larger fragment of the Makefile.am below) polkit_actiondir = $(datadir)/polkit-1/actions This allows 'make distcheck' to work and when GParted is built with './configure --prefix=/usr' for the polkit action file to be installed into the required location. However when prefix is left defaulted to /usr/local the polkit action file is obviously installed into /usr/local/share/polkit-1/action/ which is ignored by the polkit daemon. Are there any resolutions to this? I could: 1) Leave things as they are and document it as the builders responsibility, that when prefix defaults to /usr/local, or anything other than /usr, that the polkit action file will need manually installing into the correct location under a unique name so as not to overright any distro package provided copy. 2) Set polkit_actiondir to /usr/share/polkit-1/action but that is against automake guidance and breaks 'make distcheck'. Are there any other solutions which are reasonable? Thanks, Mike Larger fragments of Makefile.am: @INTLTOOL_POLICY_RULE@ polkit_action_in_in_FILES = org.gnome.gparted.policy.in.in polkit_action_in_FILES = org.gnome.gparted.policy.in polkit_action_FILES = $(polkit_action_in_FILES:.policy.in=.policy) polkit_actiondir = /usr/share/polkit-1/actions if INSTALL_POLKIT_ACTIONS polkit_action_DATA = $(polkit_action_FILES) endif CLEANFILES = $(polkit_action_in_FILES) ... EXTRA_DIST = $(polkit_action_in_in_FILES) ... DISTCLEANFILES = $(polkit_action_DATA) ... do_subst = sed -e 's,[@]sbindir[@],$(sbindir),g' \ -e 's,[@]bindir[@],$(bindir),g' \ -e 's,[@]gksuprog[@],$(GKSUPROG),g' \ -e 's,[@]enable_xhost_root[@],$(ENABLE_XHOST_ROOT),g' org.gnome.gparted.policy.in: org.gnome.gparted.policy.in.in Makefile $(do_subst) < $(srcdir)/org.gnome.gparted.policy.in.in > org.gnome.gparted.policy.in