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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 617067 - (show annotations) (download)
Sat Apr 19 14:03:26 2014 UTC (5 years, 7 months ago) by tmb
File size: 4730 byte(s)
rebuild for virtualbox-4.3.10-2.mga5
1 # define driver name, version and release
2 %define drvname vboxadditions
3 %define drvver 4.3.10
4 %define drvrel 2.mga5
5
6 # define core kernel version we build against
7 %define kernver 3.13.10
8 %define kernrel 1.mga5
9
10 # where to build
11 %define topdir ${RPM_BUILD_DIR}/%{name}-%{_arch}
12
13 # source package
14 Name: kmod-%{drvname}
15 Version: %{drvver}
16 Release: %mkrel 1
17 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 # obsoletes prebuilt -netbook-latest modules with matching -desktop-latest
35 %define latest_obsoletes_desktop %{drvname}-kernel-netbook-latest < 4.2.4-2
36 %define latest_provides_desktop %{drvname}-kernel-netbook-latest = %{drvver}-%{release}
37
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 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 %description -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
56 Prebuilt dkms binary kernel modules for the %{drvname} driver version %{drvver} \
57 built for kernel-%{1}-%{kernver}-%{kernrel}. \
58 \
59 %files -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
60 %dir /var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/%{kernver}-%{1}-%{kernrel} \
61 /var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/%{kernver}-%{1}-%{kernrel}/* \
62 \
63 %post -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
64 %{_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 %preun -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
68 %{_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: GPLv2 \
74 URL: http://www.virtualbox.org/ \
75 Group: System/Kernel and hardware \
76 Requires: %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} = %{version}-%{release} \
77 %{expand:%%{?latest_obsoletes_%{1}:Obsoletes: %{latest_obsoletes_%{1}}}} \
78 %{expand:%%{?latest_provides_%{1}:Provides: %{latest_provides_%{1}}}} \
79 %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/kernel-%{kernver}-desktop586-%{kernrel} \
105 --dkmstree %{topdir}/var/lib/dkms-binary
106 %endif
107 for flavour in desktop server; do
108 %{_sbindir}/dkms build --no-prepare-kernel --no-clean-kernel -m %{drvname} -v %{drvver}-%{drvrel} \
109 -k %{kernver}-$flavour-%{kernrel} --kernelsourcedir /usr/src/kernel-%{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 xz -6e $dir/*/module/vbox*.ko ||:
120 done

  ViewVC Help
Powered by ViewVC 1.1.26