%define      version 0.23

Summary:     xorg.conf file generator for the X Window System.
Summary(ja): X Window System 用 xorg.conf ファイル生成ツール

Name:        Xautoconfig
Version:     %{version}
Release:     1vl12
License:     distributable
Group:       User Interface/X Hardware Support
Source:      ftp://www.penguinppc.org/projects/xautocfg/%{name}-%{version}.tar.gz
Patch0:      Xautoconfig.c.patch
Patch1:      Xautoconfig.pci.c.patch
Patch2:      Xautoconfig-mods.patch
Patch3:      Xautoconfig-0.23-modeline.patch
Patch4:      Xautoconfig-0.23-pm112.patch

Patch100:    %{name}-%{version}-vine12.patch

BuildRoot:   %{_tmppath}/%{name}-%{version}-root

#Requires:    XOrg >= 6.9
Obsoletes:   Xautoconfig4
Conflicts:   cairo < 1.2.2-0vl3


%description
Xautoconfig generates a valid xorg.conf file under any hardware
setup that is using the Linux framebuffer.

%description -l ja
Xautoconfig は、フレームバッファを使って起動されたシステムで
xorg.conf 設定ファイルを生成するツールです。


%prep
%setup -q

%patch0 -p0
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

%patch100 -p1


%build
export CFLAGS="$RPM_OPT_FLAGS"
make


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/X11R6/bin
install -m755 Xautoconfig $RPM_BUILD_ROOT/usr/X11R6/bin/Xautoconfig
pushd $RPM_BUILD_ROOT/usr/X11R6/bin
ln -s Xautoconfig Xautoconfig4
popd


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
%doc COPYING
/usr/X11R6/bin/Xautoconfig
/usr/X11R6/bin/Xautoconfig4


%changelog
* Wed Oct 18 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.23-1vl12
- modify Patch100 (disable fbdev driver for ati rage cards)

* Tue Sep 19 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.23-1vl11
- modify Patch100
  cairo-1.2.2-0vl3 now can handle 15bpp,
  so depth is set to 15 when anaconda == 1

* Sun Sep 17 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.23-1vl10
- modify Patch100 (handle PCI_CLASS_DISPLAY_OTHER)

* Sun Sep 17 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.23-1vl9
- minor fix (interactive mode is now obsolete)

* Sat Sep 09 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.23-1vl8
- modified Patch100 (don't use UseMode)
- do not actually require XOrg (although it doesn't mean a thing)

* Mon Sep 04 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.23-1vl6
- modified Patch100 (revert the change on 0.23-1vl4)

* Mon Sep 04 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.23-1vl5
- modified Patch100 (revert depth from 15 to 16 when anaconda == 1)

* Mon Sep 04 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.23-1vl4
- modified Patch100 (fbdev = 0 even when anaconda==1)

* Mon Sep 04 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.23-1vl3
- modified Patch100 (more safe XConfig.test when anaconda==1)

* Sun Sep 03 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.23-1vl2
- modified Patch100 (depth is always 15 when anaconda==1)

* Sun Sep 03 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.23-1vl1
- added Patch100 for Vine Linux

* Fri Oct 7 2005 Owen Stampflee <ostampflee@terrasoftsolutions.com>
- dont write modes, X works better without 'em

* Wed Sep 14 2005 Dan Burcaw <dan@ydl.net>
- no longer try to load glx & record modules
- updated spec summary & description for xorg

* Thu Sep  8 2005 Owen Stampflee <ostampflee@terrasoftsolutions.com>
- re-add the old patch to write xorg.conf

* Wed Aug 10 2005 Tim Renner <trenner@terrasoftsolutions.com>
- Fix byte/word problem in pci.c w/ pci.c.patch

* Mon Sep 27 2004 Owen Stampflee <ostampflee@terrasoftsolutions.com>
- fix breakage

* Sun Sep 26 2004 Dan Burcaw <dan@ydl.net>
- 0.23

* Fri Aug 29 2003 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- 0.22

* Sun Mar 16 2003 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- 0.21

* Wed Mar 12 2003 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- 0.20

* Mon Mar 10 2003 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- a few more anaconda cleanups

* Sat Mar 08 2003 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- a few more anaconda cleanups

* Fri Mar 07 2003 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- write config /tmp/XF86Config.test in anaconda mode

* Mon Mar 03 2003 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- 0.19 release

* Sun Mar 02 2003 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- 0.18 release

* Sat Feb 22 2003  Dan Burcaw <dburcaw@terrasoftsolutions.com>
- fixed requires mouseconfig/kbdconfig -> r-c-mouse/keyboard

* Mon Jan 27 2003 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- minor cosmetic fix

* Sat Oct 26 2002 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- 0.17 release

* Thu Oct 17 2002 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- don't provide Xconfigurator; conflicts with redhat-config-xfree86

* Sat Oct 12 2002 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- provide anaconda subpackage for YDL

* Fri Oct 11 2002 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- update to 0.16 release
- don't ship rc script or perl script.
- various changes, see ChangeLog

* Sun Feb 24 2002 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- update to 0.15 release

* Thu Oct 11 2001 Dan Burcaw <dburcaw@terrasoftsolutions.com>
- 0.14: last merge from Rini before maintainer change.

* Wed Dec 20 2000 Tom Rini <trini@kernel.crashing.org>
- Add Xautoconfig.initd

* Sun Dec 10 2000 Tom Rini <trini@kernel.crashing.org>
- Add Xautoconfig_wrapper.pl

* Fri Nov 24 2000 Tom Rini <trini@kernel.crashing.org>
- Updates for Xautoconfig{3,4}

* Wed Aug 04 1999 Tom Rini <trini@kernel.crashing.org>
- created
