Skip to content

Commit ceb1b55

Browse files
committed
extensions: add APA extension
using this extension allows for activation of the APA armbian package archive and installation of the provided binary packages at image creation time from within the Armbian Build Framework. The goal of APA is to simplify maintenance of Armbian Core by moving dependency logic and other packaging information into a separate space and handle that meta-data with the proper distribution-creation and -publication tools. Currently, much of this is done with fragile bash scripting in Armbian Core instead. https://github.com/armbian/apa
1 parent 5194e0f commit ceb1b55

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

extensions/apa.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Install armbian-common etc. from APA
2+
3+
function extension_prepare_config__apa() {
4+
display_alert "Target image will have Armbian Package Archive (APA) enabled by default" "${EXTENSION}" "info"
5+
}
6+
7+
function custom_apt_repo__add_apa() {
8+
run_host_command_logged echo "deb [signed-by=${APT_SIGNING_KEY_FILE}] https://github.armbian.com/apa current main" "|" tee "${SDCARD}"/etc/apt/sources.list.d/armbian-apa.list
9+
}
10+
11+
function post_armbian_repo_customize_image__install_from_apa() {
12+
# do not install armbian recommends for minimal images
13+
[[ "${BUILD_MINIMAL,,}" =~ ^(true|yes)$ ]] && INSTALL_RECOMMENDS="no" || INSTALL_RECOMMENDS="yes"
14+
chroot_sdcard_apt_get --install-recommends=$INSTALL_RECOMMENDS install "armbian-common armbian-bsp"
15+
16+
# install desktop environmnent if requested
17+
case ${DESKTOP_ENVIRONMENT^^} in
18+
XFCE|KDE|GNOME)
19+
display_alert "installing ${DESKTOP_ENVIRONMENT^^} desktop environment" "${EXTENSION}: ${DESKTOP_ENVIRONMENT^^}" "info"
20+
chroot_sdcard_apt_get --install-recommends=yes "armbian-desktop-${DESKTOP_ENVIRONMENT,,}"
21+
;;
22+
esac
23+
}

0 commit comments

Comments
 (0)