-
Arnaud Ferraris authored
Building packages into `_build` causes issues with ocaml packages: those too build into this directory by default, which is therefore removed during the `clean` stage. This has been observed for ounit, pcre-ocaml and ocaml-result, and probably affects all ocaml packages. Using a less common name for the build directory solves the issue without having to patch individual packages. Signed-off-by:
Arnaud Ferraris <arnaud.ferraris@collabora.com>
Arnaud Ferraris authoredBuilding packages into `_build` causes issues with ocaml packages: those too build into this directory by default, which is therefore removed during the `clean` stage. This has been observed for ounit, pcre-ocaml and ocaml-result, and probably affects all ocaml packages. Using a less common name for the build directory solves the issue without having to patch individual packages. Signed-off-by:
Arnaud Ferraris <arnaud.ferraris@collabora.com>
ci-buildpackage 1.23 KiB
#!/bin/sh
# SPDX-License-Identifier: MPL-2.0
#
# Copyright © 2019 Collabora Ltd
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
set -ex
export DEBIAN_FRONTEND=noninteractive
apt-get -qy update
apt-get -qy -o APT::Get::Build-Dep-Automatic=yes \
-o Acquire::http::Pipeline-Depth=0 \
build-dep "$(pwd)"
dpkg-checkbuilddeps
dversion="$(dpkg-parsechangelog -S Version)"
case "$dversion" in
*-*)
pristine-lfs checkout -o _apertisbuild --auto
;;
*)
;;
esac
POSTHOOK="rm -rf debian/apertis/gitlab-ci.yml && rmdir --ignore-fail-on-non-empty debian/apertis/"
if [ -z "${RELEASE}" ]; then
POSTHOOK="deb-git-version-gen --distro=apertis --dch && ${POSTHOOK}"
fi
export GBP_CONF_FILES=/dev/null # ignore any upstream gbp.conf shipped with the package
gbp buildpackage --git-ignore-branch \
--git-export-dir=_apertisbuild \
--git-tarball-dir=_apertisbuild \
--git-ignore-new \
--git-postexport="${POSTHOOK}" \
--git-no-create-orig \
-uc -us \
"$@"