summaryrefslogtreecommitdiff
path: root/build-recipe-collax
diff options
context:
space:
mode:
authorshuai.fu <shuai01.fu@samsung.com>2017-04-22 13:43:02 +0800
committery0169.zhang <y0169.zhang@samsung.com>2017-07-10 11:19:29 +0800
commit24dc605f13d22c9c40999910af164d1f8c5bfd8e (patch)
treeace6b1cfe91019ef6ea452a7fa6bd9d446c4d153 /build-recipe-collax
parent07c0dbf5da85bc3931186838be1420cfd8a2de7f (diff)
downloadbuild-24dc605f13d22c9c40999910af164d1f8c5bfd8e.tar.gz
build-24dc605f13d22c9c40999910af164d1f8c5bfd8e.tar.bz2
build-24dc605f13d22c9c40999910af164d1f8c5bfd8e.zip
Update to upstream 20160629upstream/20160629
Change-Id: Idc31c269aec94e852b30885dee65a827b318b7a3 Signed-off-by: shuai.fu <shuai01.fu@samsung.com>
Diffstat (limited to 'build-recipe-collax')
-rw-r--r--build-recipe-collax53
1 files changed, 53 insertions, 0 deletions
diff --git a/build-recipe-collax b/build-recipe-collax
new file mode 100644
index 0000000..783e5d7
--- /dev/null
+++ b/build-recipe-collax
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+recipe_setup_collax()
+{
+ TOPDIR="/usr/src/packages"
+ test "$DO_INIT_TOPDIR" != false && rm -Rf "$BUILD_ROOT/$TOPDIR"
+ mkdir -p "$BUILD_ROOT/$TOPDIR"/{SOURCES,SOURCES.DEB,DEBS,OTHER}
+ cp -p "$MYSRCDIR"/* "$BUILD_ROOT/$TOPDIR/SOURCES/"
+ chown -R "$ABUILD_UID:$ABUILD_GID" "$BUILD_ROOT/$TOPDIR"
+}
+
+recipe_prepare_collax()
+{
+ DEB_SOURCEDIR="$TOPDIR/SOURCES"
+ DEB_DSCFILE="$RECIPEFILE"
+ chmod -v +x "$BUILD_ROOT/$DEB_SOURCEDIR/build.collax"
+ ln -fsv build.collax "$BUILD_ROOT/$DEB_SOURCEDIR/build"
+}
+
+collax_build()
+{
+ local buildroot="$1"
+
+ if test -n "$RUN_SHELL"; then
+ chroot "$buildroot" su -
+ ret=$?
+ else
+ chroot "$buildroot" su - $BUILD_USER -c \
+ "cd $TOPDIR/SOURCES && ./build"
+ ret=$?
+ fi
+ if test "$ret" = 0; then
+ BUILD_SUCCEEDED=true
+ fi
+}
+
+collax_move_build_result()
+{
+ for f in "$BUILD_ROOT/$DEB_SOURCEDIR"/*.{deb,changes}; do
+ test -f "$f" && mv -v "$f" "$BUILD_ROOT/$TOPDIR/DEBS/"
+ done
+}
+
+recipe_build_collax()
+{
+ collax_build "$BUILD_ROOT"
+ collax_move_build_result
+}
+
+recipe_resultdirs_collax()
+{
+ echo DEBS
+}