aboutsummaryrefslogtreecommitdiffstats
path: root/testing/nemo-qml-plugin-devicelock/0001-Add-option-to-disable-installation-of-systemd-servic.patch
blob: 6dc46d09bfe25622c438e6ecd296d4585641b6f3 (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
61
62
63
64
From ef1c0b45b8b4cc5c6da442d4a0f683272e41ff51 Mon Sep 17 00:00:00 2001
From: Bart Ribbers <bribbers@disroot.org>
Date: Mon, 8 Feb 2021 10:16:30 +0100
Subject: [PATCH] Add option to disable installation of systemd service files

Some systems might use elogind instead and thus don't need the service
files
---
 rpm/nemo-qml-plugin-devicelock.spec | 2 +-
 src/daemon/daemon.pro               | 6 +++---
 systemd/systemd.pri                 | 9 +++++----
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/rpm/nemo-qml-plugin-devicelock.spec b/rpm/nemo-qml-plugin-devicelock.spec
index 23da2bc..cb76851 100644
--- a/rpm/nemo-qml-plugin-devicelock.spec
+++ b/rpm/nemo-qml-plugin-devicelock.spec
@@ -51,7 +51,7 @@ Requires:   pkgconfig(nemodbus)
 %setup -q -n %{name}-%{version}
 
 %build
-%qmake5 "VERSION=%{version}"
+%qmake5 "VERSION=%{version}" CONFIG+=SYSTEMD_ENABLED
 make %{?_smp_mflags}
 
 %install
diff --git a/src/daemon/daemon.pro b/src/daemon/daemon.pro
index c52089a..d594a94 100644
--- a/src/daemon/daemon.pro
+++ b/src/daemon/daemon.pro
@@ -39,6 +39,6 @@ systemd.files = \
         systemd/nemo-devicelock.service
 systemd.path= /usr/lib/systemd/system
 
-INSTALLS += \
-        systemd \
-        target
+SYSTEMD_ENABLED += systemd
+
+INSTALLS += target
diff --git a/systemd/systemd.pri b/systemd/systemd.pri
index bb6fd8f..ead2ad7 100644
--- a/systemd/systemd.pri
+++ b/systemd/systemd.pri
@@ -1,4 +1,3 @@
-
 systemd.files = \
         $$PWD/nemo-devicelock.socket
 systemd.path= /usr/lib/systemd/system
@@ -7,6 +6,8 @@ policy.files = \
         $$PWD/org.nemomobile.devicelock.conf
 policy.path = /etc/dbus-1/system.d
 
-INSTALLS += \
-        policy \
-        systemd
+SYSTEMD_ENABLED{
+	INSTALLS += systemd
+}
+
+INSTALLS += policy
-- 
2.30.0