mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
armbian-next: extras/buildpkg.sh code is out [deprecated, later completely dropped]
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# create_chroot <target_dir> <release> <arch>
|
||||
#
|
||||
create_chroot() {
|
||||
function create_chroot() {
|
||||
local target_dir="$1"
|
||||
local release=$2
|
||||
local arch=$3
|
||||
@@ -112,7 +112,7 @@ create_chroot() {
|
||||
|
||||
# chroot_prepare_distccd <release> <arch>
|
||||
#
|
||||
chroot_prepare_distccd() {
|
||||
function chroot_prepare_distccd() {
|
||||
local release=$1
|
||||
local arch=$2
|
||||
local dest=/tmp/distcc/${release}-${arch}
|
||||
@@ -149,7 +149,7 @@ chroot_prepare_distccd() {
|
||||
|
||||
# chroot_build_packages
|
||||
#
|
||||
chroot_build_packages() {
|
||||
function chroot_build_packages() {
|
||||
local built_ok=()
|
||||
local failed=()
|
||||
mkdir -p ${SRC}/cache/buildpkg
|
||||
@@ -275,7 +275,7 @@ chroot_build_packages() {
|
||||
display_alert "Building packages" "$package_name $release/$arch" "ext"
|
||||
ts=$(date +%s)
|
||||
local dist_builddeps_name="package_builddeps_${release}"
|
||||
[[ -v $dist_builddeps_name ]] && package_builddeps="${package_builddeps} ${!dist_builddeps_name}"
|
||||
# [[ -v $dist_builddeps_name ]] && package_builddeps="${package_builddeps} ${!dist_builddeps_name}"
|
||||
|
||||
# create build script
|
||||
LOG_OUTPUT_FILE=/root/build-"${package_name}".log
|
||||
@@ -323,7 +323,7 @@ chroot_build_packages() {
|
||||
} #############################################################################
|
||||
|
||||
# create build script
|
||||
create_build_script() {
|
||||
function create_build_script() {
|
||||
cat <<- EOF > "${target_dir}"/root/build.sh
|
||||
#!/bin/bash
|
||||
export PATH="/usr/lib/ccache:\$PATH"
|
||||
@@ -398,7 +398,7 @@ create_build_script() {
|
||||
|
||||
# chroot_installpackages_local
|
||||
#
|
||||
chroot_installpackages_local() {
|
||||
function chroot_installpackages_local() {
|
||||
local conf="${SRC}"/config/aptly-temp.conf
|
||||
rm -rf /tmp/aptly-temp/
|
||||
mkdir -p /tmp/aptly-temp/
|
||||
@@ -426,7 +426,7 @@ chroot_installpackages_local() {
|
||||
|
||||
# chroot_installpackages <remote_only>
|
||||
#
|
||||
chroot_installpackages() {
|
||||
function chroot_installpackages() {
|
||||
local remote_only=$1
|
||||
local install_list=""
|
||||
for plugin in "${SRC}"/packages/extras-buildpkgs/*.conf; do
|
||||
@@ -465,4 +465,4 @@ chroot_installpackages() {
|
||||
EOF
|
||||
chmod +x "${SDCARD}"/tmp/install.sh
|
||||
chroot "${SDCARD}" /bin/bash -c "/tmp/install.sh" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
|
||||
} #############################################################################
|
||||
}
|
||||
|
||||
@@ -160,6 +160,8 @@ function main_default_build_single() {
|
||||
|
||||
# build additional packages
|
||||
if [[ $EXTERNAL_NEW == compile ]]; then
|
||||
display_alert "Building external packages" "$EXTERNAL - WARNING: this has not been armbian-nextifed yet and will fail." "warn"
|
||||
exit_with_error "buildpkg chroot_build_packages() nas not been ported to armbian-next yet, rpardini is a bum"
|
||||
LOG_SECTION="chroot_build_packages" do_with_logging chroot_build_packages
|
||||
fi
|
||||
|
||||
|
||||
@@ -54,10 +54,12 @@ function build_rootfs_and_image() {
|
||||
LOG_SECTION="install_distribution_agnostic" do_with_logging install_distribution_agnostic
|
||||
|
||||
# install locally built packages # @TODO: armbian-nextify this eventually
|
||||
[[ $EXTERNAL_NEW == compile ]] && LOG_SECTION="packages_local" do_with_logging chroot_installpackages_local
|
||||
#[[ $EXTERNAL_NEW == compile ]] && LOG_SECTION="packages_local" do_with_logging chroot_installpackages_local
|
||||
[[ $EXTERNAL_NEW == compile ]] && display_alert "Not running" "NOT armbian-next ported yet: chroot_installpackages_local" "warn"
|
||||
|
||||
# install from apt.armbian.com # @TODO: armbian-nextify this eventually
|
||||
[[ $EXTERNAL_NEW == prebuilt ]] && LOG_SECTION="packages_prebuilt" do_with_logging chroot_installpackages "yes"
|
||||
#[[ $EXTERNAL_NEW == prebuilt ]] && LOG_SECTION="packages_prebuilt" do_with_logging chroot_installpackages "yes"
|
||||
[[ $EXTERNAL_NEW == prebuilt ]] && display_alert "Not running" "NOT armbian-next ported yet: chroot_installpackages 'yes'" "warn"
|
||||
|
||||
# stage: user customization script
|
||||
# NOTE: installing too many packages may fill tmpfs mount
|
||||
|
||||
Reference in New Issue
Block a user