summaryrefslogtreecommitdiff
path: root/pcr-testing/calamares/PKGBUILD
blob: 0756a5c555ecdb01393bf69f2b826f6aa914d2f2 (plain)
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
# Maintainer: bill-auger <bill-auger@programmer.net>


pkgname=calamares
pkgver=3.2.16
pkgrel='parabola1'
pkgdesc='Distribution-independent installer framework - Parabola edition'
arch=('i686' 'x86_64')
url=https://calamares.io/
license=('GPL')

depends=('boost-libs' 'ckbcomp' 'dmidecode' 'gptfdisk' 'hwinfo' 'icu' 'kconfig'        \
         'kcoreaddons' 'ki18n' 'kparts' 'kpmcore' 'libpwquality' 'polkit-qt5' 'python' \
         'solid' 'qt5-base' 'qt5ct' 'qt5-svg' 'yaml-cpp'                               )
makedepends=('boost' 'extra-cmake-modules' 'git' 'kservice' 'kwindowsystem' 'qt5-tools')
depends+=('os-prober') # FIXME: qemu+calamares+os-prober was buggy last build - try again
# conflicts=('os-prober') # FIXME: qemu+calamares+os-prober is buggy again

_git_tag=v${pkgver}-${pkgrel%%.*}
_build_dir=${pkgname}/build
source=(git+https://git.parabola.nu/${pkgname}.git#tag=${_git_tag})
sha256sums=('SKIP')


_version_constraint() # (dep_pkgname)
{
  local dep_pkgname=$1
  local version=$(pacman -S --print-format='%v' ${dep_pkgname} | tail -n 1)
  version=${version%-*}
  local version_inc=${version%.*}.$(( ${version##*.} + 1 ))

  echo -n "${dep_pkgname}>=${version}" "${dep_pkgname}<${version_inc}"
}

prepare()
{
  sed -i "s|_BUILD_DATE_|$(date +%Y.%m)|" ${srcdir}/${pkgname}/src/branding/parabola/branding.desc
}

build()
{
  mkdir -p "${srcdir}/${_build_dir}"
  cd       "${srcdir}/${_build_dir}"

  # FIXME: "-DBoost_NO_BOOST_CMAKE=ON" is a temporary fix for boost >= 1.70
  #        https://github.com/calamares/calamares/issues/1242
  cmake -DCMAKE_BUILD_TYPE=Release                                                     \
        -DCMAKE_INSTALL_PREFIX=/usr                                                    \
        -DCMAKE_INSTALL_LIBDIR=lib                                                     \
        -DBoost_NO_BOOST_CMAKE=ON                                                      \
        -DSKIP_MODULES="contextualprocess dracut dracutlukscfg dummycpp dummyprocess   \
                        dummypython dummypythonqt fsresizer initramfs initramfscfg     \
                        interactiveterminal license netinstall networkcfg oemid        \
                        openrcdmcryptcfg packagechooser packages plasmalnf plymouthcfg \
                        preservefiles rawfs removeuser shellprocess tracking unpackfs  \
                        webview"                                                       ..
  make
}

package()
{
  depends+=( $(_version_constraint 'boost-libs') \
             $(_version_constraint 'icu'       ) \
             $(_version_constraint 'kpmcore'   ) \
             $(_version_constraint 'qt5-base'  ) )

  cd "${srcdir}/${_build_dir}"

  make DESTDIR=${pkgdir} install
}