Skip to content

Commit

Permalink
fix rpm spec file
Browse files Browse the repository at this point in the history
  • Loading branch information
craigraw committed Jan 29, 2025
1 parent 541c71a commit 1f44229
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Show Build Versions
run: ./gradlew -v
- name: Build with Gradle
run: ./gradlew -i jpackage
run: ./gradlew jpackage
- name: Package zip distribution
if: ${{ runner.os == 'Windows' || runner.os == 'macOS' }}
run: ./gradlew packageZipDistribution
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ jlink {
} else {
installerOptions += ['--resource-dir', 'src/main/deploy/package/linux/', '--linux-shortcut', '--linux-menu-group', 'Sparrow']
}
installerOptions += ['--verbose', '--linux-app-category', 'utils', '--linux-app-release', '1', '--linux-rpm-license-type', 'ASL 2.0', '--linux-deb-maintainer', '[email protected]']
installerOptions += ['--linux-app-category', 'utils', '--linux-app-release', '1', '--linux-rpm-license-type', 'ASL 2.0', '--linux-deb-maintainer', '[email protected]']
imageOptions += ['--icon', 'src/main/deploy/package/linux/Sparrow.png', '--resource-dir', 'src/main/deploy/package/linux/']
}
if(os.macOsX) {
Expand Down
10 changes: 5 additions & 5 deletions src/main/deploy/package/linux/sparrow.spec
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,22 @@ if [ "$(echo %{_sourcedir}/lib/systemd/system/*.service)" != '%{_sourcedir}/lib/
install -d -m 755 %{buildroot}/lib/systemd/system
cp %{_sourcedir}/lib/systemd/system/*.service %{buildroot}/lib/systemd/system
fi
%if "x/home/scy/git/sparrow/LICENSE" != "x"
%define license_install_file %{_defaultlicensedir}/%{name}-%{version}/%{basename:/home/scy/git/sparrow/LICENSE}
%if "x%{_rpmdir}/../../LICENSE" != "x"
%define license_install_file %{_defaultlicensedir}/%{name}-%{version}/%{basename:%{_rpmdir}/../../LICENSE}
install -d -m 755 "%{buildroot}%{dirname:%{license_install_file}}"
install -m 644 "/home/scy/git/sparrow/LICENSE" "%{buildroot}%{license_install_file}"
install -m 644 "%{_rpmdir}/../../LICENSE" "%{buildroot}%{license_install_file}"
%endif
(cd %{buildroot} && find . -path ./lib/systemd -prune -o -type d -print) | sed -e 's/^\.//' -e '/^$/d' | sort > %{app_filelist}
{ rpm -ql filesystem || echo %{default_filesystem}; } | sort > %{filesystem_filelist}
comm -23 %{app_filelist} %{filesystem_filelist} > %{package_filelist}
sed -i -e 's/.*/%dir "&"/' %{package_filelist}
(cd %{buildroot} && find . -not -type d) | sed -e 's/^\.//' -e 's/.*/"&"/' >> %{package_filelist}
%if "x/home/scy/git/sparrow/LICENSE" != "x"
%if "x%{_rpmdir}/../../LICENSE" != "x"
sed -i -e 's|"%{license_install_file}"||' -e '/^$/d' %{package_filelist}
%endif

%files -f %{package_filelist}
%if "x/home/scy/git/sparrow/LICENSE" != "x"
%if "x%{_rpmdir}/../../LICENSE" != "x"
%license "%{license_install_file}"
%endif

Expand Down

0 comments on commit 1f44229

Please sign in to comment.