/[packages]/cauldron/kmod-vboxadditions/current/SPECS/kmod-vboxadditions.spec
ViewVC logotype

Annotation of /cauldron/kmod-vboxadditions/current/SPECS/kmod-vboxadditions.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 793257 - (hide annotations) (download)
Sat Oct 25 16:51:02 2014 UTC (5 years, 1 month ago) by tmb
File size: 4872 byte(s)
rebuild for kernel-3.17.1-2.mga5
1 tmb 232879 # define driver name, version and release
2     %define drvname vboxadditions
3 tmb 756537 %define drvver 4.3.18
4     %define drvrel 1.mga5
5 tmb 232879
6     # define core kernel version we build against
7 tmb 757225 %define kernver 3.17.1
8 tmb 793257 %define kernrel 2.mga5
9 tmb 232879
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 793257 Release: %mkrel 3
17 tmb 232879 Summary: Prebuilt %{drvname} modules for kernel-%{kernver}-%{kernrel}
18     License: GPLv2
19     URL: http://www.virtualbox.org/
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 327583 # obsoletes prebuilt -netbook-latest modules with matching -desktop-latest
35 tmb 327594 %define latest_obsoletes_desktop %{drvname}-kernel-netbook-latest < 4.2.4-2
36 tmb 327583 %define latest_provides_desktop %{drvname}-kernel-netbook-latest = %{drvver}-%{release}
37 tmb 232879
38     ##### mkflavour() ala core kernel #####
39     %define mkflavour() \
40     %package -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
41     Summary: %{drvname} driver for kernel-%{1}-%{kernver}-%{kernrel} \
42     License: GPLv1 \
43     URL: http://www.virtualbox.org/ \
44     Group: System/Kernel and hardware \
45 tmb 723729 Provides: kmod(vboxguest.ko) = %{version} \
46     Provides: kmod(vboxsf.ko) = %{version} \
47     Provides: kmod(vboxvideo.ko) = %{version} \
48 tmb 232879 Requires(post): dkms-minimal \
49     Requires(preun): dkms-minimal \
50     Requires: kernel-%{1}-%{kernver}-%{kernrel} \
51     Requires(post): kernel-%{1}-%{kernver}-%{kernrel} \
52     Requires(preun): kernel-%{1}-%{kernver}-%{kernrel} \
53 tv 675953 Recommends: %{drvname}-kernel-%{1}-latest \
54 tmb 232879 %ifarch %{ix86} \
55     Conflicts: arch(x86_64) \
56     %endif \
57     \
58     %description -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
59     Prebuilt dkms binary kernel modules for the %{drvname} driver version %{drvver} \
60     built for kernel-%{1}-%{kernver}-%{kernrel}. \
61     \
62     %files -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
63     %dir /var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/%{kernver}-%{1}-%{kernrel} \
64     /var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/%{kernver}-%{1}-%{kernrel}/* \
65     \
66     %post -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
67     %{_sbindir}/dkms install --binary -m %{drvname} -v %{drvver}-%{drvrel} -k %{kernver}-%{1}-%{kernrel} --rpm_safe_upgrade \
68     %{_sbindir}/dkms status -m %{drvname} -v %{drvver}-%{drvrel} \
69     \
70     %preun -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
71     %{_sbindir}/dkms uninstall --binary -m %{drvname} -v %{drvver}-%{drvrel} -k %{kernver}-%{1}-%{kernrel} --rpm_safe_upgrade \
72     \
73     \
74     %package -n %{drvname}-kernel-%{1}-latest \
75     Summary: Virtual rpm for latest %{drvname}-kernel-%{1} driver \
76     License: GPLv2 \
77     URL: http://www.virtualbox.org/ \
78     Group: System/Kernel and hardware \
79     Requires: %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} = %{version}-%{release} \
80 tmb 327583 %{expand:%%{?latest_obsoletes_%{1}:Obsoletes: %{latest_obsoletes_%{1}}}} \
81     %{expand:%%{?latest_provides_%{1}:Provides: %{latest_provides_%{1}}}} \
82 tmb 232879 %ifarch %{ix86} \
83     Conflicts: arch(x86_64) \
84     %endif \
85     \
86     %description -n %{drvname}-kernel-%{1}-latest \
87     This package is a virtual rpm that aims to make sure you always have the \
88     latest prebuilt %{drvname} driver for kernel-%{1}. \
89     \
90     %files -n %{drvname}-kernel-%{1}-latest
91    
92     %ifarch %{ix86}
93     %mkflavour desktop586
94     %endif
95    
96     %mkflavour desktop
97     %mkflavour server
98    
99    
100     %prep
101     rm -rf %{topdir}
102    
103     %build
104     %{_sbindir}/dkms add -m %{drvname} -v %{drvver}-%{drvrel} --dkmstree %{topdir}/var/lib/dkms-binary
105     %ifarch %{ix86}
106     %{_sbindir}/dkms build --no-prepare-kernel --no-clean-kernel -m %{drvname} -v %{drvver}-%{drvrel} \
107 tmb 595516 -k %{kernver}-desktop586-%{kernrel} --kernelsourcedir /usr/src/kernel-%{kernver}-desktop586-%{kernrel} \
108 tmb 232879 --dkmstree %{topdir}/var/lib/dkms-binary
109     %endif
110 tmb 327583 for flavour in desktop server; do
111 tmb 232879 %{_sbindir}/dkms build --no-prepare-kernel --no-clean-kernel -m %{drvname} -v %{drvver}-%{drvrel} \
112 tmb 595516 -k %{kernver}-$flavour-%{kernrel} --kernelsourcedir /usr/src/kernel-%{kernver}-$flavour-%{kernrel} \
113 tmb 232879 --dkmstree %{topdir}/var/lib/dkms-binary
114     done
115    
116     %install
117     mkdir -p %{buildroot}/var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}
118     cp -a %{topdir}/var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/%{kernver}-*-%{kernrel} \
119     %{buildroot}/var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/
120     for dir in %{buildroot}/var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/%{kernver}-*-%{kernrel}; do
121     cp -a /usr/src/%{drvname}-%{drvver}-%{drvrel}/dkms.conf $dir/
122 tmb 319229 xz -6e $dir/*/module/vbox*.ko ||:
123 tmb 232879 done

  ViewVC Help
Powered by ViewVC 1.1.26