redox/recipes/tools/cosmic-files/recipe.toml
Anhad Singh 038625476b
fix(cosmic-files): set shared-deps instead of package deps
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2025-02-01 00:33:33 +11:00

48 lines
1.4 KiB
TOML

[source]
git = "https://github.com/pop-os/cosmic-files.git"
branch = "master"
[build]
template = "custom"
dependencies = [
"gettext",
"libiconv",
]
script = """
DYNAMIC_INIT
if [[ -n "$COOKBOOK_PREFER_STATIC" ]]; then
export GETTEXT_STATIC=1
fi
export GETTEXT_DIR="${COOKBOOK_SYSROOT}"
# Hack to link libiconv, which gettext-sys does not link
"${COOKBOOK_CARGO}" rustc \
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
--release \
--bin cosmic-files \
--no-default-features \
--features desktop \
-- \
-L "${COOKBOOK_SYSROOT}/lib" \
-C link-arg="-liconv"
mkdir -pv "${COOKBOOK_STAGE}/usr/bin/"
cp -v "target/${TARGET}/release/cosmic-files" "${COOKBOOK_STAGE}/usr/bin/"
mkdir -pv "${COOKBOOK_STAGE}/ui/apps/"
cp -v "${COOKBOOK_RECIPE}/manifest" "${COOKBOOK_STAGE}/ui/apps/20_cosmic-files"
#TODO: install with just?
APPID="com.system76.CosmicFiles"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/applications/"
cp -v "${COOKBOOK_SOURCE}/res/${APPID}.desktop" "${COOKBOOK_STAGE}/usr/share/applications/"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/metainfo/"
cp -v "${COOKBOOK_SOURCE}/res/${APPID}.metainfo.xml" "${COOKBOOK_STAGE}/usr/share/metainfo/"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons/"
cp -rv "${COOKBOOK_SOURCE}/res/icons/hicolor/" "${COOKBOOK_STAGE}/usr/share/icons/"
"""
[package]
shared-deps = [
"libgcc",
"gettext",
"libiconv"
]