@ -1,92 +1,176 @@
#### options:
# Use the following --with/--without <option> switches to control how the
# package will be built:
#
# default_binary: install unversioned binary
%bcond_without default_binary
# libunwind support (only available on some architectures)
%ifarch %{arm} aarch64 hppa ia64 mips ppc %{power64} %{ix86} x86_64
%bcond_without libunwind
# is_default_version: This is the default GIMP version in a Fedora release
# label_overlay: Put version label in app icons
%if ! 0%{?fedora} || 0%{?fedora} >= 41
%bcond is_default_version 1
%bcond label_overlay 0
%else
%bcond_with libunwind
%bcond is_default_version 0
%bcond label_overlay 1
%endif
%global build_type_safety_c 0
# libunwind support (only available on some architectures)
%if ! 0%{?fedora}%{?rhel} || 0%{?fedora} >= 40 || 0%{?rhel} >= 11
%global unwind_arches %{arm} aarch64 hppa ia64 mips ppc %{power64} s390x %{ix86} x86_64 riscv64
%else
%global unwind_arches %{arm} aarch64 hppa ia64 mips ppc %{power64} s390x %{ix86} x86_64
%endif
# skip tests known to be problematic in a specific version
#global skip_checks_version X.Y.Z
#global skip_checks test1 test2 test3
%ifarch %unwind_arches
%bcond libunwind 1
%else
%bcond libunwind 0
%endif
%ifnarch s390x
%bcond tests 1
%bcond prebuilt_splash 0
%else
# Tests hang on s390x, skip them.
%bcond tests 0
%bcond prebuilt_splash 1
%endif
# When building in Koji or mock, networking isn’ t available.
%bcond skip_networking_tests 1
# Skip known problematic tests
%bcond skip_problematic_tests 1
# Some tests fail under normal user environments, don’ t skip them by default.
%bcond skip_user_tests 0
# The lists of tests to skip should not have leading or trailing white space,
# this breaks the logic in %%check.
# tests known to fail if networking isn’ t available
%global skip_tests_networking gimp:desktop / appdata_file
# tests known to fail for being problematic
%global skip_tests_problematic gimp:app / save-and-export
# tests known to fail in a normal user environment
%global skip_tests_user gimp:app / save-and-export\
gimp:app / single-window-mode\
gimp:app / ui
# luajit isn’ t available on all arches
%global plain_lua_arches riscv64 ppc64 ppc64le
%global prerelease 1
Summary : GNU Image Manipulation Program
Name : gimp
Epoch : 2
Version : 2.10.38
Release : %autorelease -e rvre0
Version : 2.99.19^20240916gitca9d57a417
Release : %autorelease -e 0.riscv64
# Compute some version related macros.
# Ugly, need to get quoting percent signs straight.
%global major %(ver=%{version} ; echo ${ver%%%%.*})
%global minor %(ver=%{version} ; ver=${ver#%major.}; echo ${ver%%%%.*})
%global micro %(ver=%{version} ; ver=${ver#%major.%minor.}; echo ${ver%%%%.*})
%global binver 2.10
# In the case of a snapshot version (e.g. "Version: 2.99.19^20240814git256e0ca5a0"), this computes
# the "plain" version (as defined in upstream sources), %%snapshot and %%git_rev macros. In the case
# of a normal release, %%plain_version will be the same as %%version.
%global plain_version %{lua:
local plain_version = (string.gsub(macros.version, '^(.*)[%^~].*$' , '%1' ))
print(plain_version)
if plain_version ~= macros.version then
macros.snapshot = (string.gsub(macros.version, '^.*[%^~](.*)$' , '%1' ))
macros.git_rev = (string.gsub(macros.snapshot, '^.*git(.*)$' , '%1' ))
end
}
%global major %{lua:
print((string.gsub(macros.plain_version, '^(%d+)%..*$' , '%1' )))
}
%global minor %{lua:
print((string.gsub(macros.plain_version, '^%d+%.(%d+)%..*$' , '%1' )))
}
%global micro %{lua:
print((string.gsub(macros.plain_version, '^%d+%.%d+%.(%d+).*$' , '%1' )))
}
%global bin_version %{major} .%{minor}
%global interface_age 0
%if %prerelease
%global gettext_version 30
%global api_version 3.0
%global lib_api_version 3.0
%else
%global gettext_version %{major} 0
%global api_version %{major} .0
%global lib_api_version %{major} .0
%global lib_minor %(echo $[%minor * 100])
%endif
%global lib_minor %{lua: print(tonumber(macros.minor) * 100)}
%global lib_micro %micro
# gimp core app is GPL-3.0-or-later, libgimp and other libraries are LGPL-3.0-or-later
# plugin file-dds is GPL-2.0-or-later and plugins script-fu/{ftx,tinyscheme} are BSD-3-Clause
License : LGPL-3.0-or-later AND GPL-2.0-or-later AND GPL-3.0-or-later AND BSD-3-Clause
URL : https://www.gimp.org/
# plugin file-dds is GPL-2.0-or-later and plugins script-fu/libscriptfu/{ftx,tinyscheme}
# are BSD-3-Clause, icon themes are CC-BY-SA-{3.0,4.0}, data files such as brushes and
# patterns are CC0-1.0
License : LGPL-3.0-or-later AND GPL-2.0-or-later AND GPL-3.0-or-later AND BSD-3-Clause AND CC-BY-SA-3.0 AND CC-BY-SA-4.0 AND CC0-1.0
URL : https://www.gimp.org
%if %{with label_overlay}
BuildRequires : ImageMagick
%endif
BuildRequires : aalib-devel
BuildRequires : appdata-tools
BuildRequires : chrpath >= 0.13-5
BuildRequires : appstream
BuildRequires : coreutils
BuildRequires : dbus-daemon
BuildRequires : desktop-file-utils
BuildRequires : gcc
BuildRequires : gegl04-tools
BuildRequires : gettext >= 0.19
BuildRequires : gettext >= 0.19.8
BuildRequires : gi-docgen
BuildRequires : gjs
BuildRequires : glib-networking
BuildRequires : gtk-doc >= 1.0
BuildRequires : intltool >= 0.40.1
BuildRequires : libgs-devel
BuildRequires : make
BuildRequires : libxml2
BuildRequires : libxslt
%ifnarch %plain_lua_arches
BuildRequires : lua-lgi-compat
BuildRequires : luajit
%else
BuildRequires : lua >= 5.4
BuildRequires : lua-lgi
%endif
BuildRequires : meson
BuildRequires : perl >= 5.10.0
BuildRequires : pkgconfig(alsa) >= 1.0.0
BuildRequires : pkgconfig(atk) >= 2.2.0
%if ! 0%{?fedora} || 0%{?fedora} >= 39
BuildRequires : pkgconfig(babl-0.1) >= 0.1.74
%else
BuildRequires : pkgconfig(babl) >= 0.1.74
%endif
BuildRequires : pkgconfig(appstream-glib) >= 0.7.7
BuildRequires : pkgconfig(atk) >= 2.4.0
BuildRequires : pkgconfig(babl-0.1) >= 0.1.108
BuildRequires : pkgconfig(bzip2)
BuildRequires : pkgconfig(cairo) >= 1.12.2
BuildRequires : pkgconfig(cairo) >= 1.14.0
BuildRequires : pkgconfig(cairo-pdf) >= 1.12.2
BuildRequires : pkgconfig(cfitsio)
BuildRequires : pkgconfig(fontconfig) >= 2.12.4
BuildRequires : pkgconfig(freetype2) >= 2.1.7
BuildRequires : pkgconfig(gdk-pixbuf-2.0) >= 2.30.8
BuildRequires : pkgconfig(gegl-0.4) >= 0.4.32
BuildRequires : pkgconfig(gexiv2) >= 0.10.6
BuildRequires : pkgconfig(gio-2.0) >= 2.56.2
BuildRequires : pkgconfig(gio-unix-2.0) >= 2.56.2
BuildRequires : pkgconfig(glib-2.0) >= 2.56.2
BuildRequires : pkgconfig(gmodule-no-export-2.0) >= 2.56.2
BuildRequires : pkgconfig(gobject-2.0) >= 2.56.2
BuildRequires : pkgconfig(gtk+-2.0) >= 2.24.32
BuildRequires : pkgconfig(gegl-0.4) >= 0.4.48
BuildRequires : pkgconfig(gexiv2) >= 0.14.0
BuildRequires : pkgconfig(gio-2.0)
BuildRequires : pkgconfig(gio-unix-2.0)
BuildRequires : pkgconfig(glib-2.0) >= 2.70.0
BuildRequires : pkgconfig(gmodule-no-export-2.0)
BuildRequires : pkgconfig(gobject-2.0) >= 2.70.0
BuildRequires : pkgconfig(gobject-introspection-1.0)
BuildRequires : pkgconfig(gtk+-3.0) >= 3.24.0
BuildRequires : pkgconfig(gudev-1.0) >= 167
BuildRequires : pkgconfig(harfbuzz) >= 0.9.19
BuildRequires : pkgconfig(harfbuzz) >= 2.8.2
BuildRequires : pkgconfig(iso-codes)
BuildRequires : pkgconfig(jasper)
BuildRequires : pkgconfig(json-glib-1.0) >= 1.2.6
BuildRequires : pkgconfig(lcms2) >= 2.8
BuildRequires : pkgconfig(libheif)
BuildRequires : pkgconfig(libheif) >= 1.15.1
BuildRequires : pkgconfig(libjpeg)
BuildRequires : pkgconfig(libjxl) >= 0.6.1
BuildRequires : pkgconfig(libjxl_threads) >= 0.6.1
BuildRequires : pkgconfig(libjxl) >= 0.7.0
BuildRequires : pkgconfig(libjxl_threads) >= 0.7.0
BuildRequires : pkgconfig(liblzma) >= 5.0.0
BuildRequires : pkgconfig(libmng)
BuildRequires : pkgconfig(libmypaint) >= 1.3.0
BuildRequires : pkgconfig(libopenjp2) >= 2.1.0
BuildRequires : pkgconfig(libpng) >= 1.6.25
BuildRequires : pkgconfig(librsvg-2.0) >= 2.40.6
BuildRequires : pkgconfig(libtiff-4)
BuildRequires : pkgconfig(libtiff-4) >= 4.0.0
%if %{with libunwind}
BuildRequires : pkgconfig(libunwind) >= 1.1.0
%endif
@ -95,47 +179,66 @@ BuildRequires: pkgconfig(libwebpdemux) >= 0.6.0
BuildRequires : pkgconfig(libwebpmux) >= 0.6.0
BuildRequires : pkgconfig(libwmf) >= 0.2.8
BuildRequires : pkgconfig(mypaint-brushes-1.0) >= 1.3.0
BuildRequires : pkgconfig(OpenEXR)
BuildRequires : pkgconfig(pangocairo) >= 1.29.4
BuildRequires : pkgconfig(pangoft2) >= 1.29.4
BuildRequires : pkgconfig(poppler-data) >= 0.4.7
BuildRequires : pkgconfig(poppler-glib) >= 0.50.0
BuildRequires : pkgconfig(pycairo) >= 1.0.2
BuildRequires : pkgconfig(pygobject-2.0)
BuildRequires : pkgconfig(pygtk-2.0) >= 2.10.4
BuildRequires : pkgconfig(python2) >= 2.5.0
BuildRequires : pkgconfig(OpenEXR) >= 1.6.1
BuildRequires : pkgconfig(pango) >= 1.50.0
BuildRequires : pkgconfig(pangocairo) >= 1.50.0
BuildRequires : pkgconfig(pangoft2) >= 1.50.0
BuildRequires : pkgconfig(poppler-data) >= 0.4.9
BuildRequires : pkgconfig(poppler-glib) >= 0.69.0
BuildRequires : pkgconfig(python3) >= 3.6.0
BuildRequires : pkgconfig(x11)
BuildRequires : pkgconfig(xfixes)
BuildRequires : pkgconfig(xmu)
BuildRequires : pkgconfig(xpm)
BuildRequires : pkgconfig(zlib)
BuildRequires : python3dist(pygobject) >= 3.0
BuildRequires : vala
BuildRequires : xorg-x11-server-Xvfb
BuildRequires : yelp-tools
Requires : gjs
Requires : hicolor-icon-theme
Recommends: mypaint-brushes
%ifnarch %plain_lua_arches
Requires : lua-lgi-compat
Requires : luajit
%else
Requires : lua >= 5.4
Requires : lua-lgi
%endif
Requires : xdg-utils
Requires : %{name} -libs%{?_isa} = %{epoch} :%{version} -%{release}
Requires : pygtk2%{?_isa} >= 2.10.4
Obsoletes : %{name} -help-browser < %{epoch} :%{version} -%{release}
Conflicts : %{name} -help-browser < %{epoch} :%{version} -%{release}
Requires : python3dist(pygobject) >= 3.0
#Remove dependency on RPM Fusion repository
Obsoletes : gimp-heif-plugin < 1.1.0-13
Recommends: mypaint-brushes
Source0 : https://download.gimp.org/pub/gimp/v%{binver} /gimp-%{version} .tar.bz2
Obsoletes : gimp3 < 3.0
Conflicts : gimp3 < 3.0
%if ! %defined snapshot
Source0 : https://download.gimp.org/pub/gimp/v%{bin_version} /gimp-%{version} .tar.xz
%else
# Tarball built from git snapshot with `meson dist` and renamed accordingly
Source0 : gimp-%{plain_version} -git%{git_rev} .tar.xz
%endif
# Building this from source hangs on s390x 😢. Building on any other arch will convert
# gimp-data/images/gimp-splash.xcf.xz just fine.
Source1 : gimp-splash.png
Source2 : gimp-splash.sha256sum
# Fedora specific patches:
# Try using the system monitor profile for color management by default.
# Fedora specific.
Patch1 : gimp-2.10.0-cm-system-monitor-profile-by-default.patch
# bz#1706653
Patch2 : gimp-2.10.12-default-font.patch
Patch1 : gimp-2.99.19-cm-system-monitor-profile-by-default.patch
# don't phone home to check for updates by default
Patch3 : gimp-2.10.18-no-phone-home-default.patch
Patch2 : gimp-2.99.19-no-phone-home-default.patch
# use external help browser directly if help browser plug-in is not built
Patch100 : gimp-2.10.24-external-help-browser.patch
Patch 3: gimp-2.99.19 -external-help-browser.patch
Patch101 : gimp-configure-c99.patch
# Don’ t require an unreleased gegl version
Patch4 : gimp-2.99.19-don-t-require-unreleased-gegl-version.patch
%description
GIMP (GNU Image Manipulation Program) is a powerful image composition and
@ -149,6 +252,8 @@ with multi-level undo.
%package libs
Summary : GIMP libraries
License : LGPL-3.0-or-later
Obsoletes : gimp3-libs < 3.0
Conflicts : gimp3-libs < 3.0
%description libs
The %{name} -libs package contains shared libraries needed for the GNU Image
@ -159,6 +264,8 @@ Summary: GIMP plugin and extension development kit
License : LGPL-3.0-or-later
Requires : %{name} -libs%{?_isa} = %{epoch} :%{version} -%{release}
Requires : %{name} -devel-tools = %{epoch} :%{version} -%{release}
Obsoletes : gimp3-devel < 3.0
Conflicts : gimp3-devel < 3.0
%description devel
The %{name} -devel package contains the files needed for writing GNU Image
@ -168,6 +275,8 @@ Manipulation Program (GIMP) plug-ins and extensions.
Summary : GIMP plugin and extension development tools
License : LGPL-3.0-or-later
Requires : %{name} -devel = %{epoch} :%{version} -%{release}
Obsoletes : gimp3-devel-tools < 3.0
Conflicts : gimp3-devel-tools < 3.0
%description devel-tools
The %{name} -devel-tools package contains gimptool, a helper program to
@ -176,54 +285,57 @@ build GNU Image Manipulation Program (GIMP) plug-ins and extensions.
%prep
cat << EOF
--- 8< --- Build options ---------------------------------------------------
install default binary: %{with default_binary}
is default version: %{with is_default_version}
label overlay: %{with label_overlay}
tests: %{with tests}
prebuilt splash: %{with prebuilt_splash}
%if %defined snapshot
snapshot: %{snapshot}
plain_version: %{plain_version}
git_rev: %{git_rev}
%endif
--- >8 ---------------------------------------------------------------------
EOF
%setup -q -n gimp-%{version}
%setup -q -n gimp-%{ plain_ version}
%patch 1 -p1 -b .cm-system-monitor-profile-by-default
%patch 2 -p1 -b .font-default
%patch 3 -p1 -b .no-phone-home-default
%patch 2 -p1 -b .no-phone-home-default
%patch 3 -p1 -b .external-help-browser
%patch 4 -p1 -b .don-t-require-unreleased-gegl-version
%patch 100 -p1 -b .external-help-browser
%patch 101 -p1 -b .configure-c99
# Avoid re-running autotools.
touch -r aclocal.m4 configure*
# Verify the splash file source hasn’ t changed
sha256sum -c %{SOURCE2}
%build
# allow python2 package for RHEL-8
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
# Use hardening compiler/linker flags because gimp is likely to deal with files
# coming from untrusted sources
%global _hardened_build 1
%configure \
--enable-python \
--enable-mp \
--disable-static \
--with-print \
--enable-gimp-console \
--with-aa \
--with-gudev \
%if os linux
--with-linux-input \
%endif
--without-webkit \
--with-webp \
%if %{with default_binary}
--enable-default-binary=yes \
%else
--enable-default-binary=no \
%endif
--with-libmng --with-libxpm --with-alsa --with-cairo-pdf --with-libheif \
%if 0%{?flatpak}
--with-icc-directory=/run/host/usr/share/color/icc/ \
%endif
--without-appdata-test
%make_build
%meson \
%if %{with is_default_version}
-Denable-default-bin=enabled \
%else
-Denable-default-bin=disabled \
%endif
-Dg-ir-doc=true \
-Dilbm=disabled \
-Dbug-report-url=" h t t p s : / / b u g z i l l a . r e d h a t . c o m / "
%if %{with prebuilt_splash}
# Building this from source hangs on s390x 😢, so prevent attempting to build it …
sed -i -e '/^subdir/!s/^/# /g' gimp-data/images/meson.build
%endif
%meson_build
%install
%meson_install
%if %{with prebuilt_splash}
# … instead, copy the prebuilt file into place.
install -m 644 %{SOURCE1} %{buildroot} %{_datadir} /gimp/%{api_version} /images/gimp-splash.png
%endif
# Generate RPM macros from pkg-config data:
# %%_gimp_datadir -- toplevel directory for brushes, gradients, scripts, ...
@ -233,7 +345,7 @@ export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
# %%_gimp_scriptdir -- script-fu scripts directory
# %%_gimp_plugindir -- plug-in directory
gimp_pc_extract_normalize() {
PKG_CONFIG_PATH=" $ P W D " \
PKG_CONFIG_PATH=" %{buildroot} %{_libdir} / p k g c o n f i g " \
pkg-config --variable=" $ 1 " gimp-%{lib_api_version} | \
sed \
-e 's|^%_mandir|%%{_mandir}|' \
@ -269,31 +381,23 @@ cat << EOF > macros.gimp
%%_gimp_plugindir ${_gimp_plugindir}
EOF
%install
%make_install
install -D -m0644 macros.gimp %{buildroot} %{_rpmconfigdir} /macros.d/macros.gimp
# remove rpaths
find %buildroot -type f -print0 | xargs -0 -L 20 chrpath --delete --keepgoing 2>/dev/null || :
# remove .la files
find %buildroot -name \*.la -exec %__rm -f {} \;
echo " %{__python 3 } = %{__python 3 } " >> %{buildroot} %{_libdir} /gimp/%{api_version} /interpreters/pygimp.interp
#
# Plugins and modules change often (grab the executeable ones)
#
find %{buildroot} %{_libdir} /gimp/%{ lib_ api_version} -type f | sed " s @ ^ %{buildroot} @ @ g " | grep -v '\.a$' > gimp-plugin-files
find %{buildroot} %{_libdir} /gimp/%{ lib_ api_version}/* -type d | sed " s @ ^ %{buildroot} @ % % d i r @ g " >> gimp-plugin-files
find %{buildroot} %{_libdir} /gimp/%{ api_version} -type f | sed " s @ ^ %{buildroot} @ @ g " | grep -v '\.a$' > gimp-plugin-files
find %{buildroot} %{_libdir} /gimp/%{ api_version}/* -type d | sed " s @ ^ %{buildroot} @ % % d i r @ g " >> gimp-plugin-files
# .pyc and .pyo files don't exist yet
grep " \ . p y $ " gimp-plugin-files > gimp-plugin-files-py
for file in $(cat gimp-plugin-files-py); do
for newfile in ${file}c ${file}o; do
grep -F -q -x " $ n e w f i l e " gimp-plugin-files || echo " $ n e w f i l e "
done
done >> gimp-plugin-files
grep '\.py$' gimp-plugin-files | \
sed 's+/[^/]*\.py$+/__pycache__+g' | \
sort -u > gimp-plugin-files-pycache
%py_byte_compile %{__python 2} %{buildroot} %{_libdir} /gimp/%{lib_api_version}
cat gimp-plugin-files-pycache >> gimp-plugin-files
%py_byte_compile %{__python 3} %{buildroot} %{_libdir} /gimp/%{api_version}
#
# Auto detect the lang files.
@ -311,15 +415,15 @@ cat gimp%{gettext_version}.lang gimp%{gettext_version}-std-plug-ins.lang gimp%{g
#
cat gimp-plugin-files gimp-all.lang > gimp.files
%if %{with default_binary }
%if %{with is_default_version }
# install default binary symlinks
ln -snf gimp-%{bin ver} %{buildroot} %{_bindir} /gimp
ln -snf gimp-%{bin ver}.1 %{buildroot} %{_mandir} /man1/gimp.1
ln -snf gimp-console-%{bin ver} %{buildroot} /%{_bindir} /gimp-console
ln -snf gimp-console-%{bin ver}.1 %{buildroot} /%{_mandir} /man1/gimp-console.1
ln -snf gimptool-%{ li b_ap i_version} %{buildroot} %{_bindir} /gimptool
ln -snf gimptool-%{ li b_ap i_version}.1 %{buildroot} %{_mandir} /man1/gimptool.1
ln -snf gimprc-%{bin ver}.5 %{buildroot} /%{_mandir} /man5/gimprc.5
ln -snf gimp-%{bin _ version } %{buildroot} %{_bindir} /gimp
ln -snf gimp-%{bin _ version }.1 %{buildroot} %{_mandir} /man1/gimp.1
ln -snf gimp-console-%{bin _ version } %{buildroot} /%{_bindir} /gimp-console
ln -snf gimp-console-%{bin _ version }.1 %{buildroot} /%{_mandir} /man1/gimp-console.1
ln -snf gimptool-%{ bin _version} %{buildroot} %{_bindir} /gimptool
ln -snf gimptool-%{ bin _version}.1 %{buildroot} %{_mandir} /man1/gimptool.1
ln -snf gimprc-%{bin _ version }.5 %{buildroot} /%{_mandir} /man5/gimprc.5
%endif
# Hardcode python interpreter in shipped python plug-ins. This actually has no
@ -327,103 +431,141 @@ ln -snf gimprc-%{binver}.5 %{buildroot}/%{_mandir}/man5/gimprc.5
# to the system python interpreter, but this will avoid false alarms.
grep -E -rl '^#!\s*/usr/bin/env\s+python' --include=\*.py " %{buildroot} " |
while read file; do
sed -r '1s,^#!\s*/usr/bin/env\s+python$,#!%{__python 2 },' -i " $ f i l e "
sed -r '1s,^#!\s*/usr/bin/env\s+python 2$,#!%{__python2 },' -i " $ f i l e "
sed -r '1s,^#!\s*/usr/bin/env\s+python$,#!%{__python 3 },' -i " $ f i l e "
sed -r '1s,^#!\s*/usr/bin/env\s+python 3$,#!%{__python3 },' -i " $ f i l e "
done
echo " %{__python 2 } = %{__python 2 } " >> %{buildroot} %{_libdir} /gimp/%{lib_api_version} /interpreters/pygimp.interp
rm -rf devel-docs/gimp-%{bin_version}
mv %{buildroot} %{_docdir} /gimp-%{bin_version} devel-docs
rm -r %{buildroot} %{_datadir} /gimp/%{api_version} /tests
%check
# skip tests known to be problematic in a specific version
%if "%{version}" == "%{?skip_checks_version}"
pushd app/tests
for problematic in %{?skip_checks} ; do
rm -f " $ p r o b l e m a t i c "
cat << EOF > " $ p r o b l e m a t i c "
#!/bin/sh
echo Skipping test " $ p r o b l e m a t i c "
EOF
chmod +x " $ p r o b l e m a t i c "
done
popd
%if %{without is_default_version}
rm -rf %{buildroot} %{_datadir} /metainfo
%endif
%if %{with tests}
%check
# Some tests in the gimp:app suite are known to fail when run in a normal desktop environment, but
# they work in isolated builds (mock, koji): save-and-export, single-window-mode, ui
# skip tests known to fail
skip_tests=" "
%if %{with skip_networking_tests}
skip_tests=" $ s k i p _ t e s t s
%skip_tests_networking"
%endif
%if %{with skip_problematic_tests}
skip_tests=" $ s k i p _ t e s t s
%skip_tests_problematic"
%endif
%if %{with skip_user_tests}
skip_tests=" $ s k i p _ t e s t s
%skip_tests_user"
%endif
all_tests=" $ ( % m e s o n _ t e s t - - l i s t 2 > / d e v / n u l l ) "
suites=" $ ( e c h o " $all_tests" | w h i l e r e a d s u i t e i g n o r e ; d o e c h o " ${suite%+*}" ; d o n e | s o r t - u ) "
for suite in $suites; do
suite_tests=" $ (
echo " $ a l l _ t e s t s " | grep " ^ $ s u i t e \ ( + \ S \ + \ ) \ ? " | while read ignore ignore test; do
if ! echo " $ s k i p _ t e s t s " | grep -qFx " $ s u i t e / $ t e s t " ; then echo " $ t e s t " ; fi
done | sort -u
)"
if [ -n " $ s u i t e _ t e s t s " ]; then
%ifnarch riscv64
%meson_test --suite " $ s u i t e " $suite_tests
%else
%meson_test --timeout-multiplier 10 --suite " $ s u i t e " $suite_tests
%endif
fi
done
%endif
make check %{?_smp_mflags}
%ldconfig_scriptlets libs
%files -f gimp.files
%license COPYING
%doc AUTHORS ChangeLog NEWS README
%license LICENSE COPYING
%doc AUTHORS NEWS README
%doc docs/*.xcf*
%{_datadir} /applications/*.desktop
%if %{with is_default_version}
%{_datadir} /metainfo/*.appdata.xml
%{_datadir} /metainfo/*.metainfo.xml
%endif
%dir %{_datadir} /gimp
%dir %{_datadir} /gimp/%{lib_api_version}
%{_datadir} /gimp/%{lib_api_version} /dynamics/
%{_datadir} /gimp/%{lib_api_version} /file-raw/
%{_datadir} /gimp/%{lib_api_version} /menus/
%{_datadir} /gimp/%{lib_api_version} /tags/
%{_datadir} /gimp/%{lib_api_version} /tips/
%{_datadir} /gimp/%{lib_api_version} /tool-presets/
%{_datadir} /gimp/%{lib_api_version} /ui/
%dir %{_datadir} /gimp/%{api_version}
%{_datadir} /gimp/%{api_version} /dynamics/
%{_datadir} /gimp/%{api_version} /file-raw/
%{_datadir} /gimp/%{api_version} /menus/
%{_datadir} /gimp/%{api_version} /tags/
%{_datadir} /gimp/%{api_version} /tips/
%{_datadir} /gimp/%{api_version} /tool-presets/
%dir %{_libdir} /gimp
%dir %{_libdir} /gimp/%{lib_api_version}
%dir %{_libdir} /gimp/%{ api_version}
%{_datadir} /gimp/%{lib_api_version} /brushes/
%{_datadir} /gimp/%{lib_api_version} /fractalexplorer/
%{_datadir} /gimp/%{lib_api_version} /gfig/
%{_datadir} /gimp/%{lib_api_version} /gflare/
%{_datadir} /gimp/%{lib_api_version} /gimpressionist/
%{_datadir} /gimp/%{ lib_ api_version}/gradients/
%{_datadir} /gimp/%{ lib_ api_version}/icons/
%{_datadir} /gimp/%{ lib_ api_version}/images/
%{_datadir} /gimp/%{ lib_ api_version}/palettes/
%{_datadir} /gimp/%{ lib_ api_version}/patterns/
%{_datadir} /gimp/%{ lib_ api_version}/scripts/
%{_datadir} /gimp/%{ lib_ api_version}/themes/
%{_datadir} /gimp/%{ lib_ api_version}/gimp-release
%{_datadir} /gimp/%{ api_version}/brushes/
%{_datadir} /gimp/%{ api_version}/fractalexplorer/
%{_datadir} /gimp/%{ api_version}/gfig/
%{_datadir} /gimp/%{ api_version}/gflare/
%{_datadir} /gimp/%{ api_version}/gimpressionist/
%{_datadir} /gimp/%{ api_version}/gradients/
%{_datadir} /gimp/%{ api_version}/icons/
%{_datadir} /gimp/%{ api_version}/images/
%{_datadir} /gimp/%{ api_version}/palettes/
%{_datadir} /gimp/%{ api_version}/patterns/
%{_datadir} /gimp/%{ api_version}/scripts/
%{_datadir} /gimp/%{ api_version}/themes/
%{_datadir} /gimp/%{ api_version}/gimp-release
%dir %{_sysconfdir} /gimp
%dir %{_sysconfdir} /gimp/%{lib_api_version}
%config (noreplace) %{_sysconfdir} /gimp/%{lib_api_version} /controllerrc
%config (noreplace) %{_sysconfdir} /gimp/%{lib_api_version} /gimprc
%config (noreplace) %{_sysconfdir} /gimp/%{lib_api_version} /gtkrc
%config (noreplace) %{_sysconfdir} /gimp/%{lib_api_version} /unitrc
%config (noreplace) %{_sysconfdir} /gimp/%{lib_api_version} /sessionrc
%config (noreplace) %{_sysconfdir} /gimp/%{lib_api_version} /templaterc
%config (noreplace) %{_sysconfdir} /gimp/%{lib_api_version} /menurc
%config (noreplace) %{_sysconfdir} /gimp/%{lib_api_version} /toolrc
%dir %{_sysconfdir} /gimp/%{api_version}
%config (noreplace) %{_sysconfdir} /gimp/%{api_version} /controllerrc
%config (noreplace) %{_sysconfdir} /gimp/%{api_version} /gimp.css
%config (noreplace) %{_sysconfdir} /gimp/%{api_version} /gimprc
%config (noreplace) %{_sysconfdir} /gimp/%{api_version} /unitrc
%config (noreplace) %{_sysconfdir} /gimp/%{api_version} /sessionrc
%config (noreplace) %{_sysconfdir} /gimp/%{api_version} /templaterc
%config (noreplace) %{_sysconfdir} /gimp/%{api_version} /toolrc
%{_bindir} /gimp-%{binver}
%{_bindir} /gimp-console-%{binver}
%{_bindir} /gimp-%{bin_version}
%{_bindir} /gimp-console-%{bin_version}
%{_bindir} /gimp-script-fu-interpreter-%{lib_api_version}
%if %{with default_binary }
%if %{with is_default_version }
%{_bindir} /gimp
%{_bindir} /gimp-console
%endif
%{_bindir} /gimp-test-clipboard-%{ li b_ap i_version}
%{_libexecdir} /gimp-debug-tool-%{ li b_ap i_version}
%{_bindir} /gimp-test-clipboard-%{ bin _version}
%{_libexecdir} /gimp-debug-tool-%{ bin _version}
%{_mandir} /man1/gimp-%{binver} .1*
%{_mandir} /man1/gimp-console-%{binver} .1*
%{_mandir} /man5/gimprc-%{binver} .5*
%if %{with is_default_version}
%{_bindir} /gimp-test-clipboard
%{_libexecdir} /gimp-debug-tool
%endif
%if %{with default_binary}
%{_mandir} /man1/gimp-%{bin_version} .1*
%{_mandir} /man1/gimp-console-%{bin_version} .1*
%{_mandir} /man5/gimprc-%{bin_version} .5*
%if %{with is_default_version}
%{_mandir} /man1/gimp.1*
%{_mandir} /man1/gimp-console.1*
%{_mandir} /man5/gimprc.5*
%endif
%{_datadir} /icons/hicolor/*/apps/gimp.png
%{_datadir} /icons/hicolor/*/apps/gimp*
%files libs
%license COPYING
%doc AUTHORS ChangeLog NEWS README
%license LICENSE COPYING
%doc AUTHORS NEWS README
%{_libdir} /libgimp-%{lib_api_version} .so.%{interface_age} .%{lib_minor} .%{lib_micro}
%{_libdir} /libgimp-%{lib_api_version} .so.%{interface_age}
%{_libdir} /libgimp-scriptfu-%{lib_api_version} .so.%{interface_age} .%{lib_minor} .%{lib_micro}
%{_libdir} /libgimp-scriptfu-%{lib_api_version} .so.%{interface_age}
%{_libdir} /libgimpbase-%{lib_api_version} .so.%{interface_age} .%{lib_minor} .%{lib_micro}
%{_libdir} /libgimpbase-%{lib_api_version} .so.%{interface_age}
%{_libdir} /libgimpcolor-%{lib_api_version} .so.%{interface_age} .%{lib_minor} .%{lib_micro}
@ -440,26 +582,29 @@ make check %{?_smp_mflags}
%{_libdir} /libgimpui-%{lib_api_version} .so.%{interface_age}
%{_libdir} /libgimpwidgets-%{lib_api_version} .so.%{interface_age} .%{lib_minor} .%{lib_micro}
%{_libdir} /libgimpwidgets-%{lib_api_version} .so.%{interface_age}
%dir %{_libdir} /girepository-1.0
%{_libdir} /girepository-1.0/*.typelib
%files devel
%doc HACKING README.i18n
%doc %{_datadir} /gtk-doc
%doc README.i18n
%doc devel-docs/*
%{_libdir} /*.so
%if nos linux
%{_libdir} /*.la
%{_libdir} /gimp/%{lib_api_version} /modules/*.la
%endif
%{_datadir} /aclocal/*.m4
%{_includedir} /gimp-%{lib_api_version}
%{_libdir} /pkgconfig/*
%{_rpmconfigdir} /macros.d/macros.gimp
%dir %{_datadir} /gir-1.0
%{_datadir} /gir-1.0/Gimp*.gir
%dir %{_datadir} /vala
%dir %{_datadir} /vala/vapi
%{_datadir} /vala/vapi/gimp*.deps
%{_datadir} /vala/vapi/gimp*.vapi
%files devel-tools
%{_bindir} /gimptool-%{lib_api_version}
%{_mandir} /man1/gimptool-%{lib_api_version} .1*
%{_bindir} /gimptool-%{ bin _version}
%{_mandir} /man1/gimptool-%{ bin _version}.1*
%if %{with default_binary}
%if %{with is_default_version }
%{_bindir} /gimptool
%{_mandir} /man1/gimptool.1*
%endif