Add appdata.xml to rpm template (#172976)

Fixes #141092
This commit is contained in:
Raymond Zhao 2023-02-02 01:54:43 -08:00 committed by GitHub
parent cf66f5ca3d
commit 7eb6452066
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -165,7 +165,7 @@ function prepareRpmPackage(arch) {
.pipe(replace('@@NAME_LONG@@', product.nameLong))
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(replace('@@LICENSE@@', product.licenseName))
.pipe(rename('usr/share/appdata/' + product.applicationName + '.appdata.xml'));
.pipe(rename('BUILD/usr/share/appdata/' + product.applicationName + '.appdata.xml'));
const workspaceMime = gulp.src('resources/linux/code-workspace.xml', { base: '.' })
.pipe(replace('@@NAME_LONG@@', product.nameLong))

View File

@ -25,6 +25,7 @@ Visual Studio Code is a new choice of tool that combines the simplicity of a cod
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_datadir}/applications
mkdir -p %{buildroot}%{_datadir}/appdata
mkdir -p %{buildroot}%{_datadir}/mime/packages
mkdir -p %{buildroot}%{_datadir}/pixmaps
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
@ -35,6 +36,7 @@ ln -s %{_datadir}/%{name}/bin/%{name} %{buildroot}%{_bindir}/%{name}
# Support files
cp -r usr/share/applications/%{name}.desktop %{buildroot}%{_datadir}/applications
cp -r usr/share/applications/%{name}-url-handler.desktop %{buildroot}%{_datadir}/applications
cp -r usr/share/appdata/%{name}.appdata.xml %{buildroot}%{_datadir}/appdata
cp -r usr/share/mime/packages/%{name}-workspace.xml %{buildroot}%{_datadir}/mime/packages/%{name}-workspace.xml
cp -r usr/share/pixmaps/@@ICON@@.png %{buildroot}%{_datadir}/pixmaps
# Shell completions
@ -72,6 +74,7 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{_datadir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/applications/%{name}-url-handler.desktop
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/mime/packages/%{name}-workspace.xml
%{_datadir}/pixmaps/@@ICON@@.png
%{_datadir}/bash-completion/completions/%{name}