98349c48f9
Rebuild against new calamares version. Usually the upstream-compat CI job should have warned about this, but it didn't. Turns out, that abuild did not trace the dependencies of calamares-extension-mod-mobile because the main package had arch="noarch". Related: https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10022
106 lines
2.6 KiB
Text
106 lines
2.6 KiB
Text
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
|
|
# Do not change arch to noarch, until this bug is resolved:
|
|
# https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10022
|
|
pkgname=calamares-extensions
|
|
pkgver=1.0.0
|
|
pkgrel=1
|
|
arch="all !armhf" # !armhf: qt5-qtdeclarative
|
|
url="https://github.com/calamares/calamares-extensions"
|
|
pkgdesc="Calamares Branding and Module Examples"
|
|
license="GPL-3.0-or-later"
|
|
makedepends="
|
|
calamares-dev
|
|
qt5-qtsvg-dev
|
|
qt5-qtdeclarative-dev
|
|
"
|
|
source="https://github.com/calamares/calamares-extensions/releases/download/v$pkgver/calamares-extensions-$pkgver.tar.gz"
|
|
options="!check" # has no tests
|
|
|
|
# Modules and brandings to build:
|
|
# https://github.com/calamares/calamares-extensions/tree/calamares/modules
|
|
# https://github.com/calamares/calamares-extensions/tree/calamares/branding
|
|
_modules="
|
|
mobile
|
|
"
|
|
_brandings="
|
|
default-mobile
|
|
"
|
|
|
|
for i in $_modules; do
|
|
subpackages="$pkgname-mod-$i:_module $subpackages"
|
|
done
|
|
for i in $_brandings; do
|
|
subpackages="$pkgname-brand-$i:_branding $subpackages"
|
|
done
|
|
|
|
# Check if one module/branding is enabled
|
|
# $1: name of module/branding
|
|
# $2: either $_modules or $_brandings
|
|
is_enabled() {
|
|
local i
|
|
for i in $2; do
|
|
[ "$i" = "$1" ] && return 0
|
|
done
|
|
return 1
|
|
}
|
|
|
|
# Check if string $1 is in CMakeLists.txt and comment it out
|
|
comment_out() {
|
|
sed -i "s~$1~#&~g" "$builddir/CMakeLists.txt"
|
|
}
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
local i
|
|
|
|
msg "disabled modules:"
|
|
cd "$builddir/modules"
|
|
for i in *; do
|
|
if ! [ -d "$i" ] || is_enabled "$i" "$_modules"; then
|
|
continue
|
|
fi
|
|
echo " - $i"
|
|
comment_out "calamares_add_module_subdirectory( modules/$i "
|
|
done
|
|
|
|
msg "disabled brandings:"
|
|
cd "$builddir/branding"
|
|
for i in *; do
|
|
if ! [ -d "$i" ] || is_enabled "$i" "$_brandings"; then
|
|
continue
|
|
fi
|
|
echo " - $i"
|
|
comment_out "calamares_add_branding_subdirectory( branding/$i "
|
|
done
|
|
}
|
|
|
|
build() {
|
|
cmake -B build \
|
|
-DCMAKE_BUILD_TYPE=None \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib
|
|
cmake --build build
|
|
}
|
|
|
|
_module() {
|
|
local module=${subpkgname##calamares-extensions-mod-}
|
|
local path="usr/lib/calamares/modules"
|
|
|
|
mkdir -p "$subpkgdir/$path"
|
|
mv "$pkgdir/$path/$module" "$subpkgdir/$path/$module"
|
|
}
|
|
|
|
_branding() {
|
|
local branding=${subpkgname##calamares-extensions-brand-}
|
|
local path="usr/share/calamares/branding"
|
|
|
|
mkdir -p "$subpkgdir/$path"
|
|
mv "$pkgdir/$path/$branding" "$subpkgdir/$path/$branding"
|
|
}
|
|
|
|
package() {
|
|
DESTDIR="$pkgdir" cmake --install build
|
|
}
|
|
|
|
sha512sums="46801342c14ad8e744378c90bcea8a60bff805096b39958b4856fef3c855b60be4d8507643e101700c52c1605db3ce1c872170a3ea79e59ef123cda0fdfe0a01 calamares-extensions-1.0.0.tar.gz"
|