fix rpm spec file

This commit is contained in:
Craig Raw 2025-01-29 14:34:05 +02:00
parent 541c71a002
commit 1f44229e62
3 changed files with 7 additions and 7 deletions

View file

@ -23,7 +23,7 @@ jobs:
- name: Show Build Versions - name: Show Build Versions
run: ./gradlew -v run: ./gradlew -v
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew -i jpackage run: ./gradlew jpackage
- name: Package zip distribution - name: Package zip distribution
if: ${{ runner.os == 'Windows' || runner.os == 'macOS' }} if: ${{ runner.os == 'Windows' || runner.os == 'macOS' }}
run: ./gradlew packageZipDistribution run: ./gradlew packageZipDistribution

View file

@ -288,7 +288,7 @@ jlink {
} else { } else {
installerOptions += ['--resource-dir', 'src/main/deploy/package/linux/', '--linux-shortcut', '--linux-menu-group', 'Sparrow'] 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', 'mail@sparrowwallet.com'] installerOptions += ['--linux-app-category', 'utils', '--linux-app-release', '1', '--linux-rpm-license-type', 'ASL 2.0', '--linux-deb-maintainer', 'mail@sparrowwallet.com']
imageOptions += ['--icon', 'src/main/deploy/package/linux/Sparrow.png', '--resource-dir', 'src/main/deploy/package/linux/'] imageOptions += ['--icon', 'src/main/deploy/package/linux/Sparrow.png', '--resource-dir', 'src/main/deploy/package/linux/']
} }
if(os.macOsX) { if(os.macOsX) {

View file

@ -56,22 +56,22 @@ if [ "$(echo %{_sourcedir}/lib/systemd/system/*.service)" != '%{_sourcedir}/lib/
install -d -m 755 %{buildroot}/lib/systemd/system install -d -m 755 %{buildroot}/lib/systemd/system
cp %{_sourcedir}/lib/systemd/system/*.service %{buildroot}/lib/systemd/system cp %{_sourcedir}/lib/systemd/system/*.service %{buildroot}/lib/systemd/system
fi fi
%if "x/home/scy/git/sparrow/LICENSE" != "x" %if "x%{_rpmdir}/../../LICENSE" != "x"
%define license_install_file %{_defaultlicensedir}/%{name}-%{version}/%{basename:/home/scy/git/sparrow/LICENSE} %define license_install_file %{_defaultlicensedir}/%{name}-%{version}/%{basename:%{_rpmdir}/../../LICENSE}
install -d -m 755 "%{buildroot}%{dirname:%{license_install_file}}" 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 %endif
(cd %{buildroot} && find . -path ./lib/systemd -prune -o -type d -print) | sed -e 's/^\.//' -e '/^$/d' | sort > %{app_filelist} (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} { rpm -ql filesystem || echo %{default_filesystem}; } | sort > %{filesystem_filelist}
comm -23 %{app_filelist} %{filesystem_filelist} > %{package_filelist} comm -23 %{app_filelist} %{filesystem_filelist} > %{package_filelist}
sed -i -e 's/.*/%dir "&"/' %{package_filelist} sed -i -e 's/.*/%dir "&"/' %{package_filelist}
(cd %{buildroot} && find . -not -type d) | sed -e 's/^\.//' -e 's/.*/"&"/' >> %{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} sed -i -e 's|"%{license_install_file}"||' -e '/^$/d' %{package_filelist}
%endif %endif
%files -f %{package_filelist} %files -f %{package_filelist}
%if "x/home/scy/git/sparrow/LICENSE" != "x" %if "x%{_rpmdir}/../../LICENSE" != "x"
%license "%{license_install_file}" %license "%{license_install_file}"
%endif %endif