aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2020-01-25 20:28:51 -0500
committerJason Woodward2020-01-25 20:28:51 -0500
commit0c576dadf157ff35566ec504b03a1463302f3808 (patch)
tree23fa45ac44ad0205f85a262dcfabc341df56c2e1
parent36eeeeef2fbec800e0edf5bb6f277182ad1c6529 (diff)
downloadgslapt-0c576dadf157ff35566ec504b03a1463302f3808.tar.gz
fix distcheck polkit-1/actions path regression
-rw-r--r--Makefile.am9
-rw-r--r--configure.ac8
2 files changed, 13 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index 60a4903..a070129 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,12 +5,15 @@ SUBDIRS = src po ui
PKGDIR = `pwd`/pkg
PKGREL = 1
if POLKIT
-polkit_actiondir = $(datadir)/polkit-1/actions
-INSTALL_GSLAPT_POLKIT = mkdir -p $(DESTDIR)/$(bindir); echo -e "\#!/bin/sh\npkexec --disable-internal-agent $(sbindir)/gslapt \$$@" > $(DESTDIR)/$(bindir)/gslapt-polkit; chmod +x $(DESTDIR)/$(bindir)/gslapt-polkit; $(mkinstalldirs) $(DESTDIR)/$(polkit_actiondir); $(INSTALL_DATA) org.jaos.gslapt.policy $(DESTDIR)/$(polkit_actiondir)/org.jaos.gslapt.policy; sed -i -re 's,(exec\.path">).*(<\/annotate>),\1$(sbindir)/@PACKAGE@\2,g' $(DESTDIR)/$(polkit_actiondir)/org.jaos.gslapt.policy
+polkitactiondir = @polkitactiondir@
+INSTALL_GSLAPT_POLKIT = mkdir -p $(DESTDIR)/$(bindir); echo -e "\#!/bin/sh\npkexec --disable-internal-agent $(sbindir)/gslapt \$$@" > $(DESTDIR)/$(bindir)/gslapt-polkit; chmod +x $(DESTDIR)/$(bindir)/gslapt-polkit; $(mkinstalldirs) $(DESTDIR)/$(polkitactiondir); $(INSTALL_DATA) org.jaos.gslapt.policy $(DESTDIR)/$(polkitactiondir)/org.jaos.gslapt.policy; sed -i -re 's,(exec\.path">).*(<\/annotate>),\1$(sbindir)/@PACKAGE@\2,g' $(DESTDIR)/$(polkitactiondir)/org.jaos.gslapt.policy
else
INSTALL_GSLAPT_POLKIT =
endif
+AM_DISTCHECK_CONFIGURE_FLAGS = \
+ --with-polkitactiondir='$$(prefix)/$(polkitactiondir)'
+
EXTRA_DIST = \
FAQ \
gslapt.desktop.in \
@@ -67,7 +70,7 @@ uninstall-local:
-rm -f $(DESTDIR)/$(datadir)/pixmaps/gslapt.png
-rm -f $(top_builddir)/series_map.rc $(DESTDIR)/$(pkgdatadir)/series_map.rc
if POLKIT
- -rm -f $(DESTDIR)/$(polkit_actiondir)/org.jaos.gslapt.policy
+ -rm -f $(DESTDIR)/$(polkitactiondir)/org.jaos.gslapt.policy
-rm -f $(DESTDIR)/$(bindir)/gslapt-polkit
endif
diff --git a/configure.ac b/configure.ac
index cc4a430..7f36ffc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,10 +79,16 @@ AC_ARG_WITH(
[use_polkit=$withval],
[AC_CHECK_PROG([use_polkit], [pkexec], yes, [no])]
)
+AC_ARG_WITH(
+ [polkitactiondir],
+ AC_HELP_STRING([--with-polkitactiondir], [Specify the location for the system polkit-1/actions path]),
+ [polkitactiondir=$withval],
+ [PKG_CHECK_VAR(polkitactiondir, polkit-gobject-1, actiondir)]
+)
if test x"$use_polkit" = x"yes"; then
AC_PATH_PROG([PKEXEC], [pkexec])
AM_CONDITIONAL(POLKIT, true)
- AS_AC_EXPAND(DATADIR, $datadir)
+ AC_SUBST(polkitactiondir)
fi
GETTEXT_PACKAGE=gslapt