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}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
# Translation catalogue: generated explicitly with lrelease (the sailfishapp_i18n
|
# 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
|
# template does not produce the .qm reliably on the 5.1 kit). The .ts is located
|
||||||
# the source dir (sibling of the build dir); the .qm goes straight into the
|
# with find because sfdk builds from the live sources (shadow build) and the
|
||||||
# build dir (no subfolder — it may not exist).
|
# source directory name varies (project dir, tarball dir, Gitea zip dir).
|
||||||
lrelease %{_builddir}/../%{name}-%{version}/translations/harbour-quill_it.ts -qm %{_builddir}/harbour-quill_it.qm
|
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
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|||||||
Reference in new issue
Block a user