diff options
-rw-r--r-- | pcr-testing/calamares/PKGBUILD | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/pcr-testing/calamares/PKGBUILD b/pcr-testing/calamares/PKGBUILD index 66964933c..49cfcf706 100644 --- a/pcr-testing/calamares/PKGBUILD +++ b/pcr-testing/calamares/PKGBUILD @@ -3,23 +3,17 @@ pkgname=calamares pkgver=3.2.4 -pkgrel='parabola2' +pkgrel='parabola3' pkgdesc='Distribution-independent installer framework - Parabola edition' arch=('i686' 'x86_64') url=https://calamares.io/ license=('GPL') -_latest_version() { pacman -Si $1 | awk '$1=="Version" { sub (/-.*/, "" , $3) ; print $3 }' | sort -V | tail -n 1 ; } -_runtime_couplings=( "boost-libs=$(_latest_version 'boost' )" \ - "icu=$( _latest_version 'icu' )" \ - "kpmcore=$( _latest_version 'kpmcore' )" \ - "qt5-base=$( _latest_version 'qt5-base')" ) -_build_couplings=( "boost=$( _latest_version 'boost' )" ) -depends=(${_runtime_couplings[@]} 'ckbcomp' 'dmidecode' 'gptfdisk' 'hwinfo' 'kconfig' - 'kcoreaddons' 'ki18n' 'kparts' 'libpwquality' 'os-prober' 'polkit-qt5' 'python' - 'solid' 'qt5ct' 'qt5-svg' 'yaml-cpp') -makedepends=(${_build_couplings[@]} 'extra-cmake-modules' 'git' 'kservice' \ - 'kwindowsystem' 'plasma-framework' 'qt5-tools') +depends=('ckbcomp' 'dmidecode' 'gptfdisk' 'hwinfo' 'kconfig' 'kcoreaddons' 'ki18n' \ + 'kparts' 'libpwquality' 'os-prober' 'polkit-qt5' 'python' 'solid' 'qt5ct' \ + 'qt5-svg' 'yaml-cpp' ) +makedepends=('boost' 'extra-cmake-modules' 'git' 'kservice' 'kwindowsystem' \ + 'plasma-framework' 'qt5-tools' ) _git_tag=v${pkgver}-${pkgrel%%.*} _build_dir=${pkgname}/build @@ -27,10 +21,19 @@ source=(git+https://git.parabola.nu/${pkgname}.git#tag=${_git_tag}) sha256sums=('SKIP') +_version_constraint() # (_dep_pkgname) +{ + _dep_pkgname=$1 + _version=$(pacman -S --print-format='%v' ${_dep_pkgname}) + _version_inc=${_version%.*}.$(( ${_version##*.} + 1 )) + + echo -n " ${_dep_pkgname}>=${_version} ${_dep_pkgname}<${_version_inc} " +} + build() { - mkdir -p ${srcdir}/${_build_dir} - cd ${srcdir}/${_build_dir} + mkdir -p "${srcdir}/${_build_dir}" + cd "${srcdir}/${_build_dir}" cmake -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_INSTALL_PREFIX=/usr \ @@ -44,7 +47,12 @@ build() package() { - cd ${srcdir}/${_build_dir} + depends+=( $(_version_constraint 'boost-libs') \ + $(_version_constraint 'icu' ) \ + $(_version_constraint 'kpmcore' ) \ + $(_version_constraint 'qt5-base' ) ) + + cd "${srcdir}/${_build_dir}" make DESTDIR=${pkgdir} install } |