This repository has been archived by the owner on Nov 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
90 lines (79 loc) · 3.58 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Maintainer: Philip Müller <philm[at]manjaro[dog]org>
pkgname=calamares
epoch=10
pkgver=3.3.8
_pkgver=3.3.8
pkgrel=1
_commit=34a8cf4fa0a299dcd59d5427cac8d0236f0f042f
pkgdesc='Distribution-independent installer framework'
arch=('i686' 'x86_64')
license=('BSD-2-Clause AND CC0-1.0 AND CC-BY-4.0 AND GPL-3.0-or-later AND LGPL-2.0-only AND LGPL-2.1-only AND LGPL-3.0-or-later AND MIT')
url="https://gitlab.manjaro.org/boredland/calamares"
depends=('kconfig' 'kcoreaddons' 'kiconthemes' 'ki18n' 'solid' 'yaml-cpp' 'kpmcore'
'boost-libs' 'ckbcomp' 'hwinfo' 'qt6-svg' 'polkit-qt6'
'squashfs-tools' 'libpwquality' 'python')
makedepends=('extra-cmake-modules' 'qt6-tools' 'qt6-translations' 'git' 'boost')
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.tar.gz::$url/-/archive/v$pkgver/calamares-v$pkgver.tar.gz"
"$pkgname-$pkgver-$pkgrel.tar.gz::$url/-/archive/$_commit/$pkgname-$_commit.tar.gz"
)
sha256sums=('ff25298b23d3e7e60de0790a34151bd2851d88aed1881a3effcbc1839f1acb00')
prepare() {
mv ${srcdir}/calamares-${_commit} ${srcdir}/calamares-${pkgver}
#mv ${srcdir}/calamares-v${pkgver} ${srcdir}/calamares-${pkgver}
cd ${srcdir}/calamares-${pkgver}
# change version
sed -i -e "s|$pkgver|$_pkgver|g" CMakeLists.txt
#_ver="$(cat CMakeLists.txt | grep -m3 -e " VERSION" | grep -o "[[:digit:]]*" | xargs | sed s'/ /./g')"
_ver="$pkgver"
printf 'Version: %s-%s' "${_ver}" "${pkgrel}"
echo ""
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
# change branding
sed -i -e "s/default/manjaro/g" src/branding/CMakeLists.txt
# Apply patches
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
msg2 "Applying patch: $src..."
patch -Np1 < "../$src"
done
}
build() {
cd ${srcdir}/calamares-${pkgver}
mkdir -p build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DWITH_QT6=ON \
-DINSTALL_CONFIG=ON \
-DSKIP_MODULES="initramfs initramfscfg \
dummyprocess dummypython \
dummycpp dummypythonqt \
services-openrc"
make
}
package() {
cd ${srcdir}/calamares-${pkgver}/build
make DESTDIR="$pkgdir" install
install -Dm644 "../data/manjaro-icon.svg" "$pkgdir/usr/share/icons/hicolor/scalable/apps/calamares.svg"
install -Dm644 "../data/calamares.desktop" "$pkgdir/usr/share/applications/calamares.desktop"
install -Dm755 "../data/calamares_polkit" "$pkgdir/usr/bin/calamares_polkit"
install -Dm644 "../data/49-nopasswd-calamares.rules" "$pkgdir/etc/polkit-1/rules.d/49-nopasswd-calamares.rules"
chmod 750 "$pkgdir"/etc/polkit-1/rules.d
# rename services-systemd back to services
mv "$pkgdir/usr/lib/calamares/modules/services-systemd" "$pkgdir/usr/lib/calamares/modules/services"
mv "$pkgdir/usr/share/calamares/modules/services-systemd.conf" "$pkgdir/usr/share/calamares/modules/services.conf"
sed -i -e 's/-systemd//' "$pkgdir/usr/lib/calamares/modules/services/module.desc"
sed -i -e 's/-systemd//' "$pkgdir/usr/share/calamares/settings.conf"
# fix branding install
cp -av "../src/branding/manjaro" "$pkgdir/usr/share/calamares/branding/"
}