diff --git a/lib/rust.py b/lib/rust.py index 6a566fb..cb63a57 100644 --- a/lib/rust.py +++ b/lib/rust.py @@ -45,7 +45,9 @@ def _autopack_filter_lib(ent) -> bool: def _autopack_filter_bin(ent) -> bool: - return os.access(ent.path, os.X_OK) and ent.is_file(follow_symlinks=False) + is_executable_file = os.access(ent.path, os.X_OK) and ent.is_file(follow_symlinks=False) + is_not_dylib = not (ent.path.endswith(".so") or ent.path.endswith(".dll") or ent.path.endswith(".dylib")) + return is_executable_file and is_not_dylib def _auto_pack(profiles: list[str], pc: pkgcomposer.PkgComposer): diff --git a/packages/mold/pkgbuild.py b/packages/mold/pkgbuild.py new file mode 100644 index 0000000..41d42a7 --- /dev/null +++ b/packages/mold/pkgbuild.py @@ -0,0 +1,22 @@ +from lib import rust +from lib.make import * + + +version("3.0.0") +description("A Modern Linker in Rust") +maintainer("sisungo ") +source_managed("github://rui314/mold#v3.0.0", "rust") + +builddep("shortcut/rust") + + +def build(): + rust.build() + +on_build(build) + + +package("mold") +dep("semi-libc @same-arch") +dep("libunwind @same-arch") +rust.use_auto_pack(["bin"])