Files
harbour-quill/rpm/harbour-quill.spec
T
kaneda 9f236b3a1a spec: trova il desktop file via %{_sourcedir} (shadow build di Qt Creator)
Con Qt Creator la build e' shadow: %{_builddir} e' la cartella di build e i tre
tentativi relativi a '%{_builddir}/..' non trovano rpm/harbour-quill.desktop, per
cui %install usciva con 'Bad exit status' — la build da riga di comando dentro il
progetto invece funzionava, e il difetto si vedeva solo sul PC dell'utente.

%{_sourcedir} punta alla cartella rpm/ dei sorgenti in entrambe le modalita'
(verificato con una build diagnostica): si prova quella per prima, i percorsi
relativi a %{_builddir} restano come riserva, e l'errore ora elenca cosa ha
cercato invece di dire solo 'not found'.
2026-11-10 11:05:38 +01:00

214 lines
10 KiB
RPMSpec

Name: harbour-quill
Summary: Markdown notes client (Obsidian-like) for Sailfish OS
Version: 0.3.1
Release: 1
Group: Applications/Office
License: GPLv3
URL: https://git.hackatoniclife.com/kaneda/harbour-quill
Source: %{name}-%{version}.tar.gz
# Disable the auto-generated debuginfo subpackage: sfdk on the 5.1 kit
# elaborates spec files without Source0 in a way that produces a duplicate
# debuginfo package declaration ("debuginfo already exists" parse error).
%global debug_package %{nil}
Requires: sailfishsilica-qt5 >= 0.10.0
BuildRequires: sailfishsilica-qt5-devel
BuildRequires: qt5-qttools-linguist
%description
Quill: markdown notes stored in a WebDAV folder (e.g. a Nextcloud
directory). Browse, edit, and preview .md notes with automatic save.
%prep
%setup -q -n %{name}-%{version}
%build
%qmake5
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 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}
%qmake5_install
# Permessi dei file installati. Il validatore Harbour rifiuta i file eseguibili
# fuori da /usr/bin ("File must not be executable (current permissions: 654)"):
# qmake copia i permessi del sorgente, quindi un checkout con umask o ACL
# permissive (o una cartella condivisa) produce un RPM non pubblicabile.
# Qui si normalizza SEMPRE, senza fidarsi dell'albero dei sorgenti.
find %{buildroot}%{_datadir}/%{name} -type f -exec chmod 644 {} \;
find %{buildroot}/usr/share/icons/hicolor -name '%{name}.png' -exec chmod 644 {} \;
chmod 755 %{buildroot}%{_bindir}/%{name}
# Italian translation: installed in the app data dir (the RPM validator
# rejects /usr/share/translations); main.cpp loads it from there.
mkdir -p %{buildroot}%{_datadir}/%{name}/translations
install -m 0644 %{_builddir}/harbour-quill_it.qm %{buildroot}%{_datadir}/%{name}/translations/
# Desktop file installed from the spec, NOT via qmake INSTALLS: the 5.1 kit
# Makefile ignores the qmake desktop target, so rpmbuild fails with
# "File not found: .../usr/share/applications/harbour-quill.desktop".
# NB: sfdk uses the sources live (shadow build): the build dir sits next to
# the source dir, the tarball is NOT extracted into the build dir, and rpm/
# is NOT copied there either.
mkdir -p %{buildroot}/usr/share/applications
# Il desktop file sta accanto a questa spec, e sfdk imposta %{_sourcedir}
# proprio alla cartella rpm/ dei sorgenti — in ENTRAMBE le modalita': build
# dentro il progetto e shadow build (Qt Creator). E' l'unico percorso che regge
# in tutte e due; i tentativi relativi a %{_builddir} restano come riserva per
# chi compila da un tarball estratto a mano (rpmbuild classico).
DESKTOP=""
for candidate in "%{_sourcedir}/%{name}.desktop" \
"%{_builddir}/../%{name}-%{version}/rpm/%{name}.desktop" \
"%{_builddir}/rpm/%{name}.desktop" \
"%{_builddir}/%{name}-%{version}/rpm/%{name}.desktop"; do
if [ -f "$candidate" ]; then
DESKTOP="$candidate"
break
fi
done
if [ -z "$DESKTOP" ]; then
echo "ERROR: %{name}.desktop not found" >&2
echo " cercato in %{_sourcedir} e sotto %{_builddir}" >&2
echo " contenuto di %{_sourcedir}:" >&2
ls -la %{_sourcedir} >&2 || true
exit 1
fi
install -m 0644 "$DESKTOP" %{buildroot}/usr/share/applications/%{name}.desktop
%files
%defattr(-,root,root,-)
/usr/bin/%{name}
/usr/share/%{name}/qml/
/usr/share/applications/%{name}.desktop
/usr/share/icons/hicolor/*/apps/%{name}.png
%{_datadir}/%{name}/translations/%{name}*.qm
%changelog
* Sun Nov 08 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.3.1-1
- La nuova nota nasce nella cartella aperta, non nella radice del caveau: il
dialogo riceve la cartella corrente e mostra dove la sta creando. Un nome gia'
presente non e' accettato (la PUT avrebbe sovrascritto la nota esistente senza
chiedere) e il nome non puo' contenere "/".
- Dentro una cartella non compare piu' la cartella stessa: il PROPFIND Depth:1
la includeva e sembrava di non essere entrati.
- Le voci nascoste (.obsidian/, .trash/, .git/) non vengono piu' elencate, ne'
visitate dalla ricerca nel testo e dall'indice dei tag (le note nel cestino
finivano nei risultati).
- La navigazione non si perde piu' se il client e' occupato: la richiesta viene
ripresa appena si libera e l'elenco della cartella precedente viene svuotato
subito, invece di restare sotto l'intestazione nuova.
* Sun Nov 08 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.3.0-1
- Ricerca nel testo: il caveau viene percorso ricorsivamente e le note .md
scaricate una alla volta (il WebDAV non cerca nel contenuto), con avanzamento
e possibilita' di fermare; i risultati mostrano il passaggio che contiene la
parola. La ricerca per titolo resta istantanea nel campo della lista.
- Caselle di spunta: gli elementi "- [ ]" e "- [x]" si vedono come caselle e si
toccano nell'anteprima; il tocco riscrive quella riga e salva subito la nota,
e l'editor tiene il testo allineato (altrimenti uscendo riscriverebbe la
versione vecchia).
- Tag: front-matter (tags: [a, b], lista a trattini o separati da virgola) e
#tag nel testo; le pastiglie del front-matter stanno in cima all'anteprima, i
#tag del testo sono toccabili e aprono l'elenco delle note che li portano.
Nuova schermata Tag con il conteggio per tag, dal piu' usato in giu'.
- Il blocco front-matter non viene piu' stampato come testo nell'anteprima.
* Wed Aug 19 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.2.12-1
- Sandbox SailJail (Sailfish 4.4+/5.x): profilo X-Sailjail esplicito nel desktop
file (Internet, org harbour/app quill) e config in AppConfigLocation
(~/.config/harbour/quill/quill.conf, l'unica zona persistente della sandbox).
Senza profilo la sandbox nascondeva ~/.config/harbour e le impostazioni dal
launcher sparivano. Migrazione automatica dal vecchio file per-utente.
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.2.11-1
- App icon: smaller M, arrow detached further to the right
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.2.10-1
- App icon: markdown glyph with downward arrow on the right of the M
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.2.9-1
- App icon: violet gradient with markdown glyph, arrow moved to the right of the M
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.2.8-1
- New app icon: teardrop shape pointing right (Tooter style) with markdown glyph
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.2.7-1
- New app icon: dark panel with a coloured frame (Tooter/SubMusic style)
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.2.6-1
- New app icon: markdown M-down glyph on a bright violet gradient
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.2.5-1
- New app icon (Jolla-style gradient + document glyph)
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.2.4-1
- Fix crash entering a folder: search field accessed from the delegate (header ids not visible there)
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.2.3-1
- Toast banner anchored at the top (was clipped at the screen bottom)
- Note list shows all files (not only .md); added list diagnostics to the log
- Settings: language selector (system / English / Italiano), applied on restart
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.2.2-1
- Fix packaging: lrelease writes the .qm straight into the build dir (subfolder did not exist)
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.2.1-1
- Fix packaging: translation .qm built with lrelease and installed from the spec (5.1 template does not)
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.2.0-1
- V2: note search (title filter), navigable [[wiki-links]], inline images with local cache
- Localization: English default, Italian translation
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.1.12-1
- Fix links in preview: relative links resolved against the note's WebDAV folder; local file: links blocked with a banner
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.1.11-1
- New: GFM table rendering (delimiter row, column alignment, inline markup in cells)
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.1.10-1
- Fix preview render: JS files rewritten with top-level functions (QML namespace import exposes them directly)
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.1.9-1
- Fix preview: strip UTF-8 BOM in markdown render; log render errors instead of silent fallback
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.1.8-1
- Fix preview: import Markdown.js by file name (directory import exposes only .qml)
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.1.7-1
- Fix blank screen on launch: load QML via SailfishApp::pathTo (relative QUrl failed from the launcher)
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.1.6-1
- Fix packaging: desktop installed from sibling source dir (shadow build layout; qmake desktop target ignored by 5.1 kit)
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.1.5-1
- Fix packaging: removed section names from spec comments/changelog (parser saw a second install section)
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.1.4-1
- Fix packaging: desktop install path with fallback (sfdk does not extract the tarball)
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.1.3-1
- Fix sfdk 5.1 build-requires: added Source0 and disabled auto debuginfo (duplicate debuginfo package)
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.1.2-1
- Fix packaging: desktop file installed from the spec install section (independent of the qmake Makefile)
* Sun Aug 16 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.1.1-1
- Fix packaging: desktop file installed via qmake INSTALLS (was missing from buildroot)
* Sun Aug 16 2026 Carlo Baratto <carlobaratto@it> - 0.1.0-1
- Initial release: WebDAV browsing, markdown editor, preview, new/delete notes