2 # binary package specific functions for the build script
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 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 ################################################################
24 for i in rpm deb arch ; do
25 . "$BUILD_DIR/build-pkg-$i"
33 pkg_prepare_$PSUF "$@"
37 pkg_install_$PSUF "$@"
40 pkg_verify_installed() {
41 pkg_verify_installed_$PSUF "$@"
49 pkg_cumulate_$PSUF "$@"
53 pkg_finalize_$PSUF "$@"
57 pkg_preinstall_$PSUF "$@"
61 pkg_runscripts_$PSUF "$@"
64 pkg_autodetect_type() {
65 if test -n "$PREINSTALL_IMAGE" ; then
66 echo "cannot autodetect build type when using a preinstall image" >&2
70 test -e $BUILD_ROOT/.init_b_cache/rpms/rpm.rpm && PSUF=rpm
71 test -e $BUILD_ROOT/.init_b_cache/rpms/dpkg.deb && PSUF=deb
72 test -e $BUILD_ROOT/.init_b_cache/rpms/pacman.arch && PSUF=arch
73 if test -z "$PSUF" ; then
74 echo "could not autodetect package type" >&2
80 PSUF=`queryconfig binarytype --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH"`
81 test "$PSUF" = UNDEFINED && PSUF=
89 echo "unknown package type '$PSUF'" >&2