From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Markus Pargmann Date: Fri, 20 Jun 2014 12:49:21 +0200 Message-Id: <1403261362-6938-2-git-send-email-mpa@pengutronix.de> In-Reply-To: <1403261362-6938-1-git-send-email-mpa@pengutronix.de> References: <1403261362-6938-1-git-send-email-mpa@pengutronix.de> Subject: [ptxdist] [PATCH v3 2/3] alfred: Initial commit 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: Markus Pargmann 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 --- 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 +# +# 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 ") + @$(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