Skip to content

Commit

Permalink
Example package spec for cmake (#65)
Browse files Browse the repository at this point in the history
Signed-off-by: Larry Gritz <lg@larrygritz.com>
  • Loading branch information
lgritz authored May 11, 2021
1 parent 20836d9 commit 555fa48
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions packages/cmake/cmake.spk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
pkg: cmake/3.16.4

sources:
# Idiom that retrieves the tar file from github if it isn't already local.
# Sites without direct internet access may instead want to pre-download
# the tar file.
- path: ./
- script:
- export TARFILE=cmake-3.16.4-Linux-x86_64.tar.gz
- if [ ! -e ./$TARFILE ] ; then wget https://github.com/Kitware/CMake/releases/download/v3.16.4/$TARFILE ; fi

build:
options:
- var: arch
- var: os
script:
- mkdir -p build; cd build
- tar -xvf
../cmake-3.16.4-Linux-x86_64.tar.gz
--strip-components=1
--exclude=doc
--exclude=Help
- rsync -rv ./ $PREFIX/
- mkdir -p /spfs/etc/spfs/startup.d
- echo "export CMAKE_SYSTEM_INCLUDE_PATH=/spfs/include" > /spfs/etc/spfs/startup.d/activate_cmake.sh
- echo "export CMAKE_SYSTEM_PREFIX_PATH=/spfs" >> /spfs/etc/spfs/startup.d/activate_cmake.sh
- echo "setenv CMAKE_SYSTEM_INCLUDE_PATH /spfs/include" > /spfs/etc/spfs/startup.d/activate_cmake.csh
- echo "setenv CMAKE_SYSTEM_PREFIX_PATH /spfs" >> /spfs/etc/spfs/startup.d/activate_cmake.csh

0 comments on commit 555fa48

Please sign in to comment.