mirror of
https://github.com/X11Libre/xf86-video-intel.git
synced 2026-03-24 01:24:12 +00:00
Backlight helper build fixes
Don't hardcode $(prefix)/libexec Fix install hook when DESTDIR is set Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75028
This commit is contained in:
committed by
Chris Wilson
parent
3d629c91cf
commit
b71f3d8bd4
@@ -701,6 +701,7 @@ DRIVER_NAME="intel"
|
|||||||
AC_SUBST([DRIVER_NAME])
|
AC_SUBST([DRIVER_NAME])
|
||||||
AC_SUBST([moduledir])
|
AC_SUBST([moduledir])
|
||||||
AC_DEFINE_DIR([PREFIX_PATH], prefix, [installation prefix])
|
AC_DEFINE_DIR([PREFIX_PATH], prefix, [installation prefix])
|
||||||
|
AC_DEFINE_DIR([LIBEXEC_PATH], libexecdir, [libexec directory])
|
||||||
|
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
Makefile
|
Makefile
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ static int __backlight_helper_init(struct backlight *b, char *iface)
|
|||||||
* Either way, we have to trust that it is our backlight-helper
|
* Either way, we have to trust that it is our backlight-helper
|
||||||
* that is run and that we have scrutinised it carefully.
|
* that is run and that we have scrutinised it carefully.
|
||||||
*/
|
*/
|
||||||
if (stat(PREFIX_PATH "/libexec/xf86-video-intel-backlight-helper", &st))
|
if (stat(LIBEXEC_PATH "/xf86-video-intel-backlight-helper", &st))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if ((st.st_mode & (S_IFREG | S_ISUID | S_IXUSR)) != (S_IFREG | S_ISUID | S_IXUSR)) {
|
if ((st.st_mode & (S_IFREG | S_ISUID | S_IXUSR)) != (S_IFREG | S_ISUID | S_IXUSR)) {
|
||||||
@@ -219,10 +219,10 @@ static int __backlight_helper_init(struct backlight *b, char *iface)
|
|||||||
close(fds[0]);
|
close(fds[0]);
|
||||||
if (use_pkexec) {
|
if (use_pkexec) {
|
||||||
execlp("pkexec", "pkexec",
|
execlp("pkexec", "pkexec",
|
||||||
PREFIX_PATH "/libexec/xf86-video-intel-backlight-helper",
|
LIBEXEC_PATH "/xf86-video-intel-backlight-helper",
|
||||||
iface, (char *)0);
|
iface, (char *)0);
|
||||||
} else {
|
} else {
|
||||||
execle(PREFIX_PATH "/libexec/xf86-video-intel-backlight-helper",
|
execle(LIBEXEC_PATH "/xf86-video-intel-backlight-helper",
|
||||||
"xf86-video-intel-backlight-helper",
|
"xf86-video-intel-backlight-helper",
|
||||||
iface, (char *)0, env);
|
iface, (char *)0, env);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ AM_CFLAGS = \
|
|||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
drivermandir = $(DRIVER_MAN_DIR)
|
drivermandir = $(DRIVER_MAN_DIR)
|
||||||
backlight_helperdir = $(prefix)/libexec
|
|
||||||
policydir = $(datarootdir)/polkit-1/actions
|
policydir = $(datarootdir)/polkit-1/actions
|
||||||
|
|
||||||
if BUILD_TOOLS
|
if BUILD_TOOLS
|
||||||
@@ -33,12 +32,12 @@ driverman_DATA = intel-virtual-output.$(DRIVER_MAN_SUFFIX)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if BUILD_BACKLIGHT_HELPER
|
if BUILD_BACKLIGHT_HELPER
|
||||||
backlight_helper_PROGRAMS = xf86-video-intel-backlight-helper
|
libexec_PROGRAMS = xf86-video-intel-backlight-helper
|
||||||
nodist_policy_DATA = org.x.xf86-video-intel.backlight-helper.policy
|
nodist_policy_DATA = org.x.xf86-video-intel.backlight-helper.policy
|
||||||
|
|
||||||
backlight_helper = $(backlight_helperdir)/xf86-video-intel-backlight-helper
|
backlight_helper = $(libexecdir)/xf86-video-intel-backlight-helper
|
||||||
install-data-hook:
|
install-exec-hook:
|
||||||
-chown root $(backlight_helper) && chmod u+s $(backlight_helper)
|
-chown root $(DESTDIR)$(backlight_helper) && chmod u+s $(DESTDIR)$(backlight_helper)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
intel_virtual_output_CFLAGS = \
|
intel_virtual_output_CFLAGS = \
|
||||||
|
|||||||
@@ -14,6 +14,6 @@
|
|||||||
<allow_inactive>no</allow_inactive>
|
<allow_inactive>no</allow_inactive>
|
||||||
<allow_active>yes</allow_active>
|
<allow_active>yes</allow_active>
|
||||||
</defaults>
|
</defaults>
|
||||||
<annotate key="org.freedesktop.policykit.exec.path">@prefix@/libexec/xf86-video-intel-backlight-helper</annotate>
|
<annotate key="org.freedesktop.policykit.exec.path">@LIBEXEC_PATH@/xf86-video-intel-backlight-helper</annotate>
|
||||||
</action>
|
</action>
|
||||||
</policyconfig>
|
</policyconfig>
|
||||||
|
|||||||
Reference in New Issue
Block a user