%define _unpackaged_files_terminate_build 0 %define buildroot_meson \ %set_build_flags \ %{shrink:meson \ --buildtype=plain \ --prefix=%{buildroot}/%{_prefix} \ --libdir=%{buildroot}/%{_libdir} \ --libexecdir=%{buildroot}/%{_libexecdir} \ --bindir=%{buildroot}/%{_bindir} \ --sbindir=%{buildroot}/%{_sbindir} \ --includedir=%{buildroot}/%{_includedir} \ --datadir=%{buildroot}/%{_datadir} \ --mandir=%{buildroot}/%{_mandir} \ --infodir=%{buildroot}/%{_infodir} \ --localedir=%{buildroot}/%{_datadir}/locale \ --sysconfdir=%{buildroot}/%{_sysconfdir} \ --localstatedir=%{buildroot}/%{_localstatedir} \ --sharedstatedir=%{buildroot}/%{_sharedstatedir} \ --wrap-mode=nodownload \ --auto-features=enabled \ %{_vpath_srcdir} %{_vpath_builddir}} Name: pebbles Summary: An easy to use yet powerful calculator app License: GPLv3 URL: https://github.com/SubhadeepJasu/pebbles Version: 2.0.1 Release: 1%{?dist} Source0: https://github.com/SubhadeepJasu/pebbles/archive/refs/tags/v%{version}.tar.gz Requires: gtk3 >= 3.18 Requires: granite >= 5.3.0 Requires: gsl >= 2.4 BuildRequires: cmake meson /usr/bin/ninja findutils desktop-file-utils libappstream-glib vala pkgconfig(granite) pkgconfig(libhandy-1) pkgconfig(gtk+-3.0) pkgconfig(gsl) pkgconfig(glib-2.0) pkgconfig(libsoup-2.4) pkgconfig(json-glib-1.0) pkgconfig(gobject-2.0) BuildRequires: inkscape %description Pebbles is an advanced calculator application based in Vala and Gtk %prep %autosetup -p1 -n %{name}-%{version} %build %buildroot_meson %install pushd $(rpm -E '%meson' | grep -oE '[^ ]+$') ninja install popd if [ ! $(printf "$(inkscape -V | cut -d ' ' -f 2)\n1.0" | sort -V | head -n1) == "1.0" ] ; then inkscape -z -w 16 -h 16 %{buildroot}/%{_datadir}/icons/hicolor/16x16/apps/com.github.subhadeepjasu.pebbles.svg -e %{buildroot}/%{_datadir}/icons/hicolor/16x16/apps/com.github.subhadeepjasu.pebbles.png inkscape -z -w 16 -h 16 %{buildroot}/%{_datadir}/icons/hicolor/16x16@2/apps/com.github.subhadeepjasu.pebbles.svg -e %{buildroot}/%{_datadir}/icons/hicolor/16x16@2/apps/com.github.subhadeepjasu.pebbles.png inkscape -z -w 24 -h 24 %{buildroot}/%{_datadir}/icons/hicolor/24x24/apps/com.github.subhadeepjasu.pebbles.svg -e %{buildroot}/%{_datadir}/icons/hicolor/24x24/apps/com.github.subhadeepjasu.pebbles.png inkscape -z -w 24 -h 24 %{buildroot}/%{_datadir}/icons/hicolor/24x24@2/apps/com.github.subhadeepjasu.pebbles.svg -e %{buildroot}/%{_datadir}/icons/hicolor/24x24@2/apps/com.github.subhadeepjasu.pebbles.png inkscape -z -w 32 -h 32 %{buildroot}/%{_datadir}/icons/hicolor/32x32/apps/com.github.subhadeepjasu.pebbles.svg -e %{buildroot}/%{_datadir}/icons/hicolor/32x32/apps/com.github.subhadeepjasu.pebbles.png inkscape -z -w 32 -h 32 %{buildroot}/%{_datadir}/icons/hicolor/32x32@2/apps/com.github.subhadeepjasu.pebbles.svg -e %{buildroot}/%{_datadir}/icons/hicolor/32x32@2/apps/com.github.subhadeepjasu.pebbles.png inkscape -z -w 48 -h 48 %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps/com.github.subhadeepjasu.pebbles.svg -e %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps/com.github.subhadeepjasu.pebbles.png inkscape -z -w 48 -h 48 %{buildroot}/%{_datadir}/icons/hicolor/48x48@2/apps/com.github.subhadeepjasu.pebbles.svg -e %{buildroot}/%{_datadir}/icons/hicolor/48x48@2/apps/com.github.subhadeepjasu.pebbles.png inkscape -z -w 64 -h 64 %{buildroot}/%{_datadir}/icons/hicolor/64x64/apps/com.github.subhadeepjasu.pebbles.svg -e %{buildroot}/%{_datadir}/icons/hicolor/64x64/apps/com.github.subhadeepjasu.pebbles.png inkscape -z -w 64 -h 64 %{buildroot}/%{_datadir}/icons/hicolor/64x64@2/apps/com.github.subhadeepjasu.pebbles.svg -e %{buildroot}/%{_datadir}/icons/hicolor/64x64@2/apps/com.github.subhadeepjasu.pebbles.png inkscape -z -w 128 -h 128 %{buildroot}/%{_datadir}/icons/hicolor/128x128/apps/com.github.subhadeepjasu.pebbles.svg -e %{buildroot}/%{_datadir}/icons/hicolor/128x128/apps/com.github.subhadeepjasu.pebbles.png inkscape -z -w 128 -h 128 %{buildroot}/%{_datadir}/icons/hicolor/128x128@2/apps/com.github.subhadeepjasu.pebbles.svg -e %{buildroot}/%{_datadir}/icons/hicolor/128x128@2/apps/com.github.subhadeepjasu.pebbles.png else inkscape -w 16 -h 16 %{buildroot}/%{_datadir}/icons/hicolor/16x16/apps/com.github.subhadeepjasu.pebbles.svg -o %{buildroot}/%{_datadir}/icons/hicolor/16x16/apps/com.github.subhadeepjasu.pebbles.png inkscape -w 16 -h 16 %{buildroot}/%{_datadir}/icons/hicolor/16x16@2/apps/com.github.subhadeepjasu.pebbles.svg -o %{buildroot}/%{_datadir}/icons/hicolor/16x16@2/apps/com.github.subhadeepjasu.pebbles.png inkscape -w 24 -h 24 %{buildroot}/%{_datadir}/icons/hicolor/24x24/apps/com.github.subhadeepjasu.pebbles.svg -o %{buildroot}/%{_datadir}/icons/hicolor/24x24/apps/com.github.subhadeepjasu.pebbles.png inkscape -w 24 -h 24 %{buildroot}/%{_datadir}/icons/hicolor/24x24@2/apps/com.github.subhadeepjasu.pebbles.svg -o %{buildroot}/%{_datadir}/icons/hicolor/24x24@2/apps/com.github.subhadeepjasu.pebbles.png inkscape -w 32 -h 32 %{buildroot}/%{_datadir}/icons/hicolor/32x32/apps/com.github.subhadeepjasu.pebbles.svg -o %{buildroot}/%{_datadir}/icons/hicolor/32x32/apps/com.github.subhadeepjasu.pebbles.png inkscape -w 32 -h 32 %{buildroot}/%{_datadir}/icons/hicolor/32x32@2/apps/com.github.subhadeepjasu.pebbles.svg -o %{buildroot}/%{_datadir}/icons/hicolor/32x32@2/apps/com.github.subhadeepjasu.pebbles.png inkscape -w 48 -h 48 %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps/com.github.subhadeepjasu.pebbles.svg -o %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps/com.github.subhadeepjasu.pebbles.png inkscape -w 48 -h 48 %{buildroot}/%{_datadir}/icons/hicolor/48x48@2/apps/com.github.subhadeepjasu.pebbles.svg -o %{buildroot}/%{_datadir}/icons/hicolor/48x48@2/apps/com.github.subhadeepjasu.pebbles.png inkscape -w 64 -h 64 %{buildroot}/%{_datadir}/icons/hicolor/64x64/apps/com.github.subhadeepjasu.pebbles.svg -o %{buildroot}/%{_datadir}/icons/hicolor/64x64/apps/com.github.subhadeepjasu.pebbles.png inkscape -w 64 -h 64 %{buildroot}/%{_datadir}/icons/hicolor/64x64@2/apps/com.github.subhadeepjasu.pebbles.svg -o %{buildroot}/%{_datadir}/icons/hicolor/64x64@2/apps/com.github.subhadeepjasu.pebbles.png inkscape -w 128 -h 128 %{buildroot}/%{_datadir}/icons/hicolor/128x128/apps/com.github.subhadeepjasu.pebbles.svg -o %{buildroot}/%{_datadir}/icons/hicolor/128x128/apps/com.github.subhadeepjasu.pebbles.png inkscape -w 128 -h 128 %{buildroot}/%{_datadir}/icons/hicolor/128x128@2/apps/com.github.subhadeepjasu.pebbles.svg -o %{buildroot}/%{_datadir}/icons/hicolor/128x128@2/apps/com.github.subhadeepjasu.pebbles.png fi find %{buildroot}/%{_datadir}/icons/hicolor -type f -name "*.svg" | xargs rm -rv rm -rv %{buildroot}/%{_datadir}/applications/mimeinfo.cache rm -rv %{buildroot}/%{_datadir}/glib-2.0/schemas/gschemas.compiled rm -rv %{buildroot}/%{_datadir}/icons/hicolor/icon-theme.cache %check appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/com.github.subhadeepjasu.pebbles.appdata.xml desktop-file-validate %{buildroot}/%{_datadir}/applications/com.github.subhadeepjasu.pebbles.desktop %post update-desktop-database glib-compile-schemas %{_datadir}/glib-2.0/schemas/ gtk-update-icon-cache %{_datadir}/icons/hicolor/ %files %license COPYING %{_bindir}/com.github.subhadeepjasu.pebbles %{_datadir}/applications/com.github.subhadeepjasu.pebbles.desktop %{_datadir}/glib-2.0/schemas/com.github.subhadeepjasu.pebbles.gschema.xml %{_datadir}/icons/hicolor/*/apps/com.github.subhadeepjasu.pebbles.png %{_datadir}/locale/*/LC_MESSAGES/com.github.subhadeepjasu.pebbles.mo %{_datadir}/metainfo/com.github.subhadeepjasu.pebbles.appdata.xml %changelog * Mon Sep 13 2021 rmnscnce - 2.0.1-1 - Adapt summary and description from upstream - Upstream version 2.0.1 * Tue Aug 3 2021 rmnscnce - 2.0.0-5 - Updated postinstall script * Tue Aug 3 2021 rmnscnce - 2.0.0-4 - Updated dependencies - Cleaned description * Tue Aug 3 2021 rmnscnce - 2.0.0-3 - Converted all SVG icons to PNG to comply with appstream metadata requirements * Tue Aug 3 2021 rmnscnce - 2.0.0-2 - Cleaned up caches from `ninja install` * Tue Aug 3 2021 rmnscnce - 2.0.0-1 - Upstream version 2.0.0 - Updated build dependencies * Fri May 21 2021 rmnscnce - 1.1.1-14 - Don't let xdg caches interrupt build * Fri May 21 2021 rmnscnce - 1.1.1-13 - Fixed file packaging * Fri May 21 2021 rmnscnce - 1.1.1-12 - Fixed file packaging * Fri May 21 2021 rmnscnce - 1.1.1-11 - Fixed build deps * Fri May 21 2021 rmnscnce - 1.1.1-10 - Fix local macro `buildroot_meson` * Fri May 21 2021 rmnscnce - 1.1.1-9 - Fix local macro `buildroot_meson` * Fri May 21 2021 rmnscnce - 1.1.1-8 - Define local RPM macro * Fri May 21 2021 rmnscnce - 1.1.1-7 - Define local RPM macro * Fri May 21 2021 rmnscnce - 1.1.1-6 - Use push/pop instead of subshell parentheses * Fri May 21 2021 rmnscnce - 1.1.1-5 - Fixed build directory * Fri May 21 2021 rmnscnce - 1.1.1-4 - Finalized deps * Fri May 21 2021 rmnscnce - 1.1.1-3 - Fixed build deps * Fri May 21 2021 rmnscnce - 1.1.1-2 - Added build deps * Fri May 21 2021 rmnscnce - 1.1.1-1 - Fixed package name * Fri May 21 2021 rmnscnce - 1.1.1-0 - Initial packaging