# Maintainer: Oliver Smith pkgname=calamares pkgver=3.2.26.1 pkgrel=0 arch="all !armhf !armv7" # armhf: pmaports#75, armv7: build.postmarketos.org#72 url="https://calamares.io/" pkgdesc="Distribution-independent installer framework" license="GPL-3.0-or-later AND LGPL-2.1-only" depends="ckbcomp os-prober musl-locales cryptsetup" depends_dev=" cmake kcoreaddons-dev qt5-qttools-dev yaml-cpp-dev " makedepends=" $depends_dev boost-dev boost-python3 extra-cmake-modules kconfig-dev kcrash-dev ki18n-dev kpackage-dev kparts-dev kpmcore-dev kservice-dev kwidgetsaddons-dev libatasmart-dev libpwquality-dev parted-dev plasma-framework-dev polkit-qt-1-dev python3-dev qt5-qtbase-dev qt5-qtdeclarative-dev qt5-qtsvg-dev " checkdepends="xvfb-run" source="https://github.com/calamares/calamares/archive/v$pkgver/calamares-v$pkgver.tar.gz 0001-ViewManager-remove-mainLayout-border.patch " subpackages="$pkgname-doc $pkgname-lang $pkgname-dev" # Modules to build: # https://github.com/calamares/calamares/tree/master/src/modules _modules=" keyboardq localeq mount services-openrc shellprocess unpackfs welcomeq " for i in $_modules; do subpackages="$pkgname-mod-$i:_module $subpackages" done # Check if $1 is in $_modules is_module_enabled() { local i for i in $_modules; do [ "$i" = "$1" ] && return 0 done return 1 } prepare() { default_prepare local i cd "$builddir/src/modules" # Fill $_skip_modules, list disabled modules msg "disabled modules:" for i in *; do if ! [ -d "$i" ] || is_module_enabled "$i"; then continue fi _skip_modules="$_skip_modules $i" echo " - $i" done # List enabled modules msg "enabled modules:" for i in $_modules; do echo " - $i" done } build() { cmake -B build \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DSKIP_MODULES="$_skip_modules" make -C build } _module() { local module=${subpkgname##calamares-mod-} local path="usr/lib/calamares/modules" mkdir -p "$subpkgdir/$path" mv "$pkgdir/$path/$module" "$subpkgdir/$path/$module" # Module-specific dependencies case "$module" in unpackfs) depends="$depends rsync" ;; esac } check() { cd build CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest } package() { DESTDIR="$pkgdir" make -C build install } sha512sums="ef851e329988d31cb54112462dee7125d6ae4094926e9ed31cc02b25f808bbb8446652ffc03d0c12b8b489eb15d712d7eeef829451583c60c99ef5942286be6d calamares-v3.2.26.1.tar.gz 6b5e9a27bbc504f702e6dc8b464d3581c1de850477ef1e195b39b9128ec11577693d67808dd24886689ee2b7b6bced2c0d6ef43a07af0114e64bb60b2e7bee57 0001-ViewManager-remove-mainLayout-border.patch"