shared-mime-info: only include database, not binaries

This commit is contained in:
Jeremy Soller 2024-05-01 15:18:32 -06:00
parent 60bfcd7c37
commit 9aaba0707b
No known key found for this signature in database
GPG Key ID: D02FD439211AF56F
2 changed files with 15 additions and 32 deletions

View File

@ -1,32 +0,0 @@
VERSION="1.10"
TAR="https://freedesktop.org/~hadess/shared-mime-info-${VERSION}.tar.xz"
BUILD_DEPENDS=(gettext glib libffi libiconv libxml2 pcre xz zlib)
function recipe_version {
echo "$VERSION"
skip=1
}
function recipe_build {
sysroot="$(realpath ../sysroot)"
export CFLAGS="-I$sysroot/include"
export LDFLAGS="-L$sysroot/lib --static"
./configure \
--build=${BUILD} \
--host=${HOST} \
--prefix=/
make
skip=1
}
function recipe_clean {
"$REDOX_MAKE" clean
skip=1
}
function recipe_stage {
dest="$(realpath $1)"
"$REDOX_MAKE" DESTDIR="$dest" install
rm -f "$dest/lib/"*.la
skip=1
}

View File

@ -0,0 +1,15 @@
# This does not build update-mime-database to avoid bringing in C code to Redox
[source]
tar = "https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/2.4/shared-mime-info-2.4.tar.gz"
blake3 = "ad130f2f923ab3d5455c643e6257abf3598339fdd134ad0fac4e5dbbbf070eb9"
[build]
template = "custom"
script = """
mkdir -p "${COOKBOOK_STAGE}/usr/share/mime/packages"
msgfmt --xml \
--template="${COOKBOOK_SOURCE}/data/freedesktop.org.xml.in" \
-d "${COOKBOOK_SOURCE}/po" \
-o "${COOKBOOK_STAGE}/usr/share/mime/packages/freedesktop.org.xml"
update-mime-database -V "${COOKBOOK_STAGE}/usr/share/mime"
"""