mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Josef Holzmayr <holzmayr@rsi-elektrotechnik.de>
To: jbe@pengutronix.de, ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 2/2] Add systemd init support to QML demo.
Date: Thu,  3 Nov 2011 14:13:03 +0100	[thread overview]
Message-ID: <1320325983-5124-2-git-send-email-holzmayr@rsi-elektrotechnik.de> (raw)
In-Reply-To: <1320325983-5124-1-git-send-email-holzmayr@rsi-elektrotechnik.de>

[-- Attachment #1: Type: text/plain, Size: 2475 bytes --]

Signed-off-by: Josef Holzmayr <holzmayr@rsi-elektrotechnik.de>
---
 .../qml-demo-2011.11.0/systemd/qmldemo.service     |   10 ++++++++++
 rules/qml-demo.in                                  |   10 ++++++++++
 rules/qml-demo.make                                |   10 ++++++++++
 3 files changed, 30 insertions(+), 0 deletions(-)
 create mode 100644 local_src/qml-demo-2011.11.0/systemd/qmldemo.service

diff --git a/local_src/qml-demo-2011.11.0/systemd/qmldemo.service b/local_src/qml-demo-2011.11.0/systemd/qmldemo.service
new file mode 100644
index 0000000..1d6d939
--- /dev/null
+++ b/local_src/qml-demo-2011.11.0/systemd/qmldemo.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=QML Demo Application
+After=dev-input-event1.device
+
+[Service]
+Environment=QWS_MOUSE_PROTO=Tslib:/dev/input/event1
+ExecStart=/usr/bin/qml-demo -qws
+
+[Install]
+WantedBy=multi-user.target
diff --git a/rules/qml-demo.in b/rules/qml-demo.in
index 0e7531e..3bdd256 100644
--- a/rules/qml-demo.in
+++ b/rules/qml-demo.in
@@ -13,3 +13,13 @@ config QML_DEMO
 	  own QML based application into this PTXdist project.
 	  Part of this entry is the installation of a start script that runs
 	  this QML application when the system starts.
+
+if QML_DEMO
+
+config QML_DEMO_SYSTEMD_UNIT
+	bool
+	default y
+	depends on SYSTEMD
+	prompt "install systemd unit files for QML demo"
+
+endif
diff --git a/rules/qml-demo.make b/rules/qml-demo.make
index 881692d..6a8c51f 100644
--- a/rules/qml-demo.make
+++ b/rules/qml-demo.make
@@ -62,6 +62,16 @@ $(STATEDIR)/qml-demo.targetinstall:
 	@$(call install_alternative, qml-demo, 0, 0, 0755, \
 		/etc/rc.once.d/tscalibrate)
 
+ifdef PTXCONF_INITMETHOD_SYSTEMD
+ifdef PTXCONF_QML_DEMO_SYSTEMD_UNIT
+	@$(call install_copy, qml-demo, 0, 0, 0644, \
+		$(QML_DEMO_DIR)/systemd/qmldemo.service, \
+		/lib/systemd/system/qmldemo.service)
+	@$(call install_link, qml-demo, ../qmldemo.service, \
+		/lib/systemd/system/multi-user.target.wants/qmldemo.service)
+endif
+endif
+
 	@$(call install_finish, qml-demo)
 
 	@$(call touch)
-- 
1.7.4.1


-- 
_____________________________________________________________
R-S-I Elektrotechnik GmbH & Co. KG
Woelkestrasse 11
D-85301 Schweitenkirchen
Fon: +49 8444 9204-0
Fax: +49 8444 9204-50
www.rsi-elektrotechnik.de

_____________________________________________________________
Amtsgericht Ingolstadt - GmbH: HRB 191328 - KG: HRA 170363
Gesch�ftsf�hrer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
USt-IdNr.: DE 128592548



[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2011-11-03 13:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-03 13:13 [ptxdist] [PATCH 1/2] Add a simple QML demo application Josef Holzmayr
2011-11-03 13:13 ` Josef Holzmayr [this message]
2011-11-03 14:11 ` Michael Olbrich
2011-11-03 17:03   ` Josef Holzmayr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1320325983-5124-2-git-send-email-holzmayr@rsi-elektrotechnik.de \
    --to=holzmayr@rsi-elektrotechnik.de \
    --cc=jbe@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox