From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Josef Holzmayr Date: Thu, 3 Nov 2011 14:13:03 +0100 Message-Id: <1320325983-5124-2-git-send-email-holzmayr@rsi-elektrotechnik.de> In-Reply-To: <1320325983-5124-1-git-send-email-holzmayr@rsi-elektrotechnik.de> References: <1320325983-5124-1-git-send-email-holzmayr@rsi-elektrotechnik.de> Subject: [ptxdist] [PATCH 2/2] Add systemd init support to QML demo. Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0529819327==" Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: jbe@pengutronix.de, ptxdist@pengutronix.de --===============0529819327== Content-Type: text/plain Signed-off-by: Josef Holzmayr --- .../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 --===============0529819327== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- ptxdist mailing list ptxdist@pengutronix.de --===============0529819327==--