desktop/calamares/PKGBUILD
2018-09-20 20:00:28 +02:00

76 lines
3.5 KiB
Bash

pkgname=calamares
pkgver=3.2.1
pkgrel=4
_releaseName="Hawking"
_releaseYear="2018"
pkgdesc='Distribution-independent installer framework'
arch=('x86_64')
url='https://github.com/calamares/calamares'
license=('LGPL')
depends=('boost' 'qt5-svg' 'kconfig' 'ki18n' 'kcoreaddons' 'solid' 'yaml-cpp'
'parted' 'kpmcore>=3.0' 'libatasmart' 'udisks2' 'polkit-qt5' 'boost-libs'
'rsync' 'python3' 'keyboardctl' 'qt5-webkit' 'kparts' 'mkinitcpio-openswap'
'plasma-framework')
makedepends=('extra-cmake-modules' 'git' 'qt5-tools' 'translate-toolkit' 'qt5-tools')
source+=("$pkgname-$pkgver.tar.gz::https://github.com/calamares/calamares/releases/download/v$pkgver/calamares-$pkgver.tar.gz"
#_gitsha="6cb4291b4d142462f8cc0e61fc4f10880cd25546"
#source+=("$pkgname-$pkgver.tar.gz::https://github.com/calamares/calamares/archive/${_gitsha}.zip"
"calamares-chakra::git+https://code.chakralinux.org/tools/calamares-chakra.git")
md5sums=('eda496fc53f5cf1470806e8011fa5474'
'SKIP')
prepare() {
cp -a ${srcdir}/calamares-chakra/* ${srcdir}/calamares-${pkgver}
#cp -a ${srcdir}/calamares-chakra/* ${srcdir}/calamares-${_gitsha}
rm -rf ${srcdir}/calamares-chakra
cd ${srcdir}/calamares-${pkgver}
#cd ${srcdir}/calamares-${_gitsha}
# apply the current version Name and Year
sed -i -e "s/UnknownName/${_releaseName}/" "src/branding/chakra/branding.desc"
sed -i -e "s/UnknownYear/${_releaseYear}/" "src/branding/chakra/branding.desc"
}
build() {
cd ${srcdir}/calamares-${pkgver}
#cd ${srcdir}/calamares-${_gitsha}
mkdir -p build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DWITH_CRASHREPORTER=ON \
-DSKIP_MODULES="webview interactiveterminal netinstall plasmalnf plymouthcfg _marble_locale"
make
}
package() {
cd ${srcdir}/calamares-${pkgver}/build
#cd ${srcdir}/calamares-${_gitsha}/build
make DESTDIR="${pkgdir}" install
install -Dm644 "../conf/settings.conf" "$pkgdir/usr/share/calamares/settings.conf"
install -Dm644 "../conf/welcome.conf" "$pkgdir/usr/share/calamares/welcome.conf"
install -Dm644 "../conf/displaymanagers.conf" "$pkgdir/usr/share/calamares/modules/displaymanagers.conf"
install -Dm644 "../conf/locale.conf" "$pkgdir/usr/share/calamares/modules/locale.conf"
install -Dm644 "../conf/users.conf" "$pkgdir/usr/share/calamares/modules/users.conf"
install -Dm644 "../conf/unpackfs.conf" "$pkgdir/usr/share/calamares/modules/unpackfs.conf"
install -Dm644 "../conf/packages.conf" "$pkgdir/usr/share/calamares/modules/packages.conf"
install -Dm644 "../conf/grubcfg.conf" "$pkgdir/usr/share/calamares/modules/grubcfg.conf"
#install -Dm644 "../conf/partition.conf" "$pkgdir/usr/share/calamares/modules/partition.conf"
install -Dm644 "../conf/services-systemd.conf" "$pkgdir/usr/share/calamares/modules/services-systemd.conf"
install -Dm644 "../conf/umount.conf" "$pkgdir/usr/share/calamares/modules/umount.conf"
install -Dm644 "../conf/initcpio.conf" "$pkgdir/usr/share/calamares/modules/initcpio.conf"
install -Dm755 "../data/launch-calamares.sh" "${pkgdir}/usr/bin/launch-calamares.sh"
install -Dm644 "../data/calamares.desktop" "$pkgdir/usr/share/applications/calamares.desktop"
install -Dm644 "../data/installer.svg" "${pkgdir}/usr/share/pixmaps/installer.svg"
rm -r "$pkgdir/usr/lib/calamares/modules/dummyprocess/"
rm -r "$pkgdir/usr/lib/calamares/modules/dummypython/"
rm "$pkgdir/usr/share/calamares/modules/dummypython.conf"
}