mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-11 10:24:37 +08:00
53 lines
1.6 KiB
Bash
53 lines
1.6 KiB
Bash
pkgname=cmake
|
|
pkgver=3.11.4
|
|
pkgrel=1
|
|
pkgdesc='A cross-platform open-source make system'
|
|
arch=('x86_64')
|
|
url="http://www.cmake.org/"
|
|
license=('custom')
|
|
depends=('curl' 'libarchive' 'shared-mime-info' 'jsoncpp' 'libuv' 'rhash')
|
|
makedepends=('qt5-base' 'python3-sphinx' 'emacs')
|
|
optdepends=('qt5-base: cmake-gui'
|
|
'libxkbcommon-x11: cmake-gui')
|
|
source=("https://www.cmake.org/files/v${pkgver%.*}/${pkgname}-${pkgver}.tar.gz")
|
|
sha512sums=('c5d03ad66a004292038e49e391c390ebc328fbb089ea699742a9b75f0ada9398c3dc971b868f75d8438bf437ecbeaa62541beb53cae14a699bf244ad101a2290')
|
|
|
|
prepare() {
|
|
cd ${pkgname}-${pkgver}
|
|
}
|
|
|
|
build() {
|
|
cd ${pkgname}-${pkgver}
|
|
|
|
./bootstrap --prefix=/usr \
|
|
--mandir=/share/man \
|
|
--docdir=/share/doc/cmake \
|
|
--sphinx-man \
|
|
--system-libs \
|
|
--qt-gui \
|
|
--qt-qmake=/usr/lib/qt5/bin/qmake \
|
|
--parallel=$(/usr/bin/getconf _NPROCESSORS_ONLN)
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd ${pkgname}-${pkgver}
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
vimpath="${pkgdir}/usr/share/vim/vimfiles"
|
|
install -d "${vimpath}"/{help,indent,syntax}
|
|
ln -s /usr/share/cmake-${pkgver%.*}/editors/vim/indent/cmake.vim \
|
|
"${vimpath}"/indent/
|
|
ln -s /usr/share/cmake-${pkgver%.*}/editors/vim/syntax/cmake.vim \
|
|
"${vimpath}"/syntax/
|
|
|
|
install -d "${pkgdir}"/usr/share/emacs/site-lisp/
|
|
emacs -batch -f batch-byte-compile \
|
|
"${pkgdir}"/usr/share/cmake-${pkgver%.*}/editors/emacs/cmake-mode.el
|
|
ln -s /usr/share/cmake-${pkgver%.*}/editors/emacs/cmake-mode.el \
|
|
"${pkgdir}"/usr/share/emacs/site-lisp/
|
|
|
|
install -Dm644 Copyright.txt \
|
|
"${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
|
|
}
|