summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sysutils/gsmartcontrol/Makefile4
-rw-r--r--sysutils/gsmartcontrol/files/patch-data_org.gsmartcontrol.policy11
2 files changed, 14 insertions, 1 deletions
diff --git a/sysutils/gsmartcontrol/Makefile b/sysutils/gsmartcontrol/Makefile
index 42acc710a6de..6301fa7ebb77 100644
--- a/sysutils/gsmartcontrol/Makefile
+++ b/sysutils/gsmartcontrol/Makefile
@@ -2,7 +2,7 @@
PORTNAME= gsmartcontrol
PORTVERSION= 1.1.3
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= sysutils
MASTER_SITES= SF/${PORTNAME}/${PORTVERSION}
@@ -42,5 +42,7 @@ post-patch:
${WRKSRC}/src/*/Makefile.in
@${REINPLACE_CMD} -i .c++20 '/config\.h/y/<>/""/' \
${WRKSRC}/src/global_macros.h
+ @${REINPLACE_CMD} -i '' 's|%%PREFIX%%|${PREFIX}|g' \
+ ${WRKSRC}/data/org.gsmartcontrol.policy
.include <bsd.port.mk>
diff --git a/sysutils/gsmartcontrol/files/patch-data_org.gsmartcontrol.policy b/sysutils/gsmartcontrol/files/patch-data_org.gsmartcontrol.policy
new file mode 100644
index 000000000000..8cb3cbda9556
--- /dev/null
+++ b/sysutils/gsmartcontrol/files/patch-data_org.gsmartcontrol.policy
@@ -0,0 +1,11 @@
+--- data/org.gsmartcontrol.policy.orig 2017-08-27 18:49:36.000000000 +0200
++++ data/org.gsmartcontrol.policy 2021-02-02 21:41:16.437199000 +0100
+@@ -12,7 +12,7 @@
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+- <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/gsmartcontrol</annotate>
++ <annotate key="org.freedesktop.policykit.exec.path">%%PREFIX%%/sbin/gsmartcontrol</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+