65 lines
2.6 KiB
Bash
65 lines
2.6 KiB
Bash
# Maintainer : Parch Linux <noreply at parchlinux.com>
|
|
# Calamares installer (fork) configured for Parch Linux
|
|
|
|
pkgname=calamares
|
|
_reponame=calamares
|
|
release_name=$pkgname
|
|
pkgver=3.3.9
|
|
pkgrel=1
|
|
pkgdesc="Calamares installer for Parch Linux git version"
|
|
arch=('any')
|
|
url="https://github.com/parchlinux/calamares"
|
|
license=('GPL3')
|
|
makedepends=('git' 'cmake' 'extra-cmake-modules' 'python-jsonschema' 'python-pyaml' 'python-unidecode' 'gawk')
|
|
conflicts=('calamares')
|
|
depends=( 'qt6-svg' 'qt6-webengine' 'yaml-cpp' 'networkmanager' 'upower' 'kcoreaddons' 'kconfig' 'ki18n' 'kservice' \
|
|
'kwidgetsaddons' 'kpmcore' 'squashfs-tools' 'rsync' 'pybind11' 'cryptsetup' 'doxygen' 'dmidecode' \
|
|
'gptfdisk' 'hwinfo' 'kparts' 'polkit-qt6' 'python' 'solid' 'qt6-tools' 'libpwquality' 'ckbcomp' 'qt6-declarative' )
|
|
provides=("calamares")
|
|
options=(!strip !emptydirs)
|
|
source=("git+https://github.com/parchlinux/$_reponame.git#branch=calamares")
|
|
|
|
sha256sums=('SKIP')
|
|
|
|
pkgver() {
|
|
cd "${_reponame}"
|
|
printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
|
}
|
|
|
|
prepare() {
|
|
cd ${srcdir}/calamares
|
|
_ver="$(cat CMakeLists.txt | grep -m3 -e " VERSION" | grep -o "[[:digit:]]*" | xargs | sed s'/ /./g')"
|
|
_ver="$pkgver"
|
|
printf 'Version: %s-%s\n' "${_ver}" "${pkgrel}"
|
|
sed -i -e "s|\${CALAMARES_VERSION_MAJOR}.\${CALAMARES_VERSION_MINOR}.\${CALAMARES_VERSION_PATCH}|${_ver}-${pkgrel}|g" CMakeLists.txt
|
|
sed -i -e "s|CALAMARES_VERSION_RC 1|CALAMARES_VERSION_RC 0|g" CMakeLists.txt
|
|
|
|
# modify desktop file
|
|
sed -i -e 's#Exec=sh.*#Exec=sh -c "/etc/calamares/launch.sh"#g' "$srcdir/${pkgname}-${pkgver}/calamares.desktop"
|
|
sed -i -e 's#Name=.*#Name=Install Parch Linux#g' "$srcdir/${pkgname}-${pkgver}/calamares.desktop"
|
|
sed -i -e 's#GenericName=.*#GenericName=Parch Linux Installer#g' "$srcdir/${pkgname}-${pkgver}/calamares.desktop"
|
|
sed -i -e 's#Icon=.*#Icon=parchinstall#g' "$srcdir/${pkgname}-${pkgver}/calamares.desktop"
|
|
sed -i -e 's#Comment=.*#Comment=Parch Linux Installer#g' "$srcdir/${pkgname}-${pkgver}/calamares.desktop"
|
|
|
|
}
|
|
|
|
build() {
|
|
cmake -B build -S "${srcdir}/calamares" \
|
|
-DWITH_QT6=ON \
|
|
-DCMAKE_BUILD_TYPE=Debug \
|
|
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DINSTALL_CONFIG=OFF \
|
|
-DSKIP_MODULES="dracut \
|
|
dummycpp dummyprocess dummypython dummypythonqt \
|
|
finishedq keyboardq license localeq notesqml oemid \
|
|
openrcdmcryptcfg plymouthcfg plasmalnf services-openrc \
|
|
summaryq tracking usersq webview welcomeq"
|
|
export DESTDIR="$srcdir/build"
|
|
make -C build
|
|
}
|
|
|
|
package() {
|
|
make -C build DESTDIR="${pkgdir}" install
|
|
install -dm 755 "${pkgdir}/etc"
|
|
}
|