%define module_name	nvidia
%define module_version	7184
%define module_release	alt1.132626.3

%define upstream_module_name	NVIDIA_kernel

%define kversion	2.6.18
%define krelease	alt3
%define flavour		std-smp

%define module_dir /lib/modules/%kversion-%flavour-%krelease/nVidia
%define module_version_dir /lib/modules/%kversion-%flavour-%krelease/.versions

Summary:	nVidia video card drivers
Name:		kernel-modules-nv_lite-%flavour
Version:	1.0.%module_version
Release:	%module_release
License:	Proprietary
Group:		System/Kernel and hardware
URL:		http://www.nvidia.com

Packager:       Kernel Maintainer Team <kernel@packages.altlinux.org>

ExclusiveOS:	Linux
ExclusiveArch:	%ix86 x86_64

BuildRequires: kernel-build-tools >= 0.7
BuildRequires: kernel-headers-modules-%flavour = %kversion-%krelease
BuildRequires: kernel-source-%module_name-%module_version

Provides:  	kernel-modules-nv_lite-%kversion-%flavour-%krelease = %version-%release
Conflicts: 	kernel-modules-%module_name-%kversion-%flavour-%krelease
Conflicts: 	kernel-modules-nv_lite-%kversion-%flavour-%krelease < %version-%release
Conflicts: 	kernel-modules-nv_lite-%kversion-%flavour-%krelease > %version-%release
Prereq:		coreutils
Prereq:		modutils >= 2.4.27-alt4
Prereq:         kernel-image-%flavour = %kversion-%krelease
Requires(postun): kernel-image-%flavour = %kversion-%krelease
#Requires:       NVIDIA_GLX = %version
Requires:       nvidia_glx_%version
Provides:       NVIDIA_kernel = %version

%description
nVidia video card drivers that provide 3d and 2d graphics support for XFree86
Xserver.

%prep
%__rm -rf kernel-source-%module_name-%module_version
tar -jxvf %_usrsrc/kernel/sources/kernel-source-%module_name-%module_version.tar.bz2
%setup -D -T -n kernel-source-%module_name-%module_version

%__rm -f makefile
%__ln_s Makefile.kbuild Makefile

%build
%make_build -C %_usrsrc/linux-%kversion-%flavour modules \
	SUBDIRS=$PWD TEMP_DIR=$PWD/ \
	ARCH=%base_arch \
	SYSSRC=%_usrsrc/linux-%kversion-%flavour

%install
%__mkdir_p %buildroot/%module_dir
%if "%kversion" <= "2.6.0"
%__install -p -m644 nvidia.o %buildroot/%module_dir
%else
%__install -p -m644 nvidia.ko %buildroot/%module_dir
%endif

%__mkdir_p %buildroot/%module_version_dir
echo "%version" >%buildroot/%module_version_dir/%module_name

%post
%post_kernel_modules %kversion-%flavour-%krelease

%postun
%postun_kernel_modules %kversion-%flavour-%krelease

%files
%defattr(644,root,root,755)
%module_dir
%module_version_dir/%module_name

%changelog
* Sun Feb 04 2007 Dmitriy Khanzhin <jinn at altlinux dot ru> 1.0.7184-alt1.132626.3
- old version of driver

* Wed Jan 10 2007 Sergey V Turchin <zerg at altlinux dot org> 1.0.9746-alt1.132626.3
- new release (9746)

* Thu Dec 07 2006 Sergey V Turchin <zerg at altlinux dot org> 1.0.9631-alt1.132626.3
- new release (9631)

* Thu Nov 09 2006 Sergey V Turchin <zerg at altlinux dot org> 1.0.9629-alt1.132626.3
- new release (9629)

* Fri Nov 03 2006 Sergey V Turchin <zerg at altlinux dot org> 1.0.9626-alt1.132626.3
- new release (9626)

* Wed Oct 25 2006 Sergey V Turchin <zerg at altlinux dot org> 1.0.8776-alt1.132626.3
- new release (8776)

* Wed Sep 06 2006 L.A. Kostis <lakostis@altlinux.org> 1.0.8774-alt2.132626.3
- make build independed from host-arch.

* Fri Sep 01 2006 Sergey V Turchin <zerg at altlinux dot org> 1.0.8774-alt1.132626.3
- new release (8774)

* Wed May 24 2006 Sergey V Turchin <zerg at altlinux dot org> 1.0.8762-alt1.132626.3
- new release (8762)

* Wed Apr 12 2006 Sergey V Turchin <zerg at altlinux dot org> 1.0.8756-alt1.132626.3
- new release (8756)
- remove NVIDIA_kernel-1.0-8178-U012206.diff (merged by upstream)

* Sat Mar 18 2006 Sergey Vlasov <vsu@altlinux.ru> 1.0.8178-alt2.132626.3
- Added NVIDIA_kernel-1.0-8178-U012206.diff update patch from the nvnews.net
  forum (fixes several problems with newer kernels, including compilation
  failure with 2.6.16).

* Mon Dec 26 2005 Sergey V Turchin <zerg at altlinux dot org> 1.0.8178-alt1.132626.3
- new release (8178)

* Wed Aug 17 2005 Sergey V Turchin <zerg at altlinux dot org> 1.0.7676-alt1.132626.3
- new release (7676)

* Wed Aug 17 2005 Sergey V Turchin <zerg at altlinux dot org> 1.0.7667-alt1.132626.3
- new release (7667)

* Tue Jun 21 2005 Sergey Vlasov <vsu@altlinux.ru> 1.0.7174-alt3.132626.3
- Require modutils >= 2.4.27-alt4 because of .versions/nvidia (#7151).

* Tue Jun 07 2005 Sergey V Turchin <zerg at altlinux dot org> 1.0.7174-alt2.132626.3
- add file with module version

* Thu Apr 07 2005 Anton Farygin <rider@altlinux.ru> 1.0.7174-alt1.132626.3
- new release (7174)

* Mon Mar 14 2005 Sergey Vlasov <vsu@altlinux.ru> 1.0.7167-alt1.132626.3
- New release (7167).
- Removed obsolete compatibility patches.

* Wed Dec 29 2004 Sergey Vlasov <vsu@altlinux.ru> 1.0.6629-alt2.132626.3
- Added patches for compatibility with kernel 2.6.10 (Patch2, Patch3).

* Sun Dec 26 2004 Sergey Vlasov <vsu@altlinux.ru> 1.0.6629-alt1.132626.3
- New release (6629).

* Wed Oct 20 2004 Anton Farygin <rider@altlinux.ru> 1.0.6111-alt4.132626.3
- fixed unreslved symbols with kernel 2.6.9

* Sun Oct 17 2004 Sergey Vlasov <vsu@altlinux.ru> 1.0.6111-alt3.132626.3
- Rebuild for kernel 2.4.27.

* Mon Sep 06 2004 Anton Farygin <rider@altlinux.ru> 1.0.6111-alt2.132626.3
- License fixed

* Tue Aug 17 2004 Sergey Vlasov <vsu@altlinux.ru> 1.0.6111-alt1.132626.3
- New release (6111).

* Tue Aug 03 2004 Sergey Vlasov <vsu@altlinux.ru> 1.0.6106-alt2.132626.3
- Use %%post_kernel_modules and %%postun_kernel_modules macros in scripts.

* Fri Jul 02 2004 Sergey Vlasov <vsu@altlinux.ru> 1.0.6106-alt1.132626.3
- New release (6106).

* Thu May 13 2004 Sergey Vlasov <vsu@altlinux.ru> 1.0.5336-alt2.132626.3
- Rebuild for kernel 2.4.26.

* Mon Mar 22 2004 Sergey Vlasov <vsu@altlinux.ru> 1.0.5336-alt1.132626.3
- New release (5336).
- Removed AGP fix patch (not needed for 5336).
- Modified build for new makefiles.

* Fri Feb 27 2004 Sergey Vlasov <vsu@altlinux.ru> 1.0.5328-alt5.132626.3
- Updated for the new compiler version selection scheme (GCC_VERSION).

* Wed Feb 18 2004 Anton Farygin <rider@altlinux.ru> 1.0.5328-alt4.132626.3
- rebuild for 2.6.3 (increment release without changes)

* Mon Feb 16 2004 Anton Farygin <rider@altlinux.ru> 1.0.5328-alt3.132626.3
- added build scripts for kernel 2.6 

* Thu Jan 15 2004 Sergey Vlasov <vsu@altlinux.ru> 1.0.5328-alt2.132626.3
- Added patch to work around problems with AGP support (part of the Linux-2.6
  adaptation patch from www.minion.de).

* Mon Dec 22 2003 Sergey Vlasov <vsu@altlinux.ru> 1.0.5328-alt1.132626.3
- New release (5328).

* Tue Dec 16 2003 Sergey Vlasov <vsu@altlinux.ru> 1.0.4496-alt12.132626.3
- Fixed compiler selection.

* Fri Nov 28 2003 Sergey Vlasov <vsu@altlinux.ru> 1.0.4496-alt11.132626.3
- Added Provides/Conflicts to make sure that only one version of the package
  can be installed for each kernel version.

* Tue Nov 18 2003 Sergey Vlasov <vsu@altlinux.ru> 1.0.4496-alt10.132626.3
- Fixed spec file name.
- Avoid %%postun failure when this package is removed after
  kernel-image-%%flavour (currently rpm cannot prevent this).

* Sat Sep 06 2003 Anton Farygin <rider@altlinux.ru> 1.0.4496-alt9.132626.3
- /usr/include replaces to macros _includedir
- build requires fix

* Tue Aug 26 2003 Peter Novodvorsky <nidd@altlinux.com> 1.0.4496-alt8
- rebuilt with 2.4.21rel-alt14

* Fri Aug 15 2003 Peter Novodvorsky <nidd@altlinux.com> 1.0.4496-alt7
- rebuilt with 2.4.21rel-alt13

* Wed Aug 13 2003 Peter Novodvorsky <nidd@altlinux.com> 1.0.4496-alt6
- rebuilt with 2.4.21rel-alt12

* Tue Aug 12 2003 Peter Novodvorsky <nidd@altlinux.com> 1.0.4496-alt5
- rebuilt with 2.4.21rel-alt11

* Mon Aug 11 2003 Peter Novodvorsky <nidd@altlinux.com> 1.0.4496-alt4
- rebuilt with 2.4.21rel-alt10

* Thu Aug 07 2003 Peter Novodvorsky <nidd@altlinux.com> 1.0.4496-alt3
- rebuilt with 2.4.21rel-alt9

* Wed Aug 06 2003 Peter Novodvorsky <nidd@altlinux.com> 1.0.4496-alt2
- rebuilt with 2.4.21rel-alt8

* Wed Jul 30 2003 Peter Novodvorsky <nidd@altlinux.com> 1.0.4496-alt1
- new release (4496)
- rebuilt with 2.4.21rel-alt7

* Thu Jul 17 2003 Peter Novodvorsky <nidd@altlinux.com> 1.0.4363-alt5
- rebuilt with 2.4.21rel-alt6

* Wed Jul 16 2003 Peter Novodvorsky <nidd@altlinux.com> 1.0.4363-alt4
- rebuilt with 2.4.21rel-alt5

* Mon Jul 07 2003 Peter Novodvorsky <nidd@altlinux.com> 1.0.4363-alt3
- rebuilt with 2.4.21rel alt3 kernel

* Wed Jul 02 2003 Peter Novodvorsky <nidd@altlinux.com> 1.0.4363-alt2
- add provides NVIDIA_kernel = %version

* Sat Jun 21 2003 Peter Novodvorsky <nidd@altlinux.com> 1.0.4363-alt1
- rebuilt with 2.4.21rel kernel

* Thu Apr 10 2003 Peter Novodvorsky <nidd@altlinux.com> 1.0.4349-alt2
- Provides NVIDIA_kernel for now.

* Sun Mar 23 2003 Peter Novodvorsky <nidd@altlinux.com> 1.0.4349-alt1
- Initial release



