Skip to content

Commit

Permalink
Merge pull request #747 from kiwix/manylinux_archive
Browse files Browse the repository at this point in the history
  • Loading branch information
mgautierfr authored Sep 2, 2024
2 parents 3905de7 + dc2a837 commit 7e9cb8c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
26 changes: 21 additions & 5 deletions .github/scripts/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ def major_version(version: str) -> str:
return version.split(".")[0]


# Depending of base distribution, libraries are in "lib64" (redhat base) or "lib/<arch>" (debian base).
# On top of that, when cross-compiling, libraries are always put in `lib/<arch>`.
# As we use this as glob regex to select which files to add to archive, this is not a problem to have both.
def lib_prefix(file):
yield "lib64/" + file
yield "lib/*/" + file


# We have build everything. Now create archives for public deployement.
EXPORT_FILES = {
"kiwix-tools": (
Expand Down Expand Up @@ -97,18 +105,25 @@ def major_version(version: str) -> str:
"libzim": (
INSTALL_DIR,
(
## Linux
# We need to package all dependencies (`*.a`) on wasm
"lib/*/libzim.a" if COMPILE_CONFIG != "wasm" else "lib/*.a",
"lib/*/libzim.so",
"lib/*/libzim.so.{version}".format(version=main_project_versions["libzim"]),
"lib/*/libzim.so.{version}".format(
version=major_version(main_project_versions["libzim"])
*lib_prefix("libzim.a" if COMPILE_CONFIG != "wasm" else "*.a"),
*lib_prefix("libzim.so"),
*lib_prefix(
"libzim.so.{version}".format(version=main_project_versions["libzim"])
),
*lib_prefix(
"libzim.so.{version}".format(
version=major_version(main_project_versions["libzim"])
)
),
## MacOS
"lib/libzim.{}.dylib".format(
major_version(main_project_versions["libzim"])
),
"lib/libzim.dylib",
"lib/*/libzim.pc",
## Windows
"bin/zim-{version}.dll".format(
version=major_version(main_project_versions["libzim"])
),
Expand All @@ -117,6 +132,7 @@ def major_version(version: str) -> str:
version=major_version(main_project_versions["libzim"])
),
"lib/zim.lib",
## Includes and others
"include/zim/**/*.h",
"share/icu/{}/icudt{}l.dat".format(
base_deps_versions["icu4c"], major_version(base_deps_versions["icu4c"])
Expand Down
2 changes: 1 addition & 1 deletion kiwixbuild/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

main_project_versions = {
"libzim": "9.2.3",
"libkiwix": "13.1.0",
"libkiwix": "14.0.0",
"kiwix-tools": "3.7.0",
"zim-tools": "3.4.2",
"kiwix-desktop": "2.3.1",
Expand Down

0 comments on commit 7e9cb8c

Please sign in to comment.