Skip to content

Commit

Permalink
Fixes #11 Use separate nuspec files for different architechtures (#12)
Browse files Browse the repository at this point in the history
* Fixes #11 Use separate nuspec files for different architechtures

* change package name
  • Loading branch information
rwmcintosh authored Feb 14, 2025
1 parent 3b9d519 commit 35a1605
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 6 deletions.
24 changes: 24 additions & 0 deletions CVODES_MacOSArm64.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<package >
<metadata>
<description>Sundials CVODES Solver built for the Open Systems Pharmacology Suite.</description>
<id>CVODES.MacOSArm64</id>
<version>$version$</version>
<title>CVODES</title>
<authors>Open-Systems-Pharmacology</authors>
<owners>Open-Systems-Pharmacology</owners>
<projectUrl>https://github.com/Open-Systems-Pharmacology/CVODES</projectUrl>
<licenseUrl>https://computing.llnl.gov/projects/sundials/license</licenseUrl>
<iconUrl>https://raw.githubusercontent.com/Open-Systems-Pharmacology/Suite/master/logo.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<copyright>Copyright (c) 2002-2019, Lawrence Livermore National Security and Southern Methodist University</copyright>
<tags>open-systems-pharmacology native</tags>
</metadata>
<files>
<file src="src/CVODES/include/**/*.h" target="CVODES/include" />
<file src="BuildCVODES_MacOS/Release/ARM64/include/sundials/*.h" target="CVODES/include/sundials" />

<file src="Dist/MacOS/Release/ARM64/*.a" target="CVODES/bin/native/ARM64/Release" />
<file src="Dist/MacOS/Debug/ARM64/*.a" target="CVODES/bin/native/ARM64/Debug" />
</files>
</package>
2 changes: 1 addition & 1 deletion CVODES_MacOS.nuspec → CVODES_MacOSx64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<description>Sundials CVODES Solver built for the Open Systems Pharmacology Suite.</description>
<id>CVODES.MacOS</id>
<id>CVODES.MacOSx64</id>
<version>$version$</version>
<title>CVODES</title>
<authors>Open-Systems-Pharmacology</authors>
Expand Down
15 changes: 11 additions & 4 deletions buildNix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,20 @@ else
Platform=Ubuntu22
fi

if [ "$(uname -m)" == "arm64" ];
then
Arch=ARM64
else
Arch=x64
fi

for BuildType in Debug Release
do
cmake -BBuildCVODES_${Platform}/${BuildType}/x64/ -Hsrc/CVODES/ -DCMAKE_BUILD_TYPE=${BuildType} -DEXAMPLES_ENABLE_C=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DENABLE_KLU=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DKLU_INCLUDE_DIR=BuildSuiteSparse/include/ -DKLU_LIBRARY_DIR=BuildSuiteSparse/lib64/
make -C BuildCVODES_${Platform}/${BuildType}/x64/
cmake -BBuildCVODES_${Platform}/${BuildType}/${Arch}/ -Hsrc/CVODES/ -DCMAKE_BUILD_TYPE=${BuildType} -DEXAMPLES_ENABLE_C=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DENABLE_KLU=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DKLU_INCLUDE_DIR=BuildSuiteSparse/include/ -DKLU_LIBRARY_DIR=BuildSuiteSparse/lib64/
make -C BuildCVODES_${Platform}/${BuildType}/${Arch}/

mkdir -p Dist/${Platform}/${BuildType}/x64
find ./BuildCVODES_${Platform} -name lib*.a -exec cp {} Dist/${Platform}/${BuildType}/x64/ \;
mkdir -p Dist/${Platform}/${BuildType}/${Arch}
find ./BuildCVODES_${Platform} -name lib*.a -exec cp {} Dist/${Platform}/${BuildType}/${Arch}/ \;
done


8 changes: 7 additions & 1 deletion createNugetPackage_Nix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ fi

if [ "$(uname)" == "Darwin" ];
then
nuget pack CVODES_MacOS.nuspec -version $1
if [ "$(uname -m)" == "arm64" ];
then
nuget pack CVODES_MacOSArm64.nuspec -version $1
else
nuget pack CVODES_MacOSx64.nuspec -version $1
fi

else
nuget pack CVODES_Ubuntu22.nuspec -version $1
fi

0 comments on commit 35a1605

Please sign in to comment.