* [ptxdist] [PATCH 1/4] host-cython: add CROSS_CYTHON_ENV declaration
2014-03-24 8:06 [ptxdist] [PATCH 0/4] add simpleRPL package, dependencies and cakes Alexander Aring
@ 2014-03-24 8:06 ` Alexander Aring
2014-03-24 8:06 ` [ptxdist] [PATCH 2/4] python-routing: add new package Alexander Aring
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Alexander Aring @ 2014-03-24 8:06 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Aring
This patch adds a CROSS_CYTHON_ENV declaration to the host-cython make
rule file. Cython usually a host binary "cython", that's why it is a
host tool. Besides cython there exist a way to use cython in the
setup.py framework of python. Then we need to add to $(CROSS_PYTHON) an
env to "add" a site-package search path to the $(PTXCONF_SYSROOT_HOST).
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
Hi Michael,
for examples you can see patch 2/4 and 3/4:
("python-routing: add new package")
("python-rplicmp: add new package")
these packages will use the $(CROSS_CYTHON_ENV).
rules/host-cython.make | 2 ++
1 file changed, 2 insertions(+)
diff --git a/rules/host-cython.make b/rules/host-cython.make
index 212b12d..a12dfe4 100644
--- a/rules/host-cython.make
+++ b/rules/host-cython.make
@@ -25,6 +25,8 @@ HOST_CYTHON_SOURCE := $(SRCDIR)/$(HOST_CYTHON).$(HOST_CYTHON_SUFFIX)
HOST_CYTHON_DIR := $(HOST_BUILDDIR)/$(HOST_CYTHON)
HOST_CYTHON_LICENSE := APLv2
+CROSS_CYTHON_ENV := PYTHONUSERBASE=$(PTXCONF_SYSROOT_HOST)
+
# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------
--
1.9.1
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ptxdist] [PATCH 2/4] python-routing: add new package
2014-03-24 8:06 [ptxdist] [PATCH 0/4] add simpleRPL package, dependencies and cakes Alexander Aring
2014-03-24 8:06 ` [ptxdist] [PATCH 1/4] host-cython: add CROSS_CYTHON_ENV declaration Alexander Aring
@ 2014-03-24 8:06 ` Alexander Aring
2014-03-24 10:07 ` Marc Kleine-Budde
2014-03-24 8:06 ` [ptxdist] [PATCH 3/4] python-rplicmp: " Alexander Aring
2014-03-24 8:06 ` [ptxdist] [PATCH 4/4] simplerpl: " Alexander Aring
3 siblings, 1 reply; 7+ messages in thread
From: Alexander Aring @ 2014-03-24 8:06 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Aring
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
rules/python-routing.in | 13 +++++++++
rules/python-routing.make | 74 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 87 insertions(+)
create mode 100644 rules/python-routing.in
create mode 100644 rules/python-routing.make
diff --git a/rules/python-routing.in b/rules/python-routing.in
new file mode 100644
index 0000000..abfa12c
--- /dev/null
+++ b/rules/python-routing.in
@@ -0,0 +1,13 @@
+## SECTION=python
+
+config PYTHON_ROUTING
+ tristate
+ select HOST_CYTHON
+ select PYTHON
+ select LIBNL3
+ prompt "python-routing"
+ help
+ This is yet another python binding for the libnl3. This bidning
+ was written to encompass the "route" module which isn't encompassed
+ by any other libnl3 python binding. The special route module is
+ necessary for the simpleRPL implementation.
diff --git a/rules/python-routing.make b/rules/python-routing.make
new file mode 100644
index 0000000..33dcf5e
--- /dev/null
+++ b/rules/python-routing.make
@@ -0,0 +1,74 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2014 by Alexander Aring <aar@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_PYTHON_ROUTING) += python-routing
+
+#
+# Paths and names
+#
+PYTHON_ROUTING_VERSION := 1.0
+PYTHON_ROUTING_MD5 := 2ef6adf2ab6a2f303600999546198a69
+PYTHON_ROUTING := python_routing-$(PYTHON_ROUTING_VERSION)
+PYTHON_ROUTING_SUFFIX := tar.gz
+PYTHON_ROUTING_URL := http://cakelab.org/~eintopf/RPL/$(PYTHON_ROUTING).$(PYTHON_ROUTING_SUFFIX)
+PYTHON_ROUTING_SOURCE := $(SRCDIR)/$(PYTHON_ROUTING).$(PYTHON_ROUTING_SUFFIX)
+PYTHON_ROUTING_DIR := $(BUILDDIR)/$(PYTHON_ROUTING)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PYTHON_ROUTING_CONF_TOOL := NO
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python-routing.compile:
+ @$(call targetinfo)
+ @cd $(PYTHON_ROUTING_DIR) && \
+ $(CROSS_ENV) $(CROSS_CYTHON_ENV) $(CROSS_PYTHON) \
+ setup.py build_ext
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python-routing.install:
+ @$(call targetinfo)
+ @cd $(PYTHON_ROUTING_DIR) && \
+ $(CROSS_ENV) $(CROSS_CYTHON_ENV) $(CROSS_PYTHON) \
+ setup.py install --root=$(PYTHON_ROUTING_PKGDIR) --prefix="/usr"
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python-routing.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, python-routing)
+ @$(call install_fixup, python-routing,PRIORITY,optional)
+ @$(call install_fixup, python-routing,SECTION,base)
+ @$(call install_fixup, python-routing,AUTHOR,"Alexander Aring <aar@pengutronix.de>")
+ @$(call install_fixup, python-routing,DESCRIPTION,missing)
+
+ @$(call install_copy, python-routing, 0, 0, 0755, -, $(PYTHON_SITEPACKAGES)/Routing.so)
+
+ @$(call install_finish, python-routing)
+
+ @$(call touch)
+
+# vim: syntax=make
--
1.9.1
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] [PATCH 2/4] python-routing: add new package
2014-03-24 8:06 ` [ptxdist] [PATCH 2/4] python-routing: add new package Alexander Aring
@ 2014-03-24 10:07 ` Marc Kleine-Budde
2014-03-24 12:05 ` Alexander Aring
0 siblings, 1 reply; 7+ messages in thread
From: Marc Kleine-Budde @ 2014-03-24 10:07 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Aring
[-- Attachment #1.1: Type: text/plain, Size: 1054 bytes --]
On 03/24/2014 09:06 AM, Alexander Aring wrote:
Marc
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/python-routing.targetinstall:
> + @$(call targetinfo)
> +
> + @$(call install_init, python-routing)
> + @$(call install_fixup, python-routing,PRIORITY,optional)
> + @$(call install_fixup, python-routing,SECTION,base)
> + @$(call install_fixup, python-routing,AUTHOR,"Alexander Aring <aar@pengutronix.de>")
> + @$(call install_fixup, python-routing,DESCRIPTION,missing)
> +
> + @$(call install_copy, python-routing, 0, 0, 0755, -, $(PYTHON_SITEPACKAGES)/Routing.so)
Libs should be installed 644.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 242 bytes --]
[-- Attachment #2: Type: text/plain, Size: 48 bytes --]
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] [PATCH 2/4] python-routing: add new package
2014-03-24 10:07 ` Marc Kleine-Budde
@ 2014-03-24 12:05 ` Alexander Aring
0 siblings, 0 replies; 7+ messages in thread
From: Alexander Aring @ 2014-03-24 12:05 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: ptxdist
Hi Marc,
On Mon, Mar 24, 2014 at 11:07:42AM +0100, Marc Kleine-Budde wrote:
> On 03/24/2014 09:06 AM, Alexander Aring wrote:
> Marc
>
> > +# ----------------------------------------------------------------------------
> > +# Target-Install
> > +# ----------------------------------------------------------------------------
> > +
> > +$(STATEDIR)/python-routing.targetinstall:
> > + @$(call targetinfo)
> > +
> > + @$(call install_init, python-routing)
> > + @$(call install_fixup, python-routing,PRIORITY,optional)
> > + @$(call install_fixup, python-routing,SECTION,base)
> > + @$(call install_fixup, python-routing,AUTHOR,"Alexander Aring <aar@pengutronix.de>")
> > + @$(call install_fixup, python-routing,DESCRIPTION,missing)
> > +
> > + @$(call install_copy, python-routing, 0, 0, 0755, -, $(PYTHON_SITEPACKAGES)/Routing.so)
>
> Libs should be installed 644.
>
indeed, thanks for this! I will change this and send v2.
- Alex
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ptxdist] [PATCH 3/4] python-rplicmp: add new package
2014-03-24 8:06 [ptxdist] [PATCH 0/4] add simpleRPL package, dependencies and cakes Alexander Aring
2014-03-24 8:06 ` [ptxdist] [PATCH 1/4] host-cython: add CROSS_CYTHON_ENV declaration Alexander Aring
2014-03-24 8:06 ` [ptxdist] [PATCH 2/4] python-routing: add new package Alexander Aring
@ 2014-03-24 8:06 ` Alexander Aring
2014-03-24 8:06 ` [ptxdist] [PATCH 4/4] simplerpl: " Alexander Aring
3 siblings, 0 replies; 7+ messages in thread
From: Alexander Aring @ 2014-03-24 8:06 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Aring
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
rules/python-rplicmp.in | 11 +++++++
rules/python-rplicmp.make | 75 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 86 insertions(+)
create mode 100644 rules/python-rplicmp.in
create mode 100644 rules/python-rplicmp.make
diff --git a/rules/python-rplicmp.in b/rules/python-rplicmp.in
new file mode 100644
index 0000000..75fedc5
--- /dev/null
+++ b/rules/python-rplicmp.in
@@ -0,0 +1,11 @@
+## SECTION=python
+
+config PYTHON_RPLICMP
+ tristate
+ prompt "python-rplicmp"
+ select HOST_CYTHON
+ select PYTHON
+ select LIBCAP
+ help
+ This module allows easy creation of ICMPv6 socket in Python tailored to
+ send RPL messages.
diff --git a/rules/python-rplicmp.make b/rules/python-rplicmp.make
new file mode 100644
index 0000000..02909d8
--- /dev/null
+++ b/rules/python-rplicmp.make
@@ -0,0 +1,75 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2014 by Alexander Aring <aar@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_PYTHON_RPLICMP) += python-rplicmp
+
+#
+# Paths and names
+#
+PYTHON_RPLICMP_VERSION := 1.0
+PYTHON_RPLICMP_MD5 := b2d9a93beb095826fce6e4752fb63491
+PYTHON_RPLICMP := python_rplicmp-$(PYTHON_RPLICMP_VERSION)
+PYTHON_RPLICMP_SUFFIX := tar.gz
+PYTHON_RPLICMP_URL := http://cakelab.org/~eintopf/RPL/$(PYTHON_RPLICMP).$(PYTHON_RPLICMP_SUFFIX)
+PYTHON_RPLICMP_SOURCE := $(SRCDIR)/$(PYTHON_RPLICMP).$(PYTHON_RPLICMP_SUFFIX)
+PYTHON_RPLICMP_DIR := $(BUILDDIR)/$(PYTHON_RPLICMP)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PYTHON_RPLICMP_CONF_TOOL := NO
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python-rplicmp.compile:
+ @$(call targetinfo)
+ @cd $(PYTHON_RPLICMP_DIR) && \
+ $(CROSS_ENV) $(CROSS_CC) -Wall -pedantic -lcap -c -fPIC -o caplib.o caplib.c && \
+ $(CROSS_ENV) $(CROSS_CC) -Wall -pedantic -lcap -c -fPIC -o icmplib.o icmplib.c && \
+ $(CROSS_ENV) $(CROSS_CYTHON_ENV) $(CROSS_PYTHON) setup.py build_ext
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python-rplicmp.install:
+ @$(call targetinfo)
+ @cd $(PYTHON_RPLICMP_DIR) && \
+ $(CROSS_ENV) $(CROSS_CYTHON_ENV) $(CROSS_PYTHON) \
+ setup.py install --root=$(PYTHON_RPLICMP_PKGDIR) --prefix="/usr"
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python-rplicmp.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, python-rplicmp)
+ @$(call install_fixup, python-rplicmp,PRIORITY,optional)
+ @$(call install_fixup, python-rplicmp,SECTION,base)
+ @$(call install_fixup, python-rplicmp,AUTHOR,"Alexander Aring <aar@pengutronix.de>")
+ @$(call install_fixup, python-rplicmp,DESCRIPTION,missing)
+
+ @$(call install_copy, python-rplicmp, 0, 0, 0755, -, $(PYTHON_SITEPACKAGES)/RplIcmp.so)
+
+ @$(call install_finish, python-rplicmp)
+
+ @$(call touch)
+
+# vim: syntax=make
--
1.9.1
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ptxdist] [PATCH 4/4] simplerpl: add new package
2014-03-24 8:06 [ptxdist] [PATCH 0/4] add simpleRPL package, dependencies and cakes Alexander Aring
` (2 preceding siblings ...)
2014-03-24 8:06 ` [ptxdist] [PATCH 3/4] python-rplicmp: " Alexander Aring
@ 2014-03-24 8:06 ` Alexander Aring
3 siblings, 0 replies; 7+ messages in thread
From: Alexander Aring @ 2014-03-24 8:06 UTC (permalink / raw)
To: ptxdist; +Cc: Alexander Aring
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
rules/simplerpl.in | 13 +++++++++
rules/simplerpl.make | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 92 insertions(+)
create mode 100644 rules/simplerpl.in
create mode 100644 rules/simplerpl.make
diff --git a/rules/simplerpl.in b/rules/simplerpl.in
new file mode 100644
index 0000000..76201f2
--- /dev/null
+++ b/rules/simplerpl.in
@@ -0,0 +1,13 @@
+## SECTION=networking
+
+config SIMPLERPL
+ tristate
+ prompt "simplerpl"
+ select PYTHON_ROUTING
+ select PYTHON_RPLICMP
+ select PYZMQ
+ help
+ SimpleRPL is Linux-based implementation of the Routing Protocol for
+ Low-Power and Lossy Networks (RPL) as defined in RFC 6550. It aims
+ to complete the Linux Wireless Sensor Network ecosystem by bringing
+ a (hopefully) fully-compliant RPL implementation
diff --git a/rules/simplerpl.make b/rules/simplerpl.make
new file mode 100644
index 0000000..a35eee1
--- /dev/null
+++ b/rules/simplerpl.make
@@ -0,0 +1,79 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2014 by Alexander Aring <aar@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_SIMPLERPL) += simplerpl
+
+#
+# Paths and names
+#
+SIMPLERPL_VERSION := 1.0
+SIMPLERPL_MD5 := 8544a9f7414e98cd2d17ff15332c8eee
+SIMPLERPL := simplerpl-$(SIMPLERPL_VERSION)
+SIMPLERPL_SUFFIX := tar.gz
+SIMPLERPL_URL := http://cakelab.org/~eintopf/RPL/$(SIMPLERPL).$(SIMPLERPL_SUFFIX)
+SIMPLERPL_SOURCE := $(SRCDIR)/$(SIMPLERPL).$(SIMPLERPL_SUFFIX)
+SIMPLERPL_DIR := $(BUILDDIR)/$(SIMPLERPL)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+SIMPLERPL_CONF_TOOL := NO
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/simplerpl.compile:
+ @$(call targetinfo)
+ @cd $(SIMPLERPL_DIR) && \
+ $(CROSS_ENV) $(CROSS_PYTHON) setup.py build -e "/usr/bin/env python"
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/simplerpl.install:
+ @$(call targetinfo)
+ @cd $(SIMPLERPL_DIR) && \
+ $(CROSS_PYTHON) \
+ setup.py install --root=$(SIMPLERPL_PKGDIR) --prefix="/usr"
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/simplerpl.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, simplerpl)
+ @$(call install_fixup, simplerpl,PRIORITY,optional)
+ @$(call install_fixup, simplerpl,SECTION,base)
+ @$(call install_fixup, simplerpl,AUTHOR,"Alexander Aring <aar@pengutronix.de>")
+ @$(call install_fixup, simplerpl,DESCRIPTION,missing)
+
+ @for file in $(shell cd $(SIMPLERPL_PKGDIR) && find . -name "*.pyc"); \
+ do \
+ $(call install_copy, simplerpl, 0, 0, 0644, -, /$$file); \
+ done
+
+ @$(call install_copy, simplerpl, 0, 0, 0755, -, /usr/bin/cliRPL.py)
+ @$(call install_copy, simplerpl, 0, 0, 0755, -, /usr/bin/simpleRPL.py)
+
+ @$(call install_finish, simplerpl)
+
+ @$(call touch)
+
+# vim: syntax=make
--
1.9.1
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 7+ messages in thread