mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <rohieb@rohieb.name>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rohieb@rohieb.name>
Subject: [ptxdist] [PATCH v2] ibrdtn: add packaging rules for IBR-DTN and dtndht
Date: Sun, 28 Aug 2016 07:32:50 +0200	[thread overview]
Message-ID: <1472362370-1492-1-git-send-email-rohieb@rohieb.name> (raw)
In-Reply-To: <1471445616-7728-1-git-send-email-rohieb@rohieb.name>

IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC
5050), designed for embedded systems like the RouterBoard532A or
Ubiquiti RouterStation Pro.

IBR-DTN consists of several upstream tarballs which split its
functionality into modular parts, namely ibrcommon, ibrdtn, ibrdtnd and
ibrdtn-tools.  Although they are released at the same time with the same
version, they are usually packaged separately to provide the modularity
on the package level.  In order to provide clean and readable Makefiles,
the upstream naming scheme is adopted here.

Although dtndht is versioned and released as a separate upstream
package, it is effectively part of IBR-DTN as it is not really used
anywhere else, and it's also developed in close contact with IBR-DTN by
the same authors.  For this reason, I'm including all package rules in a
single patch.

The upstream releases includes some functionality which depends on
software not currently available in ptxdist.  This includes tffs,
wifip2p and libvmime.  I have included the directives for these
features, but commented them out, so they can easily be enabled once
that software gets packaged.

Signed-off-by: Roland Hieber <rohieb@rohieb.name>
---
 projectroot/lib/systemd/system/ibrdtnd.service | 10 ++++
 rules/dtndht.in                                | 30 ++++++++++
 rules/dtndht.make                              | 58 ++++++++++++++++++++
 rules/ibrcommon.in                             | 43 +++++++++++++++
 rules/ibrcommon.make                           | 60 ++++++++++++++++++++
 rules/ibrdtn-tools.in                          | 49 +++++++++++++++++
 rules/ibrdtn-tools.make                        | 71 ++++++++++++++++++++++++
 rules/ibrdtn.in                                | 32 +++++++++++
 rules/ibrdtn.make                              | 58 ++++++++++++++++++++
 rules/ibrdtnd.in                               | 70 ++++++++++++++++++++++++
 rules/ibrdtnd.make                             | 76 ++++++++++++++++++++++++++
 11 files changed, 557 insertions(+)
 create mode 100644 projectroot/lib/systemd/system/ibrdtnd.service
 create mode 100644 rules/dtndht.in
 create mode 100644 rules/dtndht.make
 create mode 100644 rules/ibrcommon.in
 create mode 100644 rules/ibrcommon.make
 create mode 100644 rules/ibrdtn-tools.in
 create mode 100644 rules/ibrdtn-tools.make
 create mode 100644 rules/ibrdtn.in
 create mode 100644 rules/ibrdtn.make
 create mode 100644 rules/ibrdtnd.in
 create mode 100644 rules/ibrdtnd.make

diff --git a/projectroot/lib/systemd/system/ibrdtnd.service b/projectroot/lib/systemd/system/ibrdtnd.service
new file mode 100644
index 0000000..bc8bc27
--- /dev/null
+++ b/projectroot/lib/systemd/system/ibrdtnd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=IBR-DTN Bundle Protocol daemon
+Requires=network.target
+
+[Service]
+ExecStart=/usr/sbin/dtnd -D -c /etc/ibrdtnd.conf
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/rules/dtndht.in b/rules/dtndht.in
new file mode 100644
index 0000000..21d6ff1
--- /dev/null
+++ b/rules/dtndht.in
@@ -0,0 +1,30 @@
+## SECTION=networking
+
+menuconfig DTNDHT
+	tristate
+	prompt "dtndht                        "
+	select OPENSSL	if DTNDHT_WITH_OPENSSL
+	help
+	  DTNDHT is a library providing a fully distributed BitTorrent DHT-based
+	  naming service especially for DTN Bundle Protocol EIDs (RFC 5050).
+
+if DTNDHT
+
+config DTNDHT_ENABLE_BLACKLIST
+	bool
+	default y
+	prompt "enable blacklist"
+
+config DTNDHT_ENABLE_RATING
+	bool
+	default y
+	prompt "enable peer rating"
+
+config DTNDHT_WITH_OPENSSL
+	bool
+	default y
+	prompt "use OpenSSL instead of built-in crypto"
+
+endif
+
+# vim: syntax=kconfig
diff --git a/rules/dtndht.make b/rules/dtndht.make
new file mode 100644
index 0000000..c47bb62
--- /dev/null
+++ b/rules/dtndht.make
@@ -0,0 +1,58 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name>
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_DTNDHT) += dtndht
+
+#
+# Paths and names
+#
+DTNDHT_VERSION	:= 0.2.3
+DTNDHT_MD5	:= 37c33910ac7e760aad4db81724aeb4fb
+DTNDHT		:= dtndht-$(DTNDHT_VERSION)
+DTNDHT_SUFFIX	:= tar.gz
+DTNDHT_SOURCE	:= $(SRCDIR)/$(DTNDHT).$(DTNDHT_SUFFIX)
+DTNDHT_DIR	:= $(BUILDDIR)/$(DTNDHT)
+DTNDHT_LICENSE	:= MIT
+
+DTNDHT_URL := \
+	https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(DTNDHT).$(DTNDHT_SUFFIX)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+DTNDHT_CONF_TOOL	:= autoconf
+DTNDHT_CONF_OPT		:= \
+	$(CROSS_AUTOCONF_USR) \
+	--$(call ptx/endis, PTXCONF_DTNDHT_ENABLE_BLACKLIST)-blacklist \
+	--$(call ptx/endis, PTXCONF_DTNDHT_ENABLE_RATING)-rating \
+	--$(call ptx/wwo, PTXCONF_DTNDHT_WITH_OPENSSL)-openssl
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/dtndht.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, dtndht)
+	@$(call install_fixup, dtndht,PRIORITY,optional)
+	@$(call install_fixup, dtndht,SECTION,base)
+	@$(call install_fixup, dtndht,AUTHOR,"Roland Hieber <rohieb@rohieb.name>")
+	@$(call install_fixup, dtndht,DESCRIPTION,missing)
+
+	@$(call install_lib, dtndht, 0, 0, 0755, libdtndht-0.2)
+
+	@$(call install_finish, dtndht)
+
+	@$(call touch)
+
+# vim: syntax=make
diff --git a/rules/ibrcommon.in b/rules/ibrcommon.in
new file mode 100644
index 0000000..f585718
--- /dev/null
+++ b/rules/ibrcommon.in
@@ -0,0 +1,43 @@
+## SECTION=networking
+
+menuconfig IBRCOMMON
+	tristate
+	prompt "ibrcommon                     "
+	select LIBC_M
+	select LIBNL3		if IBRCOMMON_ENABLE_NETLINK
+	select LIBXML2		if IBRCOMMON_WITH_XML
+	select LIBXML2_WRITER	if IBRCOMMON_WITH_XML
+	select OPENSSL		if IBRCOMMON_WITH_OPENSSL
+	help
+	  IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC
+	  5050), designed for embedded systems like the RouterBoard532A or
+	  Ubiquiti RouterStation Pro.
+
+	  This package contains the common library parts which could be of
+	  interest for other software projects.
+
+if IBRCOMMON
+
+config IBRCOMMON_ENABLE_NETLINK
+	bool
+	default y
+	prompt "enable netlink support"
+
+config IBRCOMMON_WITH_LOWPAN
+	bool
+	default y
+	select IBRCOMMON_ENABLE_NETLINK
+	prompt "enable LoWPAN support"
+
+config IBRCOMMON_WITH_OPENSSL
+	bool
+	default y
+	prompt "enable OpenSSL support"
+
+config IBRCOMMON_WITH_XML
+	bool
+	prompt "enable XML support"
+
+endif
+
+# vim: syntax=kconfig
diff --git a/rules/ibrcommon.make b/rules/ibrcommon.make
new file mode 100644
index 0000000..63984a7
--- /dev/null
+++ b/rules/ibrcommon.make
@@ -0,0 +1,60 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name>
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_IBRCOMMON) += ibrcommon
+
+#
+# Paths and names
+#
+IBRCOMMON_VERSION	:= 1.0.1
+IBRCOMMON_MD5		:= 0104763ede969c470f32244d76c234b8
+IBRCOMMON		:= ibrcommon-$(IBRCOMMON_VERSION)
+IBRCOMMON_SUFFIX	:= tar.gz
+IBRCOMMON_SOURCE	:= $(SRCDIR)/$(IBRCOMMON).$(IBRCOMMON_SUFFIX)
+IBRCOMMON_DIR		:= $(BUILDDIR)/$(IBRCOMMON)
+IBRCOMMON_LICENSE	:= Apache-2.0
+
+IBRCOMMON_URL := \
+	https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRCOMMON).$(IBRCOMMON_SUFFIX) \
+	https://github.com/ibrdtn/ibrdtn/releases/download/release%2F$(IBRCOMMON_VERSION)/$(IBRCOMMON).$(IBRCOMMON_SUFFIX)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+IBRCOMMON_CONF_TOOL	:= autoconf
+IBRCOMMON_CONF_OPT	:= \
+	$(CROSS_AUTOCONF_USR) \
+	--$(call ptx/ifdef, PTXCONF_IBRCOMMON_ENABLE_NETLINK,,disable-netlink) \
+	--$(call ptx/wwo, PTXCONF_IBRCOMMON_WITH_LOWPAN)-lowpan \
+	--$(call ptx/wwo, PTXCONF_IBRCOMMON_WITH_OPENSSL)-openssl \
+	--$(call ptx/wwo, PTXCONF_IBRCOMMON_WITH_XML)-xml
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/ibrcommon.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, ibrcommon)
+	@$(call install_fixup, ibrcommon,PRIORITY,optional)
+	@$(call install_fixup, ibrcommon,SECTION,base)
+	@$(call install_fixup, ibrcommon,AUTHOR,"Roland Hieber <rohieb@rohieb.name>")
+	@$(call install_fixup, ibrcommon,DESCRIPTION,missing)
+
+	@$(call install_lib, ibrcommon, 0, 0, 0755, libibrcommon-1.0)
+
+	@$(call install_finish, ibrcommon)
+
+	@$(call touch)
+
+# vim: syntax=make
diff --git a/rules/ibrdtn-tools.in b/rules/ibrdtn-tools.in
new file mode 100644
index 0000000..b175dae
--- /dev/null
+++ b/rules/ibrdtn-tools.in
@@ -0,0 +1,49 @@
+## SECTION=networking
+
+menuconfig IBRDTN_TOOLS
+	tristate
+	prompt "ibrdtn-tools                  "
+	select IBRDTND
+	select IBRDTN
+	select LIBC_M
+	select LIBDAEMON	if IBRDTN_TOOLS_WITH_LIBDAEMON
+	select LIBARCHIVE	if IBRDTN_TOOLS_WITH_LIBARCHIVE
+	help
+	  IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC
+	  5050), designed for embedded systems like the RouterBoard532A or
+	  Ubiquiti RouterStation Pro.
+
+	  This package contains the tools to work with IBR-DTN:  dtnping,
+	  dtnsend, dtnrecv, dtntracepath, dtnconvert, dtninbox, dtnoutbox,
+	  dtnstream, dtntrigger, and dtntunnel.
+
+if IBRDTN_TOOLS
+
+config IBRDTN_TOOLS_WITH_LIBDAEMON
+	bool
+	default y
+	prompt "build with daemon support"
+	help
+	  If this option is enabled, dtntrigger and dtntunnel will be
+	  able to start as a daemon in the background.
+
+config IBRDTN_TOOLS_WITH_LIBARCHIVE
+	bool
+	default y
+	prompt "build with libarchive support (dtninbox, dtnoutbox)"
+	help
+	  libarchive support is needed for dtninbox and dtnoutbox. If this
+	  option is disabled, those tools will not be built.
+
+config IBRDTN_TOOLS_WITH_TFFS
+	bool
+	# needs libtffs
+	depends on BROKEN
+	prompt "build with fat-image support for dtnoutbox [BROKEN]"
+	help
+	  With libtffs support, dtnoutbox can read its input directly from vfat
+	  images.
+
+endif
+
+# vim: syntax=kconfig
diff --git a/rules/ibrdtn-tools.make b/rules/ibrdtn-tools.make
new file mode 100644
index 0000000..d87b6a8
--- /dev/null
+++ b/rules/ibrdtn-tools.make
@@ -0,0 +1,71 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name>
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_IBRDTN_TOOLS) += ibrdtn-tools
+
+#
+# Paths and names
+#
+IBRDTN_TOOLS_VERSION	:= 1.0.1
+IBRDTN_TOOLS_MD5	:= 3e527cedc6132739403fc210e4f8abe2
+IBRDTN_TOOLS		:= ibrdtn-tools-$(IBRDTN_TOOLS_VERSION)
+IBRDTN_TOOLS_SUFFIX	:= tar.gz
+IBRDTN_TOOLS_SOURCE	:= $(SRCDIR)/$(IBRDTN_TOOLS).$(IBRDTN_TOOLS_SUFFIX)
+IBRDTN_TOOLS_DIR	:= $(BUILDDIR)/$(IBRDTN_TOOLS)
+IBRDTN_TOOLS_LICENSE	:= Apache-2.0
+
+IBRDTN_TOOLS_URL := \
+	https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRDTN_TOOLS).$(IBRDTN_TOOLS_SUFFIX) \
+	https://github.com/ibrdtn/ibrdtn/releases/download/release%2F$(IBRDTN_TOOLS_VERSION)/$(IBRDTN_TOOLS).$(IBRDTN_TOOLS_SUFFIX)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+# Note: --without-tffs:  tffs is not yet packaged
+IBRDTN_TOOLS_CONF_TOOL	:= autoconf
+IBRDTN_TOOLS_CONF_OPT	:= \
+	$(CROSS_AUTOCONF_USR) \
+	--$(call ptx/wwo, PTXCONF_IBRDTN_TOOLS_WITH_LIBDAEMON)-libdaemon \
+	--$(call ptx/wwo, PTXCONF_IBRDTN_TOOLS_WITH_LIBARCHIVE)-libarchive \
+	--$(call ptx/wwo, PTXCONF_IBRDTN_TOOLS_WITH_TFFS)-tffs
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/ibrdtn-tools.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, ibrdtn-tools)
+	@$(call install_fixup, ibrdtn-tools,PRIORITY,optional)
+	@$(call install_fixup, ibrdtn-tools,SECTION,base)
+	@$(call install_fixup, ibrdtn-tools,AUTHOR,"Roland Hieber <rohieb@rohieb.name>")
+	@$(call install_fixup, ibrdtn-tools,DESCRIPTION,missing)
+
+	@$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnstream)
+	@$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnrecv)
+	@$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtntrigger)
+	@$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnconvert)
+	@$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnping)
+	@$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtntracepath)
+	@$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnsend)
+	@$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/sbin/dtntunnel)
+ifdef IBRDTN_TOOLS_WITH_LIBARCHIVE
+	@$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtninbox)
+	@$(call install_copy, ibrdtn-tools, 0, 0, 0755, -, /usr/bin/dtnoutbox)
+endif
+
+	@$(call install_finish, ibrdtn-tools)
+
+	@$(call touch)
+
+# vim: syntax=make
diff --git a/rules/ibrdtn.in b/rules/ibrdtn.in
new file mode 100644
index 0000000..9e7511b
--- /dev/null
+++ b/rules/ibrdtn.in
@@ -0,0 +1,32 @@
+## SECTION=networking
+
+menuconfig IBRDTN
+	tristate
+	prompt "ibrdtn                        "
+	select IBRCOMMON
+	select LIBC_M
+	select ZLIB	if IBRDTN_WITH_COMPRESSION
+	select GLIB	if IBRDTN_WITH_GLIB
+	help
+	  IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC
+	  5050), designed for embedded systems like the RouterBoard532A or
+	  Ubiquiti RouterStation Pro.
+
+	  This package contains the shared library used to build applications
+	  with IBR-DTN functionality.
+
+if IBRDTN
+
+config IBRDTN_WITH_COMPRESSION
+	bool
+	default y
+	prompt "build with bundle compression support"
+
+config IBRDTN_WITH_GLIB
+	bool
+	prompt "link to glib-2.0 library"
+	help
+	  Linking against GLib results in optimized endianess conversion macros.
+
+endif
+# vim: syntax=kconfig
diff --git a/rules/ibrdtn.make b/rules/ibrdtn.make
new file mode 100644
index 0000000..61b7856
--- /dev/null
+++ b/rules/ibrdtn.make
@@ -0,0 +1,58 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name>
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_IBRDTN) += ibrdtn
+
+#
+# Paths and names
+#
+IBRDTN_VERSION	:= 1.0.1
+IBRDTN_MD5	:= 37208be202f199f1790983ff78b2fa8f
+IBRDTN		:= ibrdtn-$(IBRDTN_VERSION)
+IBRDTN_SUFFIX	:= tar.gz
+IBRDTN_SOURCE	:= $(SRCDIR)/$(IBRDTN).$(IBRDTN_SUFFIX)
+IBRDTN_DIR	:= $(BUILDDIR)/$(IBRDTN)
+IBRDTN_LICENSE	:= Apache-2.0
+
+IBRDTN_URL := \
+	https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRDTN).$(IBRDTN_SUFFIX) \
+	https://github.com/ibrdtn/ibrdtn/releases/download/release%2F$(IBRDTN_VERSION)/$(IBRDTN).$(IBRDTN_SUFFIX)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+IBRDTN_CONF_TOOL	:= autoconf
+IBRDTN_CONF_OPT		:= \
+	$(CROSS_AUTOCONF_USR) \
+	--$(call ptx/wwo, PTXCONF_IBRDTN_WITH_COMPRESSION)-compression \
+	--$(call ptx/wwo, PTXCONF_IBRDTN_WITH_GLIB)-glib
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/ibrdtn.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, ibrdtn)
+	@$(call install_fixup, ibrdtn,PRIORITY,optional)
+	@$(call install_fixup, ibrdtn,SECTION,base)
+	@$(call install_fixup, ibrdtn,AUTHOR,"Roland Hieber <rohieb@rohieb.name>")
+	@$(call install_fixup, ibrdtn,DESCRIPTION,missing)
+
+	@$(call install_lib, ibrdtn, 0, 0, 0755, libibrdtn-1.0)
+
+	@$(call install_finish, ibrdtn)
+
+	@$(call touch)
+
+# vim: syntax=make
diff --git a/rules/ibrdtnd.in b/rules/ibrdtnd.in
new file mode 100644
index 0000000..44f7834
--- /dev/null
+++ b/rules/ibrdtnd.in
@@ -0,0 +1,70 @@
+## SECTION=networking
+
+menuconfig IBRDTND
+	tristate
+	prompt "ibrdtnd                       "
+	select IBRDTN
+	select LIBC_M
+	select LIBDAEMON		if IBRDTND_ENABLE_DAEMON
+	select DTNDHT			if IBRDTND_ENABLE_DTNDHT
+	select IBRCOMMON_WITH_OPENSSL	if IBRDTND_WITH_TLS
+	select SQLITE			if IBRDTND_WITH_SQLITE
+	select LIBCURL			if IBRDTND_WITH_LIBCURL
+	help
+	  IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC
+	  5050), designed for embedded systems like the RouterBoard532A or
+	  Ubiquiti RouterStation Pro.
+
+	  This package contains the daemon which handles all DTN communication.
+
+if IBRDTND
+
+config IBRDTND_SYSTEMD_UNIT
+	bool
+	default y
+	depends on INITMETHOD_SYSTEMD
+	prompt "install systemd unit files for the IBR-DTN daemon"
+
+config IBRDTND_ENABLE_DAEMON
+	bool
+	default y
+	prompt "build with libdaemon support"
+
+config IBRDTND_ENABLE_DTNDHT
+	bool
+	default y
+	prompt "build with DTNDHT support"
+	help
+	  The DTNDHT library makes it possible to find neighbors via a
+	  distributed hash table based on the BitTorrent protocol.
+
+config IBRDTND_WITH_SQLITE
+	bool
+	prompt "build with SQLite storage module"
+
+config IBRDTND_WITH_TLS
+	bool
+	prompt "build with TLS support (Bundle Security Protocol)"
+
+config IBRDTND_WITH_LIBCURL
+	bool
+	prompt "build with libcurl (HTTP Convergence Layer)"
+
+config IBRDTND_WITH_VMIME
+	bool
+	prompt "build with libvmime (E-Mail Convergence Layer) [BROKEN]"
+	# needs libvmime
+	depends on BROKEN
+
+config IBRDTND_WITH_WIFIP2P
+	bool
+	prompt "build with wifip2p support [BROKEN]"
+	# needs wifip2p
+	depends on BROKEN
+	help
+	  With wifip2p support, IBR-DTN can use supported Wi-Fi (IEEE
+	  802.11) devices to connect to other neighbors directly without the
+	  need for an additional Wi-Fi access point.
+
+endif
+# vim: syntax=kconfig
diff --git a/rules/ibrdtnd.make b/rules/ibrdtnd.make
new file mode 100644
index 0000000..e907b71
--- /dev/null
+++ b/rules/ibrdtnd.make
@@ -0,0 +1,76 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Roland Hieber <rohieb@rohieb.name>
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_IBRDTND) += ibrdtnd
+
+#
+# Paths and names
+#
+IBRDTND_VERSION	:= 1.0.1
+IBRDTND_MD5	:= 933d37bf777700a6e1709d0f7a129613
+IBRDTND		:= ibrdtnd-$(IBRDTND_VERSION)
+IBRDTND_SUFFIX	:= tar.gz
+IBRDTND_SOURCE	:= $(SRCDIR)/$(IBRDTND).$(IBRDTND_SUFFIX)
+IBRDTND_DIR	:= $(BUILDDIR)/$(IBRDTND)
+IBRDTND_LICENSE	:= Apache-2.0
+
+IBRDTND_URL := \
+	https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(IBRDTND).$(IBRDTND_SUFFIX) \
+	https://github.com/ibrdtn/ibrdtn/releases/download/release%2F$(IBRDTND_VERSION)/$(IBRDTND).$(IBRDTND_SUFFIX)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+IBRDTND_CONF_TOOL := autoconf
+IBRDTND_CONF_OPT  := \
+	$(CROSS_AUTOCONF_USR) \
+	--$(call ptx/endis, PTXCONF_IBRDTND_ENABLE_DAEMON)-libdaemon \
+	--$(call ptx/endis, PTXCONF_IBRDTND_ENABLE_DTNDHT)-dtndht \
+	--$(call ptx/wwo, PTXCONF_IBRDTND_WITH_SQLITE)-sqlite \
+	--$(call ptx/wwo, PTXCONF_IBRDTND_WITH_TLS)-tls \
+	--$(call ptx/wwo, PTXCONF_IBRDTND_WITH_LIBCURL)-curl \
+	--$(call ptx/wwo, PTXCONF_IBRDTND_WITH_VMIME)-vmime \
+	--$(call ptx/wwo, PTXCONF_IBRDTND_WITH_WIFIP2P)-wifip2p
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/ibrdtnd.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, ibrdtnd)
+	@$(call install_fixup, ibrdtnd,PRIORITY,optional)
+	@$(call install_fixup, ibrdtnd,SECTION,base)
+	@$(call install_fixup, ibrdtnd,AUTHOR,"Roland Hieber <rohieb@rohieb.name>")
+	@$(call install_fixup, ibrdtnd,DESCRIPTION,missing)
+
+	@$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/sbin/dtnd)
+	@$(call install_alternative, ibrdtnd, 0, 0, 0644, /etc/ibrdtnd.conf)
+
+ifdef PTXCONF_IBRDTND_WITH_TLS
+	@$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/bin/ibrdtn-genkey.sh)
+	@mkdir -p ${ROOTDIR}/etc/ibrdtn/bpsec ${ROOTDIR}/etc/ibrdtn/certs
+endif
+
+ifdef PTXCONF_IBRDTND_SYSTEMD_UNIT
+	@$(call install_alternative, ibrdtnd, 0, 0, 0644, \
+		/lib/systemd/system/ibrdtnd.service)
+	@$(call install_link, ibrdtnd, ../ibrdtnd.service, \
+		/lib/systemd/system/multi-user.target.wants/ibrdtnd.service)
+endif
+
+	@$(call install_finish, ibrdtnd)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.8.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2016-08-28  5:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17 14:53 [ptxdist] [PATCH] " Roland Hieber
2016-08-18  6:53 ` Michael Olbrich
2016-08-23  4:41   ` Roland Hieber
2016-08-25 11:02     ` Michael Olbrich
2016-08-25 15:11       ` Robert Schwebel
2016-08-28  5:27   ` Roland Hieber
2016-08-28  7:36     ` Robert Schwebel
2016-08-28 18:36       ` Roland Hieber
2016-09-01  9:58         ` Michael Olbrich
2016-09-01 15:09         ` Alexander Dahl
2016-08-29  7:42     ` Juergen Borleis
2016-08-18 10:15 ` Michael Olbrich
2016-08-28  5:32 ` Roland Hieber [this message]
2016-09-07 13:48   ` [ptxdist] [PATCH v2] " Michael Olbrich
2016-09-08  1:07     ` Roland Hieber
2016-09-08  6:35       ` Michael Olbrich

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=1472362370-1492-1-git-send-email-rohieb@rohieb.name \
    --to=rohieb@rohieb.name \
    --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