Name: time_limit %define projectname Time_limit %define breed -no_debug %define debug_package %{nil} Version: 00.09.12 Release: K01%{?dist} Summary: A windowed/full-screen countdown timer. License: GPLv3+ URL: https://time-limit.sourceforge.io/ Source0: https://sourceforge.net/projects/time-limit/files/SRC/%{name}-%{version}-src%{breed}.7z Group: Applications/Presentation BuildRequires: fpc >= 3.2.2, lazarus >= 2.0.12, glib2-devel, gtk2-devel, p7zip, ImageMagick %description A windowed/full-screen countdown timer. Colour changes are used as warnings. Appearance Colour/font/time limits can be changed by setting window and hot-keys. %prep %setup -q -n %{version}%{breed} %build lazbuild Time_limit.lpi %install mkdir -p %{buildroot}%{_bindir} cp %{projectname} %{buildroot}%{_bindir}/%{name} mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/locale cd languages/ for f in $(find -iname *.mo); do echo $f tmp1=${f%.mo} lang=${tmp1##*.} mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/locale/$lang/LC_MESSAGES cp $f $RPM_BUILD_ROOT/%{_datadir}/locale/$lang/LC_MESSAGES/%{name}.mo done cd .. mkdir -p ${RPM_BUILD_ROOT}%{_docdir}/%{name} cp README.md CHANGES LICENSE ${RPM_BUILD_ROOT}%{_docdir}/%{name} mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/applications cat > ${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop <<- "EOF" [Desktop Entry] Name=Time limit countdown Name[lv]=Laika atskaites pulkstenis Comment=A windowed/full-screen countdown timer. Use mouse right button for settings and help. Comment[lv]=Rāda, cik laika palicis no atvēlētā. Uzziņai un izmaiņām lieto peles labo pogu. Keywords=presentation;timer;lecture; Exec=%{name} Icon=%{name} Terminal=false Type=Application Categories=Utility;Presentation; EOF mkdir PNG mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor convert Time_limit.ico PNG/time-limit.png cd PNG for f in *; do pnginfo=$(identify $f | grep -oP '.*PNG\s*\d+') c=${pnginfo##* } mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/${c}x${c}/apps cp $f ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/${c}x${c}/apps/%{name}.png done %clean rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root) %attr(755,root,root) %{_bindir}/* %{_docdir}/%{name} %{_datadir}/locale %{_datadir}/applications %{_datadir}/icons %changelog * Tue Nov 22 2022 Karlis Kalviskis - 00.09.12 - K01 - Update to 00.09.12 * Mon Nov 21 2022 Karlis Kalviskis - 00.09.11 - K01 - Update to 00.09.11 * Thu Aug 18 2022 Karlis Kalviskis - 00.09.10 - K01 - Update to 00.09.10 * Tue Mar 15 2022 Karlis Kalviskis - 00.09.08 - K01 - Update to 00.09.08 * Wed Mar 09 2022 Karlis Kalviskis - 00.09.07 - K01 - Update to 00.09.07 * Mon Dec 20 2021 Karlis Kalviskis - 00.09.06 - K01 - Update to 00.09.06 * Mon Mar 08 2021 Karlis Kalviskis - 00.09.05 - K01 - Update to 00.09.05 * Thu Feb 04 2021 Karlis Kalviskis - 00.09.04 - K01 - Update to 00.09.04 * Wed Jan 03 2018 Karlis Kalviskis - 00.04 - Initial build.