--- /dev/null
+--- ale-0.6.0/Makefile.orig 2004-01-27 06:15:06.000000000 +0100
++++ ale-0.6.0/Makefile 2004-05-21 21:18:17.000000000 +0200
+@@ -48,7 +48,7 @@
+ $(if $(subst DOUBLE,,$(COORDINATES)),,-DALE_COORDINATES=DOUBLE)
+ FFTW_LDFLAGS:=$(if $(subst 0,,$(FFTW)),-lfftw3,)
+
+-CFLAGS:= $(DEBUG_CFLAGS) $(FFTW_CFLAGS) $(PRECISION_CFLAGS) \
++CFLAGS:= $(OPT_CFLAGS) $(DEBUG_CFLAGS) $(FFTW_CFLAGS) $(PRECISION_CFLAGS) \
+ $(if $(use_imagemagick),$(IMAGEMAGICK_CFLAGS),-Wall -O2)
+ LDFLAGS:=$(if $(use_imagemagick),$(IMAGEMAGICK_LDFLAGS)) $(FFTW_LDFLAGS) -lm
+
+@@ -66,7 +66,7 @@
+ rm -f ale
+
+ ale-phony: ale.cc d2.cc *.h d2/*.h d2/render/*.h d2/render/psf/*.h
+- g++ -o ale $(CFLAGS) ale.cc d2.cc $(LDFLAGS)
++ $(CXX) -o ale $(CFLAGS) ale.cc d2.cc $(LDFLAGS)
+
+ # The following approach to building a Windows binary is probably very
+ # dependent on the host platform configuration. The above target may be a
--- /dev/null
+Summary: Anti-Lamenessing Engine
+Name: ale
+Version: 0.6.0
+Release: 0.2
+License: GPL
+Group: Applications/Graphics
+Source0: http://auricle.dyndns.org/ALE/download/%{name}-%{version}.tar.gz
+# Source0-md5: a53a47dd01c66d5ea2fd6098146df99e
+Patch0: %{name}-makefile.patch
+URL: http://auricle.dyndns.org/ALE/
+BuildRequires: fftw3-devel
+BuildRequires: ImageMagick-devel
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+ALE is a free software program that renders high-fidelity images of
+real scenes by aligning and combining many similar images from a
+camera or scanner.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+
+%{__make} FFTW=1 IMAGEMAGICK=1 \
+ OPT_CFLAGS="%{rpmcflags}" \
+ CC="%{__cc}" \
+ CXX="%{__cxx}"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+# create directories if necessary
+install -d $RPM_BUILD_ROOT%{_bindir}/
+install ale $RPM_BUILD_ROOT%{_bindir}/
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changelog README
+%attr(755,root,root) %{_bindir}/*