desktop/calamares/PKGBUILD
2016-05-31 22:52:37 +02:00

77 lines
3.3 KiB
Bash

pkgname=calamares
pkgver=2.2.91
pkgrel=1
_releaseName="Goedel"
_releaseYear="2016"
pkgdesc='Distribution-independent installer framework'
arch=('x86_64')
url='https://github.com/calamares/calamares'
license=('LGPL')
depends=('qt5-svg' 'kconfig' 'ki18n' 'kcoreaddons' 'solid' 'yaml-cpp'
'parted' 'kpmcore' 'libatasmart' 'udisks2' 'polkit-qt5' 'boost-libs'
'rsync' 'python3' 'keyboardctl' 'qt5-webkit')
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="09f650ecf586fd7dc43b8b131931a6d0e1d04f98"
source+=("$pkgname-$pkgver.tar.gz::https://github.com/calamares/calamares/archive/${_gitsha}.zip"
"calamares-chakra::git://git.chakraos.org/calamares.git#branch=modules")
md5sums=('1bfa6b27963e4ed36b2f95a68061d384'
'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 \
-DWITH_PARTITIONMANAGER=1 \
-DCMAKE_INSTALL_LIBDIR=lib \
-DSKIP_MODULES="webview interactiveterminal"
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/displaymanagers.conf" "$pkgdir/usr/share/calamares/modules/displaymanagers.conf"
#install -Dm644 "../conf/locale.conf" "$pkgdir/usr/share/calamares/modules/locale.conf"
#install -Dm644 "../conf/prepare.conf" "$pkgdir/usr/share/calamares/modules/prepare.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/_bootldr.conf" "$pkgdir/usr/share/calamares/modules/_bootldr.conf"
install -Dm644 "../conf/services.conf" "$pkgdir/usr/share/calamares/modules/services.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"
sed 's|linux312|linux|' -i "${pkgdir}/usr/share/calamares/modules/initcpio.conf"
rm -r "$pkgdir/usr/lib/calamares/modules/dummyprocess/"
rm -r "$pkgdir/usr/lib/calamares/modules/dummypython/"
rm "$pkgdir/usr/share/calamares/modules/dummypython.conf"
}