no mold, extract _package_note_flags

This commit is contained in:
madonuko
2026-06-17 20:01:59 +08:00
parent ed3cbbbc6f
commit 19e87f4c9e
+6
View File
@@ -4,6 +4,8 @@
%global org "io.ente"
%global appstream_component desktop-application
%bcond_with mold
Name: ensu
Version: %(echo %tag | sed 's/^ensu-v//')
Release: 1%?dist
@@ -29,6 +31,10 @@ cd rust/apps/ensu
%build
cd rust/apps/ensu
# the original version of %_package_note_flags expects cc/gcc to parse the ld flags,
# but for wasm the `lld -flavor wasm` linker is called directly
# so I extracted the contents of the spec at /usr/lib/rpm/redhat/redhat-package-notes
%define _package_note_flags --package-metadata={\"type\":\"rpm\",\"name\":\"%name\",\"version\":\"%version-%release\",\"architecture\":\"$RPM_ARCH\",\"osCpe\":\"cpe:/o:fedoraproject:fedora:%fedora\"}
%npm_build -Bc
install -Dpm755 src-tauri/target/rpm/ensu -t %buildroot%_bindir
%desktop_file_install %{S:1}