--- /dev/null
+--- dxr2gui/configure.in.orig 2001-04-04 16:12:11.000000000 +0200
++++ dxr2gui/configure.in 2013-02-24 16:02:59.919638132 +0100
+@@ -1,6 +1,6 @@
+ AC_INIT(acinclude.m4)
+
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+
+ AM_INIT_AUTOMAKE(dxr2gui,0.5.1)
+
--- /dev/null
+--- dxr2gui/pixmaps/Makefile.am.orig 2001-03-08 19:23:48.000000000 +0100
++++ dxr2gui/pixmaps/Makefile.am 2013-02-24 16:15:22.576273633 +0100
+@@ -4,8 +4,8 @@
+ EXTRA_DIST = dxr2gui-logo.png
+
+ install-data-local:
+- $(mkinstalldirs) $(datadir)/
+- $(INSTALL_DATA) dxr2gui-logo.png $(datadir)/pixmaps
++ $(mkinstalldirs) $(DESTDIR)$(datadir)/pixmaps
++ $(INSTALL_DATA) dxr2gui-logo.png $(DESTDIR)$(datadir)/pixmaps
+
+ uninstall-local:
+ -rm -f $(datadir)/pixmaps
+--- dxr2gui/Makefile.am.orig 2001-04-04 16:12:11.000000000 +0200
++++ dxr2gui/Makefile.am 2013-02-24 16:16:01.549605330 +0100
+@@ -5,8 +5,8 @@
+ EXTRA_DIST = dxr2gui.kdevprj AUTHORS COPYING ChangeLog INSTALL README TODO
+
+ install-data-local:
+- $(mkinstalldirs) $(datadir)/gnome/apps/Applications/
+- $(INSTALL_DATA) dxr2gui.desktop $(datadir)/gnome/apps/Applications/
++ $(mkinstalldirs) $(DESTDIR)$(datadir)/applications
++ $(INSTALL_DATA) dxr2gui.desktop $(DESTDIR)$(datadir)/applications
+
+ uninstall-local:
+ -rm -f $(datadir)/gnome/apps/Applications/
--- /dev/null
+Summary: GNOME GUI for Creative Labs DXR2 devices
+Summary(pl.UTF-8): Interfejs graficzny GNOME dla urządzeń Creative Labs DXR2
+Name: dxr2gui
+Version: 0.5.2
+Release: 0.1
+License: GPL v2
+Group: X11/Applications/Multimedia
+Source0: http://downloads.sourceforge.net/dxr2gui/%{name}.tar.gz
+# Source0-md5: c527fc3d99cf576699e3159e3291ea7a
+Patch0: %{name}-am.patch
+Patch1: %{name}-install.patch
+URL: http://dxr2gui.sourceforge.net/
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: gnome-libs-devel
+BuildRequires: libtool
+BuildRequires: ncurses-devel
+BuildRequires: xorg-lib-libX11-devel
+BuildRequires: xorg-lib-libXext-devel
+BuildRequires: xorg-lib-libXmu-devel
+BuildRequires: xorg-lib-libXxf86vm-devel
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+GNOME GUI for Creative Labs DXR2 devices.
+
+%description -l pl.UTF-8
+Interfejs graficzny GNOME dla urządzeń Creative Labs DXR2.
+
+%prep
+%setup -q -n %{name}
+%patch0 -p1
+%patch1 -p1
+
+:>acinclude.m4
+# keep only AM_ACLOCAL_INCLUDE and GNOME_* macros
+#head -n 374 acinclude.m4 | tail -n +163 > acinclude.m4.new
+#head -n 1093 acinclude.m4 | tail -n +984 >> acinclude.m4.new
+#%{__mv} acinclude.m4.new acinclude.m4
+
+%build
+%{__libtoolize}
+%{__aclocal} -I macros
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO
+%attr(755,root,root) %{_bindir}/dxr2gui
+%{_desktopdir}/dxr2gui.desktop
+%{_pixmapsdir}/dxr2gui-logo.png