public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: isar-users@googlegroups.com
Cc: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>,
	Henning Schild <henning.schild@siemens.com>
Subject: [PATCH 11-16 of 16 v2 3/6] meta: classes: move package_write_deb to new class isar-base-dpkg
Date: Thu,  3 Aug 2017 21:15:21 +0200	[thread overview]
Message-ID: <c35d8b6818e52eb0c660ae92d239f353be58dd85.1501787333.git.henning.schild@siemens.com> (raw)
In-Reply-To: <cover.1501787333.git.henning.schild@siemens.com>
In-Reply-To: <cover.1501787333.git.henning.schild@siemens.com>

This step is generic to later classes that generate .deb files. This is
preparing for another class doing so.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/dpkg.bbclass           | 20 +------------------
 meta/classes/isar-base-dpkg.bbclass | 40 +++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 19 deletions(-)
 create mode 100644 meta/classes/isar-base-dpkg.bbclass

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index e86e0f4..ca687de 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -1,33 +1,15 @@
 # This software is a part of ISAR.
 # Copyright (C) 2015-2016 ilbers GmbH
 
-inherit isar-base
+inherit isar-base-dpkg
 
 # Add dependency from buildchroot creation
 DEPENDS += "buildchroot"
 do_unpack[deptask] = "do_build"
 
-# Each package should have its own unique build folder, so use
-# recipe name as identifier
-PP = "/home/builder/${PN}"
-BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
-S ?= "${BUILDROOT}"
-
-# make the unpacker extract to BUILDROOT
-WORKDIR_task-unpack = "${BUILDROOT}"
-
 do_build[stamp-extra-info] = "${DISTRO}"
 
 # Build package from sources using build script
 do_build() {
     sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR}
 }
-
-# Install package to dedicated deploy directory
-do_package_write_deb() {
-    install -m 644 ${BUILDROOT}/*.deb ${DEPLOY_DIR_DEB}/
-}
-
-addtask package_write_deb after do_build
-do_package_write_deb[dirs] = "${DEPLOY_DIR_DEB}"
-do_package_write_deb[stamp-extra-info] = "${MACHINE}"
diff --git a/meta/classes/isar-base-dpkg.bbclass b/meta/classes/isar-base-dpkg.bbclass
new file mode 100644
index 0000000..e2c151b
--- /dev/null
+++ b/meta/classes/isar-base-dpkg.bbclass
@@ -0,0 +1,40 @@
+# This software is a part of ISAR.
+# Copyright (C) 2017  Siemens AG
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+
+inherit isar-base
+
+# Each package should have its own unique build folder, so use
+# recipe name as identifier
+PP = "/home/builder/${PN}"
+BUILDROOT = "${BUILDCHROOT_DIR}/${PP}"
+S ?= "${BUILDROOT}"
+
+# make the unpacker extract to BUILDROOT
+WORKDIR_task-unpack = "${BUILDROOT}"
+
+# Install package to dedicated deploy directory
+do_package_write_deb() {
+    install -m 644 ${BUILDROOT}/*.deb ${DEPLOY_DIR_DEB}/
+}
+
+addtask package_write_deb after do_build
+do_package_write_deb[dirs] = "${DEPLOY_DIR_DEB}"
+do_package_write_deb[stamp-extra-info] = "${MACHINE}"
-- 
2.13.0


  parent reply	other threads:[~2017-08-03 19:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-03 19:15 [PATCH 11-16 of 16 v2 0/6] and now for the second half Henning Schild
2017-08-03 19:15 ` [PATCH 11-16 of 16 v2 1/6] meta: dpkg rename install to package_write_deb Henning Schild
2017-08-08 13:06   ` Alexander Smirnov
2017-08-08 14:49     ` Henning Schild
2017-08-08 15:06       ` Alexander Smirnov
2017-08-03 19:15 ` [PATCH 11-16 of 16 v2 2/6] package_write_deb: change access rights on .debs Henning Schild
2017-08-08 13:16   ` Alexander Smirnov
2017-08-21 23:14   ` Baurzhan Ismagulov
2017-08-03 19:15 ` Henning Schild [this message]
2017-08-03 19:15 ` [PATCH 11-16 of 16 v2 4/6] meta: classes: rename dpkg to dpkg-src Henning Schild
2017-08-03 19:15 ` [PATCH 11-16 of 16 v2 5/6] meta: add dpkg-bin class Henning Schild
2017-08-03 19:15 ` [PATCH 11-16 of 16 v2 6/6] recipes-app/hello-bin: add example on how to use dpkg-bin Henning Schild

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=c35d8b6818e52eb0c660ae92d239f353be58dd85.1501787333.git.henning.schild@siemens.com \
    --to=henning.schild@siemens.com \
    --cc=alex.bluesman.smirnov@gmail.com \
    --cc=isar-users@googlegroups.com \
    /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