From: Markus Pargmann <mpa@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Markus Pargmann <mpa@pengutronix.de>
Subject: [ptxdist] [PATCH v3 2/3] alfred: Initial commit
Date: Fri, 20 Jun 2014 12:49:21 +0200 [thread overview]
Message-ID: <1403261362-6938-2-git-send-email-mpa@pengutronix.de> (raw)
In-Reply-To: <1403261362-6938-1-git-send-email-mpa@pengutronix.de>
Add A.L.F.R.E.D. daemon to ptxdist. It is used to distribute data
between nodes of batman mesh networks.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
generic/lib/systemd/system/alfred@.service | 8 +++
generic/lib/systemd/system/batadv-vis@.service | 9 ++++
rules/alfred.in | 24 +++++++++
rules/alfred.make | 68 ++++++++++++++++++++++++++
4 files changed, 109 insertions(+)
create mode 100644 generic/lib/systemd/system/alfred@.service
create mode 100644 generic/lib/systemd/system/batadv-vis@.service
create mode 100644 rules/alfred.in
create mode 100644 rules/alfred.make
diff --git a/generic/lib/systemd/system/alfred@.service b/generic/lib/systemd/system/alfred@.service
new file mode 100644
index 000000000000..08e014c417a2
--- /dev/null
+++ b/generic/lib/systemd/system/alfred@.service
@@ -0,0 +1,8 @@
+[Unit]
+Description = A.L.F.R.E.D. server on interface %i
+BindsTo = sys-subsystem-net-devices-%i.device
+After = sys-subsystem-net-devices-%i.device
+
+[Service]
+ExecStart=/usr/bin/alfred -i %i
+
diff --git a/generic/lib/systemd/system/batadv-vis@.service b/generic/lib/systemd/system/batadv-vis@.service
new file mode 100644
index 000000000000..39b4b6f34710
--- /dev/null
+++ b/generic/lib/systemd/system/batadv-vis@.service
@@ -0,0 +1,9 @@
+[Unit]
+Description = batman-adv visualisation service on interface %i
+BindsTo = sys-subsystem-net-devices-%i.device
+After = sys-subsystem-net-devices-%i.device alfred@.service
+Requires = alfred@.service
+
+[Service]
+ExecStart=/usr/bin/batadv-vis -s -i %i
+
diff --git a/rules/alfred.in b/rules/alfred.in
new file mode 100644
index 000000000000..d75af49d43df
--- /dev/null
+++ b/rules/alfred.in
@@ -0,0 +1,24 @@
+## SECTION=networking
+
+menuconfig ALFRED
+ tristate
+ prompt "A.L.F.R.E.D. "
+ help
+ Alfred is a distributed data distribution service which is used for
+ batman mesh networks.
+
+if ALFRED
+
+config ALFRED_SYSTEMD_SERVICE
+ bool "install alfred and batadv-vis systemd service files"
+ default y
+
+config ALFRED_SYSTEMD_SERVICE_ALFRED_INTF
+ string "Enable alfred systemd service file for this interface"
+ depends on ALFRED_SYSTEMD_SERVICE
+
+config ALFRED_SYSTEMD_SERVICE_BATADVVIS_INTF
+ string "Enable batadv-vis systemd service file for this interface"
+ depends on ALFRED_SYSTEMD_SERVICE
+
+endif
diff --git a/rules/alfred.make b/rules/alfred.make
new file mode 100644
index 000000000000..9b74dfcd27de
--- /dev/null
+++ b/rules/alfred.make
@@ -0,0 +1,68 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2014 by Markus Pargmann <mpa@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_ALFRED) += alfred
+
+#
+# Paths and names
+#
+ALFRED_VERSION := 2014.1.0
+ALFRED_MD5 := aaee0fbbc3aa011ba9c0a1d3f3b2801e
+ALFRED := alfred-$(ALFRED_VERSION)
+ALFRED_SUFFIX := tar.gz
+ALFRED_URL := http://downloads.open-mesh.org/batman/stable/sources/alfred/$(ALFRED).$(ALFRED_SUFFIX)
+ALFRED_SOURCE := $(SRCDIR)/$(ALFRED).$(ALFRED_SUFFIX)
+ALFRED_DIR := $(BUILDDIR)/$(ALFRED)
+ALFRED_LICENSE := unknown
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+ALFRED_CONF_TOOL := NO
+ALFRED_MAKE_ENV := $(CROSS_ENV) CONFIG_ALFRED_GPSD=n
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/alfred.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, alfred)
+ @$(call install_fixup, alfred,PRIORITY,optional)
+ @$(call install_fixup, alfred,SECTION,base)
+ @$(call install_fixup, alfred,AUTHOR,"Markus Pargmann <mpa@pengutronix.de>")
+ @$(call install_fixup, alfred,DESCRIPTION,missing)
+
+ @$(call install_copy, alfred, 0, 0, 0755, $(ALFRED_DIR)/alfred, /usr/bin/alfred)
+ @$(call install_copy, alfred, 0, 0, 0755, $(ALFRED_DIR)/vis/batadv-vis, /usr/bin/batadv-vis)
+
+ifdef PTXCONF_ALFRED_SYSTEMD_SERVICE
+ @$(call install_alternative, alfred, 0, 0, 0644, /lib/systemd/system/alfred@.service)
+ @$(call install_alternative, alfred, 0, 0, 0644, /lib/systemd/system/batadv-vis@.service)
+ifneq ($(PTXCONF_ALFRED_SYSTEMD_SERVICE_ALFRED_INTF),"")
+ @$(call install_link, alfred, ../alfred@.service, \
+ /lib/systemd/system/multi-user.target.wants/alfred@$(PTXCONF_ALFRED_SYSTEMD_SERVICE_ALFRED_INTF).service)
+endif
+ifneq ($(PTXCONF_ALFRED_SYSTEMD_SERVICE_BATADVVIS_INTF),"")
+ @$(call install_link, alfred, ../batadv-vis@.service, \
+ /lib/systemd/system/multi-user.target.wants/batadv-vis@$(PTXCONF_ALFRED_SYSTEMD_SERVICE_BATADVVIS_INTF).service)
+endif
+endif
+
+ @$(call install_finish, alfred)
+
+ @$(call touch)
+
+# vim: syntax=make
--
2.0.0
--
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2014-06-20 10:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 10:49 [ptxdist] [PATCH v3 1/3] radvd: " Markus Pargmann
2014-06-20 10:49 ` Markus Pargmann [this message]
2014-06-20 10:49 ` [ptxdist] [PATCH v3 3/3] collectd: " Markus Pargmann
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=1403261362-6938-2-git-send-email-mpa@pengutronix.de \
--to=mpa@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