1diff --git a/configure.ac b/configure.ac
2--- a/configure.ac
3+++ b/configure.ac
4@@ -475,6 +475,7 @@
5
6
7 AC_CONFIG_FILES([ data/gsmartcontrol.desktop data/gsmartcontrol.appdata.xml \
8+ data/org.gsmartcontrol.policy \
9 data/nsis/distribution.txt data/nsis/gsmartcontrol.nsi \
10 debian.dist/changelog \
11 src/gsc_winres.rc src/gsmartcontrol.exe.manifest \
12diff --git a/data/gsmartcontrol-root.in b/data/gsmartcontrol-root.in
13--- a/data/gsmartcontrol-root.in
14+++ b/data/gsmartcontrol-root.in
15@@ -8,7 +8,7 @@
16 # Run gsmartcontrol with root, asking for root password first.
17 # export GSMARTCONTROL_SU to override a su command (e.g. "kdesu -c").
18
19-EXEC_BIN="@prefix@/sbin/gsmartcontrol";
20+EXEC_BIN="@prefix@/bin/gsmartcontrol";
21 prog_name="gsmartcontrol"
22
23
24@@ -118,7 +118,7 @@
25 # Add @prefix@/sbin as well (freebsd seems to require it).
26 # Note that beesu won't show a GUI login box if /usr/sbin is before /usr/bin,
27 # so add it first as well.
28-EXTRA_PATHS="/usr/bin:/usr/sbin:/usr/local/sbin:@prefix@/sbin";
29+EXTRA_PATHS="/usr/bin:/usr/sbin:/usr/local/sbin:@prefix@/bin";
30 export PATH="$EXTRA_PATHS:$PATH"
31
32
33diff --git a/data/org.gsmartcontrol.policy b/data/org.gsmartcontrol.policy.in
34rename from data/org.gsmartcontrol.policy
35rename to data/org.gsmartcontrol.policy.in
36--- a/data/org.gsmartcontrol.policy
37+++ b/data/org.gsmartcontrol.policy.in
38@@ -12,7 +12,7 @@
39 <allow_inactive>auth_admin</allow_inactive>
40 <allow_active>auth_admin</allow_active>
41 </defaults>
42- <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/gsmartcontrol</annotate>
43+ <annotate key="org.freedesktop.policykit.exec.path">@prefix@/bin/gsmartcontrol</annotate>
44 <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
45 </action>
46
47diff --git a/src/Makefile.am b/src/Makefile.am
48--- a/src/Makefile.am
49+++ b/src/Makefile.am
50@@ -24,7 +24,7 @@
51 # endif
52
53
54-sbin_PROGRAMS = gsmartcontrol
55+bin_PROGRAMS = gsmartcontrol
56
57 gsmartcontrol_LDADD = $(top_builddir)/src/applib/libapplib.a \
58 $(top_builddir)/src/libdebug/libdebug.a \