Files
euri-packages/packages/calamares/PKGBUILD
T

99 lines
3.4 KiB
Bash
Raw Normal View History

# Maintainer: Michał <ash8820@proton.me>
2026-08-21 21:21:54 +02:00
# Contributor: Euri Linux Team
# Upstream: Calamares team
_pkgname="calamares"
pkgname="$_pkgname"
pkgver=3.4.2
pkgrel=13
pkgdesc="Distribution-independent installer framework"
url="https://codeberg.org/Calamares/calamares"
license=("GPL-3.0-or-later")
arch=('x86_64')
depends=(
'kcoreaddons'
'kpmcore'
'libpwquality'
'qt6-declarative'
'qt6-svg'
'yaml-cpp'
)
makedepends=(
'extra-cmake-modules'
'libglvnd'
'ninja'
'qt6-tools'
'qt6-translations'
)
_pkgext="tar.gz"
DLAGENTS=('https::/usr/bin/curl -gqb "" -fLC - --http1.1 --retry 5 --retry-delay 5 -o %o %u')
source=("$_pkgname-$pkgver.$_pkgext"::"$url/releases/download/v$pkgver/$_pkgname-$pkgver.$_pkgext"
'multi-netinstall-add.patch')
sha256sums=('733bbbb00dc9f84874bd5c22960952f317ea2537565431179fa2152b2fbfdccc'
'18a0e1592b0f893256996f6071d539cbd692b920b4d3788e043442f3e707d795')
prepare() {
cd "$srcdir/$_pkgname-$pkgver"
patch -Np1 -i "$srcdir/multi-netinstall-add.patch"
}
build() {
local _skip_modules=(
dummycpp
dummyprocess
dummypython
dummypythonqt
dracut
initramfs
initramfscfg
interactiveterminal
)
local _pkgsrc_dir="$srcdir/$_pkgname-$pkgver"
sed -i "/DesktopEnvironment('\/usr\/bin\/Hyprland', 'hyprland'),/a\ DesktopEnvironment('/usr/bin/start-cosmic', 'cosmic')," \
"$_pkgsrc_dir/src/modules/displaymanager/main.py"
sed -i 's| return self.os_path("etc/greetd/config.toml")| if os.path.exists(self.os_path("usr/bin/cosmic-greeter-start")):\n return self.os_path("etc/greetd/cosmic-greeter.toml")\n return self.os_path("etc/greetd/config.toml")|' \
"$_pkgsrc_dir/src/modules/displaymanager/main.py"
sed -i 's| if os.path.exists(self.os_path("usr/bin/gtkgreet")) and os.path.exists(self.os_path("usr/bin/cage")):| if os.path.exists(self.os_path("usr/bin/cosmic-greeter-start")) and de_command == "/usr/bin/start-cosmic":\n self.config_data["default_session"]["command"] = "cosmic-greeter-start"\n self.config_data["default_session"]["user"] = "cosmic-greeter"\n self.config_data["general"] = dict(service = "cosmic-greeter")\n libcalamares.utils.target_env_call(['\''artix-service'\'', '\''disable'\'', '\''greetd'\''])\n libcalamares.utils.target_env_call(['\''artix-service'\'', '\''enable'\'', '\''cosmic-greeter'\''])\n elif os.path.exists(self.os_path("usr/bin/gtkgreet")) and os.path.exists(self.os_path("usr/bin/cage")):|' \
"$_pkgsrc_dir/src/modules/displaymanager/main.py"
local _cmake_options=(
-B build
-S "$_pkgsrc_dir"
-G Ninja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX='/usr'
-DCMAKE_INSTALL_LIBDIR='lib'
-DWITH_QT6=ON
-DINSTALL_CONFIG=ON
-DSKIP_MODULES="${_skip_modules[*]}"
-DBUILD_TESTING=OFF
-DKDE_INSTALL_BINDIR=/usr/bin
-DKDE_INSTALL_SBINDIR=/usr/sbin
-DKDE_INSTALL_LIBDIR=/usr/lib
-DKDE_INSTALL_LIBEXECDIR=/usr/libexec
-DKDE_INSTALL_INCLUDEDIR=/usr/include
-DKDE_INSTALL_LOCALSTATEDIR=/var
-DKDE_INSTALL_SHAREDSTATEDIR=/usr/share
-DKDE_INSTALL_DATAROOTDIR=/usr/share
-DKDE_INSTALL_DATADIR=/usr/share
-DKDE_INSTALL_LOCALEDIR=/usr/share/locale
-DKDE_INSTALL_MANDIR=/usr/share/man
-DKDE_INSTALL_INFODIR=/usr/share/info
-DKDE_INSTALL_SYSCONFDIR=/etc
-Wno-dev
)
cmake "${_cmake_options[@]}"
cmake --build build
}
package() {
DESTDIR="$pkgdir" cmake --install build
}