diff --git a/rpm/harbour-quill.spec b/rpm/harbour-quill.spec index 1d56275..0ec72c9 100644 --- a/rpm/harbour-quill.spec +++ b/rpm/harbour-quill.spec @@ -29,10 +29,15 @@ directory). Browse, edit, and preview .md notes with automatic save. make %{?_smp_mflags} # Translation catalogue: generated explicitly with lrelease (the sailfishapp_i18n -# template does not produce the .qm reliably on the 5.1 kit). The .ts lives in -# the source dir (sibling of the build dir); the .qm goes straight into the -# build dir (no subfolder — it may not exist). -lrelease %{_builddir}/../%{name}-%{version}/translations/harbour-quill_it.ts -qm %{_builddir}/harbour-quill_it.qm +# template does not produce the .qm reliably on the 5.1 kit). The .ts is located +# with find because sfdk builds from the live sources (shadow build) and the +# source directory name varies (project dir, tarball dir, Gitea zip dir). +TS=$(find %{_builddir}/.. -maxdepth 4 -name '%{name}_it.ts' 2>/dev/null | head -1) +if [ -z "$TS" ]; then + echo "ERROR: %{name}_it.ts not found" >&2 + exit 1 +fi +lrelease "$TS" -qm %{_builddir}/%{name}_it.qm %install rm -rf %{buildroot}