# Spec for Fedora. # # Built and verified on Fedora 44 aarch64. It has never been through COPR, # which also builds for other architectures and releases: if that is ever # needed, that is the proof still missing. Name: dipstick Version: 0.1.0 Release: 1%{?dist} Summary: Plasma widget showing how much Claude Max quota is left Summary(it): Widget Plasma che mostra quanta quota Claude Max resta License: GPL-3.0-or-later # No URL: the project is not published anywhere, and an address that does not # exist is worse than none. The source is a local tarball from `make dist`. Source0: %{name}-%{version}.tar.gz BuildRequires: golang >= 1.24 BuildRequires: gettext BuildRequires: make BuildRequires: systemd-rpm-macros # Locally, if Go is installed outside RPM (mise, the official tarball), use # `make rpm RPMBUILD_FLAGS=--nodeps`. In COPR the BuildRequires resolves. # The plasmoid is useless without Plasma, and the daemon is useless without # the plasmoid: they install together because they are one thing. Requires: plasma-workspace >= 6.0 # The binary is statically linked as far as Go is concerned: no libraries to # track, and Go debuginfo in a package this small is not worth the weight. %global debug_package %{nil} %description dipstick shows how much of your Claude Max quota is left, at a glance, in the KDE Plasma panel. It reads the OAuth usage endpoint for the 5-hour and weekly windows and falls back to your local Claude Code transcripts when that endpoint is unavailable. It ships two halves that install together: a thin QML plasmoid and a Go daemon that does the polling and parsing outside plasmashell. %description -l it dipstick mostra quanta quota Claude Max resta, a colpo d'occhio, nel panel di KDE Plasma. Legge la finestra di 5 ore e quella settimanale dall'endpoint OAuth e degrada sui transcript locali di Claude Code quando quell'endpoint non risponde. Installa due meta' inseparabili: un plasmoide QML sottile e un demone Go che fa polling e parsing fuori da plasmashell. %prep %autosetup %build # COPR builds without network access: the module has no external dependencies, # so there is nothing to download and no vendoring needed. export GOFLAGS="-mod=mod -trimpath" export GOPATH="%{_builddir}/gopath" export GOCACHE="%{_builddir}/gocache" export GOPROXY=off %make_build build translations %install %make_install SYSTEM=1 PREFIX=%{_prefix} %check export GOPATH="%{_builddir}/gopath" export GOCACHE="%{_builddir}/gocache" export GOPROXY=off # The tests touch neither the network nor the user's files: they run in a # buildroot too. go test ./... %post %systemd_user_post %{name}.service %preun %systemd_user_preun %{name}.service %postun %systemd_user_postun %{name}.service # No %find_lang: the catalogue lives inside the plasmoid package, which is # where Plasma looks for a third-party applet. Installing it into # %{_datadir}/locale as well had it listed twice. %files %license LICENSE %doc README.md docs %{_bindir}/dipstick %{_userunitdir}/dipstick.service %{_datadir}/plasma/plasmoids/org.kde.plasma.dipstick/ %{_datadir}/icons/hicolor/scalable/apps/dipstick.svg %changelog * Thu Aug 27 2026 Claudio Quaglia - 0.1.0-1 - First package.