From: Lucas Stach <l.stach@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 3/4] python-mako: new package
Date: Mon, 8 Jun 2015 12:05:59 +0200 [thread overview]
Message-ID: <1433757960-27712-3-git-send-email-l.stach@pengutronix.de> (raw)
In-Reply-To: <1433757960-27712-1-git-send-email-l.stach@pengutronix.de>
Mako is a template library written in Python. It provides a
familiar, non-XML syntax which compiles into Python modules
for maximum performance.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
rules/python-mako.in | 11 +++++++
rules/python-mako.make | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 94 insertions(+)
create mode 100644 rules/python-mako.in
create mode 100644 rules/python-mako.make
diff --git a/rules/python-mako.in b/rules/python-mako.in
new file mode 100644
index 000000000000..bec88ccb4b96
--- /dev/null
+++ b/rules/python-mako.in
@@ -0,0 +1,11 @@
+## SECTION=python
+
+config PYTHON_MAKO
+ tristate
+ prompt "python-mako"
+ select PYTHON
+ select HOST_PYTHON_SETUPTOOLS
+ help
+ Mako is a template library written in Python. It provides a
+ familiar, non-XML syntax which compiles into Python modules
+ for maximum performance.
diff --git a/rules/python-mako.make b/rules/python-mako.make
new file mode 100644
index 000000000000..baef87d194de
--- /dev/null
+++ b/rules/python-mako.make
@@ -0,0 +1,83 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2015 by Lucas Stach <l.stach@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_MAKO) += python-mako
+
+#
+# Paths and names
+#
+PYTHON_MAKO_VERSION := 1.0.1
+PYTHON_MAKO_MD5 := 9f0aafd177b039ef67b90ea350497a54
+PYTHON_MAKO := Mako-$(PYTHON_MAKO_VERSION)
+PYTHON_MAKO_SUFFIX := tar.gz
+PYTHON_MAKO_URL := https://pypi.python.org/packages/source/M/Mako/$(PYTHON_MAKO).$(PYTHON_MAKO_SUFFIX)
+PYTHON_MAKO_SOURCE := $(SRCDIR)/$(PYTHON_MAKO).$(PYTHON_MAKO_SUFFIX)
+PYTHON_MAKO_DIR := $(BUILDDIR)/$(PYTHON_MAKO)
+PYTHON_MAKO_LICENSE := unknown
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PYTHON_MAKO_CONF_TOOL := NO
+PYTHON_MAKO_CONF_PATH := PATH=$(CROSS_PATH)
+PYTHON_MAKO_MAKE_ENV := $(CROSS_ENV)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python-mako.compile:
+ @$(call targetinfo)
+ cd $(PYTHON_MAKO_DIR) && \
+ $(PYTHON_MAKO_PATH) $(PYTHON_MAKO_MAKE_ENV) \
+ $(CROSS_PYTHON) setup.py build
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python-mako.install:
+ @$(call targetinfo)
+ cd $(PYTHON_MAKO_DIR) && \
+ $(PYTHON_MAKO_PATH) $(PYTHON_MAKO_MAKE_ENV) \
+ python$(PYTHON_MAJORMINOR) setup.py install --root=$(PYTHON_MAKO_PKGDIR) --prefix=/usr
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+PYTHON_MAKO_PYTHON_PATH = /usr/lib/python$(PYTHON_MAJORMINOR)/site-packages/mako
+
+$(STATEDIR)/python-mako.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, python-mako)
+ @$(call install_fixup, python-mako,PRIORITY,optional)
+ @$(call install_fixup, python-mako,SECTION,base)
+ @$(call install_fixup, python-mako,AUTHOR,"Lucas Stach <l.stach@pengutronix.de>")
+ @$(call install_fixup, python-mako,DESCRIPTION,missing)
+
+ @cd "$(PYTHON_MAKO_PKGDIR)$(PYTHON_MAKO_PYTHON_PATH)" && \
+ find -type d -o -type f -name "*.py" -printf '%P\n' | while read fn; do \
+ $(call install_copy, python-mako, 0, 0, 0644, -, \
+ $(PYTHON_MAKO_PYTHON_PATH)/$$fn); \
+ done
+
+ @$(call install_finish, python-mako)
+
+ @$(call touch)
+
+# vim: syntax=make
--
2.1.4
--
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2015-06-08 10:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 10:05 [ptxdist] [PATCH 1/4] python: install python2 symlink Lucas Stach
2015-06-08 10:05 ` [ptxdist] [PATCH 2/4] host-python-six: new package Lucas Stach
2015-06-08 10:05 ` Lucas Stach [this message]
2015-06-08 10:06 ` [ptxdist] [PATCH 4/4] piglit: " Lucas Stach
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=1433757960-27712-3-git-send-email-l.stach@pengutronix.de \
--to=l.stach@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