-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
81 lines (69 loc) · 3.3 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
#https://github.com/calamares/calamares/releases
pkgname=calamares
_pkgname=calamares
pkgver=3.2.60
pkgrel=1
pkgdesc='Distribution-independent installer framework'
arch=('i686' 'x86_64')
license=(GPL)
url="https://github.com/calamares/calamares/releases"
license=('LGPL')
depends=('kconfig' 'kcoreaddons' 'kiconthemes' 'ki18n' 'kio' 'solid' 'yaml-cpp' 'kpmcore>=4.2.0' 'mkinitcpio-openswap'
'boost-libs' 'ckbcomp' 'hwinfo' 'qt5-svg' 'polkit-qt5' 'gtk-update-icon-cache' 'plasma-framework'
'qt5-xmlpatterns' 'squashfs-tools' 'libpwquality' 'efibootmgr' 'icu')
conflicts=()
makedepends=('extra-cmake-modules' 'qt5-tools' 'qt5-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::$url/download/v$pkgver/$_pkgname-$pkgver.tar.gz"
"49-nopasswd-calamares.rules")
sha256sums=('9ec6c49f4e2316cd3058d402c2ab65efff02e3f09a0028d50f0359e5154e6c8c'
'56d85ff6bf860b9559b8c9f997ad9b1002f3fccc782073760eca505e3bddd176')
pkgver() {
cd ${srcdir}/$_pkgname-$pkgver
_ver="$(cat CMakeLists.txt | grep -m3 -e " VERSION" | grep -o "[[:digit:]]*" | xargs | sed s'/ /./g')"
# _git=".r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
printf '%s%s' "${_ver}" #"${_git}"
}
prepare() {
sed -i -e 's/"Install configuration files" OFF/"Install configuration files" ON/' "$srcdir/${_pkgname}-${pkgver}/CMakeLists.txt"
sed -i -e 's/# DEBUG_FILESYSTEMS/DEBUG_FILESYSTEMS/' "$srcdir/${_pkgname}-${pkgver}/CMakeLists.txt"
sed -i -e "s/desired_size = 512 \* 1024 \* 1024 \# 512MiB/desired_size = 512 \* 1024 \* 1024 \* 4 \# 2048MiB/" "$srcdir/${_pkgname}-${pkgver}/src/modules/fstab/main.py"
# 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 Archcraft#g' "$srcdir/${_pkgname}-${pkgver}/calamares.desktop"
sed -i -e 's#GenericName=.*#GenericName=System Installer#g' "$srcdir/${_pkgname}-${pkgver}/calamares.desktop"
sed -i -e 's#Icon=.*#Icon=archcraft-green#g' "$srcdir/${_pkgname}-${pkgver}/calamares.desktop"
sed -i -e 's#Comment=.*#Comment=Archcraft System Installer#g' "$srcdir/${_pkgname}-${pkgver}/calamares.desktop"
# add pkgrelease to patch-version
cd ${_pkgname}-${pkgver}
_patchver="$(cat CMakeLists.txt | grep -m3 -e CALAMARES_VERSION_PATCH | grep -o "[[:digit:]]*" | xargs)"
sed -i -e "s|CALAMARES_VERSION_PATCH $_patchver|CALAMARES_VERSION_PATCH $_patchver-$pkgrel|g" CMakeLists.txt
}
build() {
cd $_pkgname-$pkgver
mkdir -p build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DWITH_PYTHONQT=OFF \
-DWITH_KF5DBus=OFF \
-DBoost_NO_BOOST_CMAKE=ON \
-DWEBVIEW_FORCE_WEBKIT=OFF \
-DSKIP_MODULES="webview tracking interactiveterminal initramfs \
initramfscfg dracut dracutlukscfg \
dummyprocess dummypython dummycpp \
dummypythonqt services-openrc \
keyboardq localeq welcomeq"
make
}
package() {
cd ${_pkgname}-${pkgver}/build
make DESTDIR="$pkgdir" install
install -Dm644 "${srcdir}/49-nopasswd-calamares.rules" "$pkgdir/etc/polkit-1/rules.d/49-nopasswd-calamares.rules"
chmod 750 "$pkgdir"/etc/polkit-1/rules.d
}