2 # Arch specific functions.
4 ################################################################
6 # Copyright (c) 1995-2014 SUSE Linux Products GmbH
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2 or 3 as
10 # published by the Free Software Foundation.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program (see the file COPYING); if not, write to the
19 # Free Software Foundation, Inc.,
20 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 ################################################################
25 TOPDIR=/usr/src/packages
26 test "$DO_INIT_TOPDIR" = false || rm -rf "$BUILD_ROOT$TOPDIR"
27 mkdir -p "$BUILD_ROOT$TOPDIR"
28 mkdir -p "$BUILD_ROOT$TOPDIR/OTHER"
29 mkdir -p "$BUILD_ROOT$TOPDIR/SOURCES"
30 mkdir -p "$BUILD_ROOT/$TOPDIR/ARCHPKGS"
31 mkdir -p "$BUILD_ROOT/$TOPDIR/BUILD"
32 chown -R "$ABUILD_UID:$ABUILD_GID" "$BUILD_ROOT$TOPDIR"
33 cp -p "$MYSRCDIR"/* $BUILD_ROOT$TOPDIR/SOURCES/
35 echo 'source /etc/makepkg.conf'
37 BUILDDIR $TOPDIR/BUILD \
38 PKGDEST $TOPDIR/ARCHPKGS
39 } > $BUILD_ROOT$TOPDIR/makepkg.conf
42 recipe_prepare_arch() {
43 echo "Preparing sources..."
44 if ! _arch_recipe_makepkg -so "2>&1" ">/dev/null" ; then
45 echo "failed to prepare sources"
51 _arch_recipe_makepkg -ef < /dev/null && BUILD_SUCCEEDED=true
54 recipe_resultdirs_arch() {
58 _arch_recipe_makepkg() {
59 chroot $BUILD_ROOT su -lc "source /etc/profile; cd $TOPDIR/SOURCES && makepkg --config ../makepkg.conf $*" $BUILD_USER