spec: cerca il catalogo .ts con find (path fisso non regge con sfdk shadow build)
This commit is contained in:
1 parent
5e611e7894
commit
aab29c76cb
1 file changed
+9
-4
@@ -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}
|
||||
|
||||
Reference in new issue
Block a user