diff --git a/.github/scripts/common.py b/.github/scripts/common.py index b7c09d7a..cbd363b2 100644 --- a/.github/scripts/common.py +++ b/.github/scripts/common.py @@ -69,6 +69,12 @@ def major_version(version: str) -> str: return version.split(".")[0] +if OS_NAME == "manylinux": + lib_prefix = "lib64/" +else: + lib_prefix = "lib/*/" + + # We have build everything. Now create archives for public deployement. EXPORT_FILES = { "kiwix-tools": ( @@ -97,18 +103,23 @@ def major_version(version: str) -> str: "libzim": ( INSTALL_DIR, ( + ## Linux (ubuntu based) # 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( + lib_prefix + "libzim.a" if COMPILE_CONFIG != "wasm" else lib_prefix + "*.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"]) ), @@ -117,6 +128,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"])