desktop/calamares/PKGBUILD
2016-03-16 20:46:52 +00:00

100 lines
4.0 KiB
Bash

pkgname=calamares
pkgver=1.1.4.2
pkgrel=10
_releaseName="Ian"
_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' 'libatasmart' 'udisks2' 'polkit-qt5' 'boost-libs'
'rsync' 'python3' 'keyboardctl' 'qt5-webkit')
makedepends=('extra-cmake-modules' 'git' 'qt5-tools')
_gitsha='879980ccc'
#source=("git://github.com/calamares/calamares#commit=${_gitsha}"
source=("git://github.com/rshipp/calamares#commit=${_gitsha}"
http://rsync.chakraos.org/sources/chakra-artwork/calamares/chakra-branding_2016.02-2.tar.gz
'displaymanagers.conf'
'locale.conf'
'prepare.conf'
'settings.conf'
'packages.conf'
'unpackfs.conf'
'grubcfg.conf'
'partition.conf'
#'license.conf'
'services.conf'
'_bootldr.conf'
'launch-calamares.sh'
'installer.svg'
'calamares.desktop')
md5sums=('SKIP'
'7b2ab35ec41bf83e6bdfcccc57144a88'
'e5e2601834654e631809cda8d2402e8c'
'c05b2dda2e0a8a57cf25cc89913a1f4f'
'76cf16c8e4347d369330ed64ff28083b'
'f8355eca07b776db5da0ae1280dbd484'
'898bd9bb49dd7430b67e015fca32bd8d'
'f8e10a9fa0324f68650a646769339da9'
'799aa88237b4680bcc4ef4b919c05cce'
'e2bc605a72109ce842bb6666ec5497fb'
'99f1b33782241b1f4b187ffd58e5d6fb'
'72f00d0ce1ddbfb687b688281639b611'
'd1e19fbb01e59e1296adb8017fbacbf4'
'f005a6e10b8e0425e04207920b6231b7'
'31a21df45f1f6a9fb0aaf0d5418895f2')
prepare () {
cd ${srcdir}/${pkgname}
git submodule init
git submodule update
#sed -i 's|Ext4|Xfs|' ${srcdir}/${pkgname}/src/modules/partition/tests/PartitionJobTests.cpp
#sed -i 's|Ext4|Xfs|' ${srcdir}/${pkgname}/src/modules/partition/gui/EraseDiskPage.cpp
#sed -i 's|Ext4|Xfs|' ${srcdir}/${pkgname}/src/modules/partition/gui/ReplacePage.cpp
# copy our branding files to the correct location
cp -avr ${srcdir}/chakra src/branding/chakra
# 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() {
mkdir -p build
cd build
cmake ../${pkgname} \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_PARTITIONMANAGER=1 \
-DCMAKE_INSTALL_LIBDIR=lib
make
}
package() {
cd build
make DESTDIR="${pkgdir}" install
rm -rf "${pkgdir}/usr/share/calamares/settings.conf"
install -D -m644 "${srcdir}/settings.conf" "${pkgdir}/usr/share/calamares/settings.conf"
install -D -m644 "${srcdir}/displaymanagers.conf" "${pkgdir}/etc/calamares/modules/displaymanagers.conf"
install -D -m644 "${srcdir}/locale.conf" "${pkgdir}/etc/calamares/modules/locale.conf"
install -D -m644 "${srcdir}/prepare.conf" "${pkgdir}/etc/calamares/modules/prepare.conf"
install -D -m644 "${srcdir}/unpackfs.conf" "${pkgdir}/etc/calamares/modules/unpackfs.conf"
install -D -m644 "${srcdir}/packages.conf" "${pkgdir}/etc/calamares/modules/packages.conf"
install -D -m644 "${srcdir}/grubcfg.conf" "${pkgdir}/etc/calamares/modules/grubcfg.conf"
install -D -m644 "${srcdir}/partition.conf" "${pkgdir}/etc/calamares/modules/partition.conf"
#install -D -m644 "${srcdir}/license.conf" "${pkgdir}/etc/calamares/modules/license.conf"
install -D -m644 "${srcdir}/_bootldr.conf" "${pkgdir}/etc/calamares/modules/_bootldr.conf"
install -D -m644 "${srcdir}/services.conf" "${pkgdir}/etc/calamares/modules/services.conf"
sed 's|linux312|linux|' -i "${pkgdir}/usr/share/calamares/modules/initcpio.conf"
install -Dm755 "${srcdir}/launch-calamares.sh" "${pkgdir}/usr/bin/launch-calamares.sh"
install -Dm644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
install -Dm644 "${srcdir}/installer.svg" "${pkgdir}/usr/share/pixmaps/installer.svg"
}