Files
harbour-henflow/rpm/harbour-henflow.spec
T

83 lines
3.0 KiB
RPMSpec

Name: harbour-henflow
Summary: Manage hens, eggs and orders
Version: 0.1.0
Release: 1
Group: Qt/Qt
License: MIT
URL: https://git.hackatoniclife.com/kaneda/harbour-henflow
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: qt5-qttools-linguist
BuildRequires: desktop-file-utils
%global debug_package %{nil}
%description
Manage hens, egg production and customer orders locally on the phone.
Chicken registry (name, breed, hatch date), daily egg estimates,
available eggs today, quick order entry with automatic delivery date,
pickup calendar, regular customers and a simple dashboard.
No account, no cloud: all data stays on the device.
%changelog
* Thu Oct 08 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.1.0-1
- Shell del porting nativo Sailfish OS: finestra, pagina principale,
cover, impostazioni (lingua) e pipeline RPM complete
%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 cartella sorgente puo' chiamarsi henflow-0.1.0 (tarball), harbour-henflow
# (clone) o harbour-henflow-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
# Cartella sorgente con nome variabile: cerca il desktop invece di assumere
# un path fisso; la sorgente dichiarata nello spec resta il fallback.
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 datadir dell'app (il validatore RPM per Harbour
# rifiuta la cartella di sistema delle traduzioni); 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}/breeds
%{_datadir}/%{name}/translations/%{name}*.qm