summaryrefslogtreecommitdiff
blob: 456b804489a481a1adf126e35824e224880f6cdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
From 3746e1367fe5dc430c431b349ed6a40ee7156e74 Mon Sep 17 00:00:00 2001
From: Gilles Dartiguelongue <eva@gentoo.org>
Date: Thu, 4 Oct 2018 10:30:03 +0200
Subject: [PATCH 1/3] Install switcher tool to FHS directory

---
 client/Makefile.am                       | 2 +-
 client/{file_names.h => file_names.h.in} | 2 +-
 configure.ac                             | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)
 rename client/{file_names.h => file_names.h.in} (98%)

diff --git a/client/Makefile.am b/client/Makefile.am
index f39c45f..0fb91d3 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -24,7 +24,15 @@ endif
 
 bin_PROGRAMS = boinc_client boinccmd
 if !OS_WIN32
-bin_PROGRAMS += switcher
+pkglibexec_PROGRAMS = switcher
 endif

+edit = $(SED) -e 's|@pkglibexecdir[@]|$(pkglibexecdir)|g'
+
+file_names.h: file_names.h.in Makefile
+	$(AM_V_GEN)$(edit) $@.in > $@
+
+BUILT_SOURCES = file_names.h
+CLEANFILES = file_names.h
+
 boinccmd_SOURCES = boinc_cmd.cpp
@@ -67,6 +67,7 @@ boinc_client_SOURCES = \
     current_version.cpp \
     dhrystone.cpp \
     dhrystone2.cpp \
+    file_names.h \
     file_names.cpp \
     file_xfer.cpp \
     gpu_amd.cpp \
diff --git a/client/file_names.h b/client/file_name.h.in
similarity index 98%
rename from client/file_names.h
rename to client/file_name.h.in
index 37f9b29..67874e5 100644
--- a/client/file_names.h
+++ b/client/file_names.h.in
@@ -97,7 +97,7 @@ extern void send_log_after(const char* filename, double t, MIOFILE& mf);
 #define STATE_FILE_PREV             "client_state_prev.xml"
 #define STDERR_FILE_NAME            "stderr.txt"
 #define STDOUT_FILE_NAME            "stdout.txt"
-#define SWITCHER_DIR                "switcher"
+#define SWITCHER_DIR                "@pkglibexecdir@"
 #define SWITCHER_FILE_NAME          "switcher"
 #define TASK_STATE_FILENAME         "boinc_task_state.xml"
 #define TEMP_ACCT_FILE_NAME         "temp_acct.xml"
-- 
2.18.0