Skip to content

Commit

Permalink
Update existing package specs to use new environment section
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Bottriell <ryan@bottriell.ca>
  • Loading branch information
rydrman committed Feb 18, 2022
1 parent a9c7326 commit 5f3f434
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 31 deletions.
7 changes: 4 additions & 3 deletions packages/bootstrap/autoconf.spk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ build:
mkdir -p $(dirname $newfile)
cp $file $newfile
done
mkdir -p /spfs/etc/startup.d/
echo "export ACLOCAL_PATH=/spfs/share/aclocal" > /spfs/etc/spfs/startup.d/activate-autoconf.sh
echo "setenv ACLOCAL_PATH /spfs/share/aclocal" > /spfs/etc/spfs/startup.d/activate-autoconf.csh
install:
environment:
- set: ACLOCAL_PATH
value: /spfs/share/aclocal
requirements:
- pkg: stdfs
12 changes: 7 additions & 5 deletions packages/cmake/cmake.spk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ build:
--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

install:
environment:
- set: CMAKE_SYSTEM_INCLUDE_PATH
value: /spfs/include
- set: CMAKE_SYSTEM_PREFIX_PATH
value: /spfs
6 changes: 3 additions & 3 deletions packages/gnu/autoconf.spk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ build:
--with-local-prefix=/spfs
- make
- make install
- mkdir -p /spfs/etc/spfs/startup.d
- echo "export ACLOCAL_PATH=/spfs/share/aclocal" > /spfs/etc/spfs/startup.d/activate-autoconf.sh
- echo "setenv ACLOCAL_PATH /spfs/share/aclocal" > /spfs/etc/spfs/startup.d/activate-autoconf.csh

install:
environment:
- set: ACLOCAL_PATH
value: /spfs/share/aclocal
requirements:
- pkg: bash
- pkg: perl
Expand Down
2 changes: 0 additions & 2 deletions packages/gnu/gcc/activate-gcc.csh

This file was deleted.

2 changes: 0 additions & 2 deletions packages/gnu/gcc/activate-gcc.sh

This file was deleted.

8 changes: 5 additions & 3 deletions packages/gnu/gcc/gcc48.spk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ build:
- make install
# no need to keep extra bloat files in info dir
- rm -r /spfs/share/info
# include activation scripts
- mkdir -p /spfs/etc/spfs/startup.d
- cp ../activate-gcc.{csh,sh} /spfs/etc/spfs/startup.d/

tests:
- stage: install
Expand All @@ -54,6 +51,11 @@ tests:
- rm test.c test.o

install:
environment:
- set: CC
value: /spfs/bin/gcc
- set: CXX
value: /spfs/bin/g++
requirements:
- pkg: stdfs
- pkg: mpfr
Expand Down
8 changes: 5 additions & 3 deletions packages/gnu/gcc/gcc63.spk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ build:
- make install
# no need to keep extra bloat files in info dir
- rm -r /spfs/share/info
# include activation scripts
- mkdir -p /spfs/etc/spfs/startup.d
- cp ../activate-gcc.{csh,sh} /spfs/etc/spfs/startup.d/

tests:
- stage: install
Expand All @@ -53,6 +50,11 @@ tests:
- rm test.c test.o

install:
environment:
- set: CC
value: /spfs/bin/gcc
- set: CXX
value: /spfs/bin/g++
requirements:
- pkg: stdfs
- pkg: mpfr
Expand Down
8 changes: 5 additions & 3 deletions packages/gnu/gcc/gcc93.spk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ build:
- make install
# no need to keep extra bloat files in info dir
- rm -r /spfs/share/info
# include activation scripts
- mkdir -p /spfs/etc/spfs/startup.d
- cp ../activate-gcc.{csh,sh} /spfs/etc/spfs/startup.d/

tests:
- stage: install
Expand All @@ -54,6 +51,11 @@ tests:
- rm test.c test.o

install:
environment:
- set: CC
value: /spfs/bin/gcc
- set: CXX
value: /spfs/bin/g++
requirements:
- pkg: stdfs
- pkg: mpfr
Expand Down
1 change: 0 additions & 1 deletion packages/gnu/m4.spk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ build:
- ./configure --prefix=/spfs
- make
- make install
- mkdir -p /spfs/etc/startup.d/
- rm -r /spfs/share/info

install:
Expand Down
6 changes: 3 additions & 3 deletions packages/python/python2.spk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ build:
- ln -sf python2 /spfs/bin/python
# do not package pyc files, spfs is best when pyc files are not generated at all
- find /spfs -type f -name "*.pyc" | xargs rm
- mkdir -p /spfs/etc/spfs/startup.d
- echo "export PYTHONDONTWRITEBYTECODE=1" > /spfs/etc/spfs/startup.d/activate-python.sh
- echo "setenv PYTHONDONTWRITEBYTECODE 1" > /spfs/etc/spfs/startup.d/activate-python.csh

tests:
- stage: install
Expand All @@ -91,6 +88,9 @@ tests:
- test -z "$(/spfs/bin/python -c 'import bz2' 2>&1)"

install:
environment:
- set: PYTHONDONTWRITEBYTECODE
value: 1
requirements:
- pkg: gcc
fromBuildEnv: x.x
Expand Down
6 changes: 3 additions & 3 deletions packages/python/python3.spk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ build:
- ln -sf python3 /spfs/bin/python
# python is best in spfs when pyc files are not used at all
- find /spfs -type f -name "*.pyc" | xargs rm
- mkdir -p /spfs/etc/spfs/startup.d
- echo "export PYTHONDONTWRITEBYTECODE=1" > /spfs/etc/spfs/startup.d/activate-python.sh
- echo "setenv PYTHONDONTWRITEBYTECODE 1" > /spfs/etc/spfs/startup.d/activate-python.csh

tests:
- stage: install
Expand All @@ -71,6 +68,9 @@ tests:
- test -z "$(/spfs/bin/python -c 'import bz2' 2>&1)"

install:
environment:
- set: PYTHONDONTWRITEBYTECODE
value: 1
requirements:
- pkg: gcc
fromBuildEnv: x.x
Expand Down
3 changes: 3 additions & 0 deletions packages/stdfs/stdfs.spk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ build:
- mkdir /spfs/{bin,lib,etc}
- mkdir -p /spfs/etc/spfs/startup.d
- ln -s lib /spfs/lib64
# We are explicitly not using the builtin env support because
# this package is expected to initialize the core environment
# as early as possible
# Intitialization for bash environments
- cat << EOF > /spfs/etc/spfs/startup.d/00_stdfs.sh
- export LD_LIBRARY_PATH="/spfs/lib:\${LD_LIBRARY_PATH}"
Expand Down

0 comments on commit 5f3f434

Please sign in to comment.