%global app_id com.operationaldynamics.Slashtime %global commit aa4e96d36ec6e4cb56e3567c560c1c209f4fd492 %global commitdate 20230103 %global shortcommit %(c=%{commit};echo ${c:0:7}) Name: slashtime Version: 0.5.13^%{commitdate}g%{shortcommit} Release: 1%{?dist} Summary: Displays time in various locations License: MIT URL: https://github.com/istathar/%{name} Source0: https://github.com/istathar/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz BuildArch: noarch BuildRequires: desktop-file-utils BuildRequires: gettext BuildRequires: java-devel >= 1:1.6.0 BuildRequires: java-gnome BuildRequires: jpackage-utils BuildRequires: libappstream-glib BuildRequires: make BuildRequires: perl-interpreter Requires: java-gnome Requires: java-headless >= 1:1.6.0 Requires: jpackage-utils %description Slashtime is a small GTK program which displays the time in various places. It has a compact display of locations along with supporting information including date and abbreviated zone code. The feature that originally made Slashtime unique was its showing the offset from the current location, not from UTC. %prep %autosetup -p1 -n %{name}-%{commit} %if 0%{?rhel} sed -i -e 's|fedora-release|redhat-release|' configure %endif %build # not autotools ./configure jdk=%{_jvmdir}/java java-gnome=%{_prefix} prefix=%{_prefix} %make_build %install %make_install mkdir -p %{buildroot}%{_metainfodir} cat > %{buildroot}%{_metainfodir}/%{name}.appdata.xml <<_EOF %{app_id} CC0-1.0 MIT Slashtime Andrew Cowie World clock https://github.com/istathar/slashtime https://github.com/istathar/slashtime/issues

Slashtime is a small GTK program which displays the time in various places. It has a compact display of locations along with supporting information including date and abbreviated zone code. The feature that originally made Slashtime unique was its showing the offset from the current location, not from UTC.

slashtime.desktop
_EOF desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdata.xml %find_lang %{name} %files -f %{name}.lang %license LICENSE %doc AUTHORS PLACES README.markdown %{_bindir}/%{name} %{_javadir}/%{name}*.jar %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*/apps/slashtime.* %{_datadir}/%{name} %{_metainfodir}/%{name}.appdata.xml %changelog * Sun Apr 30 2023 Yaakov Selkowitz - 0.5.13^20230103gaa4e96d-1 - Updated snapshot * Fri Dec 24 2021 Yaakov Selkowitz - 0.5.13^20201001g7326857-1 - Initial build