/[packages]/updates/3/kmod-nvidia173/current/SPECS/kmod-nvidia173.spec
ViewVC logotype

Annotation of /updates/3/kmod-nvidia173/current/SPECS/kmod-nvidia173.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 797483 - (hide annotations) (download)
Sun Nov 16 08:27:24 2014 UTC (4 years, 8 months ago) by tmb
File size: 4790 byte(s)
rebuild for kernel-3.10.60-1.mga3
1 tmb 187882 # define driver name, version and release
2     %define drvname nvidia173
3 tmb 491055 %define drvver 173.14.38
4     %define drvrel 1.mga3.nonfree
5 tmb 187882
6     # define core kernel version we build against
7 tmb 797483 %define kernver 3.10.60
8 tmb 737960 %define kernrel 1.mga3
9 tmb 187882
10     # where to build
11     %define topdir ${RPM_BUILD_DIR}/%{name}-%{_arch}
12    
13     # source package
14     Name: kmod-%{drvname}
15     Version: %{drvver}
16 tmb 797483 Release: %mkrel 39
17 tmb 187882 Summary: Prebuilt %{drvname} modules for kernel-%{kernver}-%{kernrel}
18     License: Freeware
19     URL: http://www.nvidia.com/object/unix.html
20     Group: System/Kernel and hardware
21     ExclusiveArch: %{ix86} x86_64
22    
23     BuildRequires: dkms-%{drvname} = %{drvver}-%{drvrel}
24     %ifarch %{ix86}
25     BuildRequires: kernel-desktop586-devel-%{kernver}-%{kernrel}
26     %endif
27     BuildRequires: kernel-desktop-devel-%{kernver}-%{kernrel}
28     BuildRequires: kernel-server-devel-%{kernver}-%{kernrel}
29    
30     %description
31     This package creates prebuilt %{drvname} kernel modules for core kernel.
32    
33    
34 tmb 327577 # obsoletes prebuilt -netbook-latest modules with matching -desktop-latest
35 tmb 327591 %define latest_obsoletes_desktop %{drvname}-kernel-netbook-latest < 173.14.36-4
36 tmb 327577 %define latest_provides_desktop %{drvname}-kernel-netbook-latest = %{drvver}-%{release}
37 tmb 187882
38     ##### mkflavour() ala core kernel #####
39     %define mkflavour() \
40 tmb 196312 %package -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
41 tmb 187882 Summary: %{drvname} driver for kernel-%{1}-%{kernver}-%{kernrel} \
42     License: Commercial \
43 tmb 188262 URL: http://www.nvidia.com/object/unix.html \
44 tmb 187882 Group: System/Kernel and hardware \
45     Requires(post): dkms-minimal \
46     Requires(preun): dkms-minimal \
47     Requires: kernel-%{1}-%{kernver}-%{kernrel} \
48     Requires(post): kernel-%{1}-%{kernver}-%{kernrel} \
49     Requires(preun): kernel-%{1}-%{kernver}-%{kernrel} \
50     Suggests: %{drvname}-kernel-%{1}-latest \
51     %ifarch %{ix86} \
52     Conflicts: arch(x86_64) \
53     %endif \
54     \
55 tmb 196312 %description -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
56 tmb 187882 Prebuilt dkms binary kernel modules for the %{drvname} driver version %{drvver} \
57     built for kernel-%{1}-%{kernver}-%{kernrel}. \
58     \
59 tmb 196312 %files -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
60 tmb 187882 %dir /var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/%{kernver}-%{1}-%{kernrel} \
61     /var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/%{kernver}-%{1}-%{kernrel}/* \
62     \
63 tmb 196312 %post -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
64 tmb 187882 %{_sbindir}/dkms install --binary -m %{drvname} -v %{drvver}-%{drvrel} -k %{kernver}-%{1}-%{kernrel} --rpm_safe_upgrade \
65     %{_sbindir}/dkms status -m %{drvname} -v %{drvver}-%{drvrel} \
66     \
67 tmb 196312 %preun -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
68 tmb 187882 %{_sbindir}/dkms uninstall --binary -m %{drvname} -v %{drvver}-%{drvrel} -k %{kernver}-%{1}-%{kernrel} --rpm_safe_upgrade \
69     \
70     \
71     %package -n %{drvname}-kernel-%{1}-latest \
72     Summary: Virtual rpm for latest %{drvname}-kernel-%{1} driver \
73     License: Commercial \
74 tmb 188262 URL: http://www.nvidia.com/object/unix.html \
75 tmb 187882 Group: System/Kernel and hardware \
76 tmb 196312 Requires: %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} = %{version}-%{release} \
77 tmb 327577 %{expand:%%{?latest_obsoletes_%{1}:Obsoletes: %{latest_obsoletes_%{1}}}} \
78     %{expand:%%{?latest_provides_%{1}:Provides: %{latest_provides_%{1}}}} \
79 tmb 187882 %ifarch %{ix86} \
80     Conflicts: arch(x86_64) \
81     %endif \
82     \
83     %description -n %{drvname}-kernel-%{1}-latest \
84     This package is a virtual rpm that aims to make sure you always have the \
85     latest prebuilt %{drvname} driver for kernel-%{1}. \
86     \
87     %files -n %{drvname}-kernel-%{1}-latest
88    
89     %ifarch %{ix86}
90     %mkflavour desktop586
91     %endif
92    
93     %mkflavour desktop
94     %mkflavour server
95    
96    
97     %prep
98     rm -rf %{topdir}
99    
100     %build
101     %{_sbindir}/dkms add -m %{drvname} -v %{drvver}-%{drvrel} --dkmstree %{topdir}/var/lib/dkms-binary
102     %ifarch %{ix86}
103     %{_sbindir}/dkms build --no-prepare-kernel --no-clean-kernel -m %{drvname} -v %{drvver}-%{drvrel} \
104     -k %{kernver}-desktop586-%{kernrel} --kernelsourcedir /usr/src/linux-%{kernver}-desktop586-%{kernrel} \
105     --dkmstree %{topdir}/var/lib/dkms-binary
106     %endif
107 tmb 327577 for flavour in desktop server; do
108 tmb 187882 %{_sbindir}/dkms build --no-prepare-kernel --no-clean-kernel -m %{drvname} -v %{drvver}-%{drvrel} \
109     -k %{kernver}-$flavour-%{kernrel} --kernelsourcedir /usr/src/linux-%{kernver}-$flavour-%{kernrel} \
110     --dkmstree %{topdir}/var/lib/dkms-binary
111     done
112    
113     %install
114     mkdir -p %{buildroot}/var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}
115     cp -a %{topdir}/var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/%{kernver}-*-%{kernrel} \
116     %{buildroot}/var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/
117     for dir in %{buildroot}/var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/%{kernver}-*-%{kernrel}; do
118     cp -a /usr/src/%{drvname}-%{drvver}-%{drvrel}/dkms.conf $dir/
119 tmb 319228 xz -6e $dir/*/module/%{drvname}.ko ||:
120 tmb 187882 done

  ViewVC Help
Powered by ViewVC 1.1.26