From 1f44229e6267c05b087f09ca6429e608860d27c9 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Wed, 29 Jan 2025 14:34:05 +0200 Subject: [PATCH] fix rpm spec file --- .github/workflows/package.yaml | 2 +- build.gradle | 2 +- src/main/deploy/package/linux/sparrow.spec | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index 04abb029..157af3c9 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -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 diff --git a/build.gradle b/build.gradle index c3e170a9..5cb9239c 100644 --- a/build.gradle +++ b/build.gradle @@ -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', '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/'] } if(os.macOsX) { diff --git a/src/main/deploy/package/linux/sparrow.spec b/src/main/deploy/package/linux/sparrow.spec index baecae94..cca1fe9d 100755 --- a/src/main/deploy/package/linux/sparrow.spec +++ b/src/main/deploy/package/linux/sparrow.spec @@ -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