Skip to content

Commit

Permalink
Add licenses in the tarballs of the future releases
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Dec 22, 2024
1 parent c675ef7 commit 51fd185
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
6 changes: 4 additions & 2 deletions .github/julia/build_tarballs_release.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ sources = [
GitSource(ENV["UNO_URL"], ENV["UNO_COMMIT"]),
ArchiveSource("https://mumps-solver.org/MUMPS_5.7.3.tar.gz",
"84a47f7c4231b9efdf4d4f631a2cae2bdd9adeaabc088261d15af040143ed112"),
ArchiveSource("https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.15.sdk.tar.xz",
"2408d07df7f324d3beea818585a6d990ba99587c218a3969f924dfcc4de93b62"),
]

# Bash recipe for building across all platforms
Expand All @@ -32,6 +30,8 @@ for file in $(ls .); do
done
cd ${prefix}
cp -rL share/licenses deps/licenses
mkdir deps/licenses/MUMPS
cp $WORKSPACE/srcdir/MUMPS_5.7.3/LICENSE deps/licenses/MUMPS/LICENSE
chmod -R u=rwx deps
tar -czvf deps.tar.gz deps
rm -r deps
Expand Down Expand Up @@ -130,6 +130,8 @@ install -v -m 755 "uno_ampl${exeext}" -t "${bindir}"
${CXX} -shared $(flagon -Wl,--whole-archive) libuno.a $(flagon -Wl,--no-whole-archive) -o libuno.${dlext} -L${libdir} -l${OMP} -lopenblas -ldmumps -lmetis -lhsl -lhighs
cp libuno.a ${prefix}/lib/libuno.a
cp libuno.${dlext} ${libdir}/libuno.${dlext}
install_license ${WORKSPACE}/srcdir/Uno/LICENSE
"""

# These are the platforms we will build for by default, unless further
Expand Down
2 changes: 0 additions & 2 deletions .github/julia/build_tarballs_yggdrasil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ version = VersionNumber(ENV["UNO_RELEASE"])
# Collection of sources required to complete build
sources = [
GitSource(ENV["UNO_URL"], ENV["UNO_COMMIT"]),
ArchiveSource("https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.15.sdk.tar.xz",
"2408d07df7f324d3beea818585a6d990ba99587c218a3969f924dfcc4de93b62"),
]

# The remainder of the file is similar to the content found at the following link:
Expand Down
15 changes: 7 additions & 8 deletions .github/julia/generate_binaries.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ for (platform, libdir, ext) in platforms
run(`tar -xzf products/$platform/deps.tar.gz -C products/$platform`)

# Copy the license of each dependency
# CV: temporarily comment this out
#for folder in readdir("products/$platform/deps/licenses")
# cp("products/$platform/deps/licenses/$folder", "products/$platform/share/licenses/$folder")
#end
#rm("products/$platform/deps/licenses", recursive=true)
for folder in readdir("products/$platform/deps/licenses")
cp("products/$platform/deps/licenses/$folder", "products/$platform/share/licenses/$folder")
end
rm("products/$platform/deps/licenses", recursive=true)

# Copy the shared library of each dependency
for file in readdir("products/$platform/deps")
Expand All @@ -53,15 +52,15 @@ for (platform, libdir, ext) in platforms

# Create a folder with the version number of the package
mkdir("$(package)_binaries.$version2")
for folder in ("lib", "bin")
for folder in ("lib", "bin", "share")
cp(folder, "$(package)_binaries.$version2/$folder")
end

cd("$(package)_binaries.$version2")
if ext == "dll"
run(`zip -r --symlinks ../../../$(package)_binaries.$version2.$platform.zip lib bin`)
run(`zip -r --symlinks ../../../$(package)_binaries.$version2.$platform.zip lib bin share`)
else
run(`tar -czf ../../../$(package)_binaries.$version2.$platform.tar.gz lib bin`)
run(`tar -czf ../../../$(package)_binaries.$version2.$platform.tar.gz lib bin share`)
end
cd("../../..")

Expand Down

0 comments on commit 51fd185

Please sign in to comment.