Update package-rhel.sh

This commit is contained in:
JieXu 2025-08-21 10:04:37 +08:00 committed by GitHub
parent d46bbcb228
commit c93b6cbce1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -681,6 +681,40 @@ if [ -f "%{_builddir}/__PKGROOT__/v2rayn.png" ]; then
install -m0644 %{_builddir}/__PKGROOT__/v2rayn.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/v2rayn.png install -m0644 %{_builddir}/__PKGROOT__/v2rayn.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/v2rayn.png
fi fi
# -------- AppStream (GNOME Software) metadata --------
install -dm0755 %{buildroot}%{_datadir}/metainfo
cat > %{buildroot}%{_datadir}/metainfo/v2rayn.metainfo.xml << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>v2rayn.desktop</id>
<name>v2rayN</name>
<summary>v2rayN (Avalonia) GUI client</summary>
<description>
<ul>
<li>v2rayN Linux for Red Hat Enterprise Linux</li>
<li>Support vless / vmess / Trojan / http / socks / Anytls / Hysteria2 / Shadowsocks / tuic / WireGuard</li>
<li>Support Red Hat Enterprise Linux / Fedora Linux / Rocky Linux / AlmaLinux / CentOS</li>
<li>For more information, Please visit our website https://github.com/2dust/v2rayN</li>
</ul>
</description>
<launchable type="desktop-id">v2rayn.desktop</launchable>
<url type="homepage">https://github.com/2dust/v2rayN</url>
<url type="help">https://github.com/2dust/v2rayN/issues</url>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-only</project_license>
<provides>
<binary>v2rayn</binary>
</provides>
<releases>
<release version="__VERSION__"/>
</releases>
<categories>
<category>Network</category>
</categories>
</component>
EOF
# -----------------------------------------------------
%post %post
/usr/bin/update-desktop-database %{_datadir}/applications >/dev/null 2>&1 || true /usr/bin/update-desktop-database %{_datadir}/applications >/dev/null 2>&1 || true
/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor >/dev/null 2>&1 || true /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor >/dev/null 2>&1 || true
@ -694,6 +728,7 @@ fi
/opt/v2rayN /opt/v2rayN
%{_datadir}/applications/v2rayn.desktop %{_datadir}/applications/v2rayn.desktop
%{_datadir}/icons/hicolor/256x256/apps/v2rayn.png %{_datadir}/icons/hicolor/256x256/apps/v2rayn.png
%{_datadir}/metainfo/v2rayn.metainfo.xml
SPEC SPEC
# Autostart injection (inside %install) and %files entry # Autostart injection (inside %install) and %files entry