82 lines
3.1 KiB
RPMSpec
82 lines
3.1 KiB
RPMSpec
Name: harbour-tide
|
|
Summary: Universal tide predictions
|
|
Version: 0.1.0
|
|
Release: 1
|
|
Group: Qt/Qt
|
|
License: MIT
|
|
URL: https://git.hackatoniclife.com/kaneda/harbour-tide
|
|
Source0: %{name}-%{version}.tar.gz
|
|
Source1: %{name}.desktop
|
|
|
|
Requires: sailfishsilica-qt5 >= 0.10.9
|
|
BuildRequires: pkgconfig(sailfishapp) >= 1.0.2
|
|
BuildRequires: pkgconfig(Qt5Core)
|
|
BuildRequires: pkgconfig(Qt5Qml)
|
|
BuildRequires: pkgconfig(Qt5Quick)
|
|
BuildRequires: desktop-file-utils
|
|
|
|
%description
|
|
Universal tide predictions for Sailfish OS. Harmonic model
|
|
(M2, S2, N2, K1, O1, P1, K2) computed locally: known ports with
|
|
realistic constants, plus a free city search (OpenStreetMap
|
|
geocoding) that falls back to a synthetic estimate from lat/lon.
|
|
English and Italian UI, preferred port, units (m/ft) and chart
|
|
range saved in settings.
|
|
|
|
%changelog
|
|
* Fri Aug 21 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.1.0-1
|
|
- Prima release: motore armonico a 7 costituenti, 16 porti noti,
|
|
ricerca libera delle citta' (Nominatim + dataset locale),
|
|
card "porto piu' vicino", grafico 24/48/72 h, fase lunare e
|
|
alba/tramonto, lingua EN/IT (catalogo it nel data dir), porto
|
|
preferito, unita' e intervallo salvati in QSettings
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{version}
|
|
|
|
%build
|
|
%qmake5
|
|
make %{?_smp_mflags}
|
|
|
|
# Catalogo di traduzione generato esplicitamente con lrelease (il template
|
|
# sailfishapp_i18n non produce il .qm in modo affidabile sul kit 5.1).
|
|
# Il .ts viene cercato in modo robusto: sfdk usa i sorgenti live (shadow
|
|
# build) e la directory sorgente puo' chiamarsi %{name}-%{version} (tarball),
|
|
# %{name} (clone) o %{name}-main (zip di Gitea).
|
|
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
|
|
make install INSTALL_ROOT=%{buildroot}
|
|
mkdir -p %{buildroot}%{_datadir}/applications
|
|
# Desktop file cercato in modo robusto (stesso layout variabile di cui sopra);
|
|
# %{SOURCE1} resta il fallback per la build da tarball classica.
|
|
DESKTOP=$(find %{_builddir}/.. -maxdepth 4 -name '%{name}.desktop' 2>/dev/null | head -1)
|
|
if [ -z "$DESKTOP" ] && [ -f %{SOURCE1} ]; then DESKTOP=%{SOURCE1}; fi
|
|
if [ -z "$DESKTOP" ]; then
|
|
echo "ERROR: %{name}.desktop not found" >&2
|
|
exit 1
|
|
fi
|
|
install -m 0644 "$DESKTOP" %{buildroot}%{_datadir}/applications/%{name}.desktop
|
|
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop || true
|
|
|
|
# Traduzione italiana nel data dir dell'app (il validatore RPM rifiuta
|
|
# /usr/share/translations); main.cpp la carica da qui.
|
|
mkdir -p %{buildroot}%{_datadir}/%{name}/translations
|
|
install -m 0644 %{_builddir}/%{name}_it.qm %{buildroot}%{_datadir}/%{name}/translations/
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%{_bindir}/%{name}
|
|
%{_datadir}/applications/%{name}.desktop
|
|
%{_datadir}/icons/hicolor/86x86/apps/%{name}.png
|
|
%{_datadir}/icons/hicolor/108x108/apps/%{name}.png
|
|
%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
|
|
%{_datadir}/icons/hicolor/172x172/apps/%{name}.png
|
|
%{_datadir}/%{name}/qml
|
|
%{_datadir}/%{name}/translations/%{name}*.qm
|