git » cmake.git » main » tree

[main] / PKGBUILD

# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>

pkgname=cmake
pkgver=3.29.1
pkgrel=2
pkgdesc='A cross-platform open-source make system'
arch=('armv7h' 'aarch64')
url="https://www.cmake.org/"
license=('custom')
depends=('curl' 'libarchive' 'libuv')
optdepends=(
  'make: for unix Makefile generator'
  'ninja: for ninja generator'
)
source=("https://www.cmake.org/files/v${pkgver%.*}/${pkgname}-${pkgver}.tar.gz"
        "https://www.cmake.org/files/v${pkgver%.*}/${pkgname}-${pkgver}-SHA-256.txt"{,.asc})
sha512sums=('3665ddb356bf973f75c9f2601f7210f7ff58c77c39926a43af8640979777a796d441df43fda5d2632548f7d15e4553829680c76f3d9376f9e763fe7bba16f3d7'
            '78ac190968e5253a5cdef8acbddebf0f5750bf47aef92932b65fee4c75fd3c66a1fe3a366cd8105a9908b2d3324da4275b2b4f4c9e2c269818a6613b9dd21214'
            'SKIP')
validpgpkeys=(CBA23971357C2E6590D9EFD3EC8FEF3A7BFB4EDA) # Brad King <brad.king@kitware.com>

prepare() {
  # upstream does not provide signed tarballs, only signed checksums
  sha256sum -c --ignore-missing "${pkgname}-${pkgver}-SHA-256.txt"
}

build() {
  cd ${pkgname}-${pkgver}
  # BLFS provides this beauty <3
  sed -i '/"lib64"/s/64//' Modules/GNUInstallDirs.cmake &&
  ./bootstrap --prefix=/usr \
    --system-libs \
    --mandir=/share/man \
    --no-system-jsoncpp \
    --no-system-cppdap \
    --no-system-librhash \
    --docdir=/share/doc/cmake \
    --datadir=/share/cmake \
    --parallel=$(/usr/bin/getconf _NPROCESSORS_ONLN)
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install

  rm -fr "$pkgdir"/usr/share/doc/cmake/html/_sources
  install -Dm644 Copyright.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
sha512sums=('3665ddb356bf973f75c9f2601f7210f7ff58c77c39926a43af8640979777a796d441df43fda5d2632548f7d15e4553829680c76f3d9376f9e763fe7bba16f3d7'
            '78ac190968e5253a5cdef8acbddebf0f5750bf47aef92932b65fee4c75fd3c66a1fe3a366cd8105a9908b2d3324da4275b2b4f4c9e2c269818a6613b9dd21214'
            'SKIP')