File xorg-x11-driver-video-unichrome.spec of Package xorg-x11-driver-video-unichrome
#
# spec file for package xorg-x11-driver-video-unichrome (Version 20080807)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: xorg-x11-driver-video-unichrome
%if 0%{?fedora_version} >= 6
BuildRequires: libdrm-devel xorg-x11-proto-devel xorg-x11-server-sdk
%if 0%{?fedora_version} < 7
BuildRequires: pkgconfig
%endif
%endif
%if 0%{?mandriva_version} > 2006
BuildRequires: libdrm2-devel libx11_6-devel x11-proto-devel x11-server-devel
%endif
%if 0%{?suse_version}
BuildRequires: xorg-x11-sdk
%if 0%{?suse_version} < 1020
BuildRequires: Mesa-devel xorg-x11-devel
%if 0%{?suse_version} > 1000
BuildRequires: libdrm-devel
%endif
%endif
%endif
Url: unichrome.sf.net
License: X11/MIT
Group: System/X11/Servers/XF86_4
AutoReqProv: on
Version: 20080807
Release: 12
Summary: The Unichrome Project
PreReq: coreutils
Requires: xorg-x11-server
Provides: xorg-x11-driver-video:%{_libdir}/xorg/modules/drivers/unichrome_drv.so
Source: xf86-video-unichrome-fa90a8f.tar.bz2
Source1: pci_ids
Patch: xf86-video-unichrome.diff
Patch1: mandriva2007.diff
ExclusiveArch: %ix86 ia64 ppc ppc64 x86_64
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The Unichrome Project. The Unichrome Project provides Free and Open
Source support for the S3 Unichrome family of integrated graphics
devices, as found on all recent VIA Technologies Northbridges.
Authors:
--------
Luc Verhaegen
The Unichrome Project
VIA Technologies, Inc.
S3 Graphics, Inc.
%prep
%setup -n xf86-video-unichrome
%patch
%if 0%{?mandriva_version} > 2006
%patch1
%endif
ln -s via.man man/unichrome.man
%build
%if 0%{?suse_version} > 1010 || 0%{?fedora_version} >= 6 || 0%{?mandriva_version} > 2006
autoreconf -fi
%configure CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
make
%else
xmkmf -a
make CDEBUGFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -I/usr/X11R6/%{_lib}/Server/include -I/usr/X11R6/%{_lib}/Server/include/extensions -I/usr/include/drm" PREPROCESSMANPAGES="true"
%endif
%install
%if 0%{?suse_version} > 1010 || 0%{?fedora_version} >= 6 || 0%{?mandriva_version} > 2006
make install DESTDIR=$RPM_BUILD_ROOT
%if 0%{?suse_version} > 1020 && 0%{?suse_version} < 1100
mkdir -p $RPM_BUILD_ROOT/usr/%{_lib}/xorg/modules/updates/drivers/
mv $RPM_BUILD_ROOT/usr/%{_lib}/xorg/modules/drivers/* \
$RPM_BUILD_ROOT/usr/%{_lib}/xorg/modules/updates/drivers/
rmdir $RPM_BUILD_ROOT/usr/%{_lib}/xorg/modules/drivers
%endif
%if 0%{?mandriva_version} > 2006
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man4
mv $RPM_BUILD_ROOT/*.4 $RPM_BUILD_ROOT/%{_mandir}/man4
%endif
%else
make install DESTDIR=$RPM_BUILD_ROOT
make install.man DESTDIR=$RPM_BUILD_ROOT
%endif
%if 0%{?suse_version} > 1000
###
### generate SaX2/hwinfo data
###
mkdir -p $RPM_BUILD_ROOT/usr/share/sax/sysp/maps/update/ \
$RPM_BUILD_ROOT/usr/share/sax/api/data/cdb/ \
$RPM_BUILD_ROOT/var/lib/hardware/ids
> $RPM_BUILD_ROOT/usr/share/sax/sysp/maps/update/Identity.map.%name
> $RPM_BUILD_ROOT/usr/share/sax/api/data/cdb/Cards.%name
> $RPM_BUILD_ROOT/var/lib/hardware/ids/%name
NAME=VIA
SERVER=unichrome
PROFILE=
cat $RPM_SOURCE_DIR/pci_ids support | \
while read line; do
VID=$(echo "$line"|cut -d "#" -f 1)
DID=$(echo "$line"|cut -d "#" -f 2)
DEVICE=$(echo "$line"|cut -d "#" -f 3)
cat >> $RPM_BUILD_ROOT/usr/share/sax/sysp/maps/update/Identity.map.%name << EOF
NAME=${NAME}&DEVICE=${DEVICE}&VID=${VID}&DID=${DID}&SERVER=${SERVER}&EXT=&OPT=&RAW=&PROFILE=${PROFILE}&SCRIPT3D=&PACKAGE3D=&FLAG=DEFAULT
EOF
cat >> $RPM_BUILD_ROOT/usr/share/sax/api/data/cdb/Cards.%name << EOF
${NAME}:${DEVICE} {
Driver = ${SERVER}
}
EOF
cat >> $RPM_BUILD_ROOT/var/lib/hardware/ids/%name << EOF
vendor.id pci ${VID}
&device.id pci ${DID}
+device.name ${DEVICE}
+driver.xfree 4|${SERVER}
EOF
echo >> $RPM_BUILD_ROOT/var/lib/hardware/ids/%name
done
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%if 0%{?suse_version} > 1000
%dir /usr/share/sax
%dir /usr/share/sax/api
%dir /usr/share/sax/api/data
%dir /usr/share/sax/api/data/cdb
%dir /usr/share/sax/sysp
%dir /usr/share/sax/sysp/maps
%dir /usr/share/sax/sysp/maps/update
%dir /var/lib/hardware
%dir /var/lib/hardware/ids
%endif
%if 0%{?suse_version} > 1010 || 0%{?fedora_version} >= 6 || 0%{?mandriva_version} > 2006
%if 0%{?suse_version} > 1020 && 0%{?suse_version} < 1100
%dir %{_libdir}/xorg/modules/updates/drivers
%{_libdir}/xorg/modules/updates/drivers/*_drv.la
%{_libdir}/xorg/modules/updates/drivers/*_drv.so
%else
%dir %{_libdir}/xorg/modules/drivers
%{_libdir}/xorg/modules/drivers/*_drv.la
%{_libdir}/xorg/modules/drivers/*_drv.so
%endif
%{_mandir}/man4/*
%else
%dir /usr/X11R6/%{_lib}/modules
%dir /usr/X11R6/%{_lib}/modules/drivers
/usr/X11R6/%{_lib}/modules/drivers/*_drv.*
/usr/X11R6/man/man4/*
%endif
%if 0%{?suse_version} > 1000
/usr/share/sax/api/data/cdb/Cards.%{name}
/usr/share/sax/sysp/maps/update/Identity.map.%{name}
/var/lib/hardware/ids/%{name}
%endif
%if 0%{?suse_version} > 1000
%post
if ls var/lib/hardware/ids/* &> /dev/null; then
cat var/lib/hardware/ids/* > var/lib/hardware/hd.ids
else
rm -f var/lib/hardware/hd.ids
fi
exit 0
%postun
if ls var/lib/hardware/ids/* &> /dev/null; then
cat var/lib/hardware/ids/* > var/lib/hardware/hd.ids
else
rm -f var/lib/hardware/hd.ids
fi
exit 0
%endif
%changelog
* Mon Aug 18 2008 ro@suse.de
- change prereq to coreutils
* Fri Aug 08 2008 sndirsch@suse.de
- fixed Prerequires (bnc #415674)
* Fri Aug 08 2008 sndirsch@suse.de
- update to git commit fa90a8f (2008-08-07)
* Port driver to work on top of libpciaccess.
* Thu Jul 31 2008 sndirsch@suse.de
- added missing Prerequires (bnc #413561)
* Tue Apr 15 2008 sndirsch@suse.de
- update to git (20080411)
* manpage: warn about the danger of option DisableIrq
* Silence enum comma warnings by moving some headers out of the
main header.
* Sanitise the options to disable the use of the commandbuffer.
* CloseScreen: Move 3d engine reset to before VQDisable.
* Fri Apr 11 2008 sndirsch@suse.de
- SUBVENDOR/SUBDEVICE in Identity.map must not be empty
(bnc #372874)
* Fri Mar 21 2008 sndirsch@suse.de
- update to git (20080319)
* VT7205: properly disable TV CLK Input on FX43G.
* Sat Feb 02 2008 sndirsch@suse.de
- fixed generation of /var/lib/hardware/hd.ids in %%post(un)
* Tue Dec 18 2007 sndirsch@suse.de
- generate generate SaX2/hwinfo data
* Mon Dec 17 2007 sndirsch@suse.de
- update to git 6660bb5
* Test commit to see whether the git update script is still good.
* Simultaneous: properly disable simultaneous when already set in
console.
* Thu Nov 01 2007 sndirsch@suse.de
- moved module to update directory for openSUSE 10.3
* Thu Nov 01 2007 sndirsch@suse.de
- fixed ModuleData symbol name (Bug #227741, comment #26)
* Thu Oct 18 2007 sndirsch@suse.de
- make sure to install this package during update
* Fri Aug 31 2007 sndirsch@suse.de
- created package