-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
71 lines (59 loc) · 2.84 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
pkgname=calamares
pkgver=3.3.8
pkgrel=1
pkgdesc='Distribution-independent installer framework'
arch=('x86_64')
license=(GPL)
url="https://github.com/calamares/calamares/releases/download"
license=('LGPL')
depends=( 'qt6-svg' 'qt6-webengine' 'yaml-cpp' 'networkmanager' 'upower' 'kcoreaddons' 'kconfig' 'ki18n' 'kservice' \
'kwidgetsaddons' 'kpmcore' 'squashfs-tools' 'rsync' 'boost' 'pybind11' 'cryptsetup' 'doxygen' 'dmidecode' \
'gptfdisk' 'hwinfo' 'kparts' 'polkit-qt6' 'python' 'solid' 'qt6-tools' 'libpwquality' 'ckbcomp' 'qt6-declarative' )
makedepends=('git' 'cmake' 'extra-cmake-modules' 'python-jsonschema' 'python-pyaml' 'python-unidecode' 'gawk')
backup=('usr/share/calamares/modules/bootloader.conf'
'usr/share/calamares/modules/displaymanager.conf'
'usr/share/calamares/modules/initcpio.conf'
'usr/share/calamares/modules/unpackfs.conf')
source=("$pkgname-$pkgver-$pkgrel.tar.gz::$url/v$pkgver/calamares-$pkgver.tar.gz")
sha256sums=('09435b04e7e5cee16177223068d8a7402c3c6b8126af13ff527af77742c43363')
prepare() {
cd ${srcdir}/calamares-${pkgver}
# change version
_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"
# patches here
}
build() {
cd ${srcdir}/calamares-${pkgver}
_cpuCount=$(grep -c -w ^processor /proc/cpuinfo)
export CXXFLAGS+=" -fPIC"
cmake -S . -Bbuild \
-GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DWITH_APPSTREAM=OFF \
-DWITH_PYBIND11=OFF \
-DWITH_QT6=ON \
-DSKIP_MODULES="dracut dracutlukscfg \
dummycpp dummyprocess dummypython dummypythonqt \
license notesqml \
openrcdmcryptcfg fsresizer \
rawfs mkinitfs contextualprocess interactiveterminal \
plymouthcfg plasmalnf services-openrc \
tracking webview"
cmake --build build --parallel $_cpuCount
}
package() {
cd ${srcdir}/calamares-${pkgver}/build
DESTDIR="${pkgdir}" cmake --build . --target install
}