5e9c98f
Name:           gimp-fourier-plugin
5e9c98f
Version:        0.4.3
ffa8e90
Release:        %autorelease
5e9c98f
Summary:        A simple plug-in to do fourier transform on your image
8808f16
5e9c98f
License:        GPLv3+
5e9c98f
URL:            https://www.lprp.fr/gimp_plugin_en/
5e9c98f
Source0:        https://www.lprp.fr/files/old-web/soft/gimp/fourier-%{version}.tar.gz
8808f16
196612b
BuildRequires:  gcc
5e9c98f
BuildRequires:  make
8808f16
5e9c98f
BuildRequires:  pkgconfig(fftw3)
5e9c98f
BuildRequires:  pkgconfig(gimp-2.0)
5e9c98f
5e9c98f
BuildRequires:  dos2unix
5e9c98f
5e9c98f
Requires:       gimp
8808f16
8808f16
%description
8808f16
A simple plug-in to do fourier transform on your image. The major advantage of 
8808f16
this plugin is to be able to work with the transformed image inside GIMP.
8808f16
8808f16
8808f16
%prep
5e9c98f
%autosetup -n fourier-%{version}
8808f16
5e9c98f
# Remove pre-compiled executable
5e9c98f
rm -vf fourier
8808f16
5e9c98f
for f in README README.Moire
5e9c98f
do
5e9c98f
  iconv --from-code=ISO-8859-1 --to-code=UTF-8 "${f}" > "${f}.tmp"
5e9c98f
  dos2unix "${f}.tmp"
5e9c98f
  touch -r "${f}" "${f}.tmp"
5e9c98f
  mv "${f}.tmp" "${f}"
5e9c98f
done
8808f16
8808f16
8808f16
%build
5e9c98f
%set_build_flags
5e9c98f
# We must override the default CFLAGS/LIBS to respect distro flags (including
5e9c98f
# ignoring the hard-coded -O2).
5e9c98f
#
5e9c98f
# We can’t use “gimptool-2.0 install-bin” to install into the buildroot.
5e9c98f
# We therefore don’t need gimptool-2.0 at all.
5e9c98f
%make_build \
5e9c98f
    GIMPTOOL=/bin/false \
5e9c98f
    GCC="${CC:-gcc}" \
0a432ea
    CFLAGS="${CFLAGS} $(pkg-config fftw3 gimp-2.0 --cflags)" \
0a432ea
    LIBS="${LDFLAGS} $(pkg-config fftw3 gimp-2.0 --libs) -lm"
8808f16
8808f16
8808f16
%install
5e9c98f
DESTDIR='%{buildroot}/%{_libdir}/gimp/2.0/plug-ins'
0a432ea
install -d "${DESTDIR}"
5e9c98f
%make_install \
5e9c98f
    GIMPTOOL=/bin/false \
5e9c98f
    PLUGIN_INSTALL="install -t '${DESTDIR}' -D -p"
5e9c98f
5e9c98f
5e9c98f
# Upstream provides no tests.
8808f16
8808f16
8808f16
%files
5e9c98f
%doc README
5e9c98f
%doc README.Moire
5e9c98f
8808f16
%{_libdir}/gimp/2.0/plug-ins/fourier
8808f16
8808f16
8808f16
%changelog
ffa8e90
%autochangelog