/[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 1298593 - (show annotations) (download)
Sun Sep 23 15:31:40 2018 UTC (14 months, 2 weeks ago) by umeabot
File size: 5184 byte(s)
Mageia 7 Mass Rebuild
1 # define driver name, version and release
2 %define drvname vboxadditions
3 %define drvver 5.2.12
4 %define drvrel 1.mga7
5
6 # define core kernel version we build against
7 %define kernver 4.14.44
8 %define kernrel 2.mga7
9
10 # where to build6
11 %define topdir ${RPM_BUILD_DIR}/%{name}-%{_arch}
12
13 # source package1
14 Name: kmod-%{drvname}
15 Version: %{drvver}
16 Release: %mkrel 6
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-%{kernver}-%{kernrel}
26 BuildRequires: kernel-desktop586-devel-%{kernver}-%{kernrel}
27 %endif
28 BuildRequires: kernel-desktop-%{kernver}-%{kernrel}
29 BuildRequires: kernel-desktop-devel-%{kernver}-%{kernrel}
30 BuildRequires: kernel-server-%{kernver}-%{kernrel}
31 BuildRequires: kernel-server-devel-%{kernver}-%{kernrel}
32
33 %description
34 This package creates prebuilt %{drvname} kernel modules for core kernel.
35
36
37 # obsoletes prebuilt -netbook-latest modules with matching -desktop-latest
38 %define latest_obsoletes_desktop %{drvname}-kernel-netbook-latest < 4.2.4-2
39 %define latest_provides_desktop %{drvname}-kernel-netbook-latest = %{drvver}-%{release}
40
41 ##### mkflavour() ala core kernel #####
42 %define mkflavour() \
43 %package -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
44 Summary: %{drvname} driver for kernel-%{1}-%{kernver}-%{kernrel} \
45 License: GPLv1 \
46 URL: http://www.virtualbox.org/ \
47 Group: System/Kernel and hardware \
48 Provides: kmod(vboxguest.ko) = %{version} \
49 Provides: kmod(vboxsf.ko) = %{version} \
50 Provides: kmod(vboxvideo.ko) = %{version} \
51 Provides: installonlypkg(kernel-module) \
52 Requires(post): dkms-minimal \
53 Requires(preun): dkms-minimal \
54 Requires: kernel-%{1}-%{kernver}-%{kernrel} \
55 Requires(post): kernel-%{1}-%{kernver}-%{kernrel} \
56 Requires(preun): kernel-%{1}-%{kernver}-%{kernrel} \
57 Recommends: %{drvname}-kernel-%{1}-latest \
58 %ifarch %{ix86} \
59 Conflicts: arch(x86_64) \
60 %endif \
61 \
62 %description -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
63 Prebuilt dkms binary kernel modules for the %{drvname} driver version %{drvver} \
64 built for kernel-%{1}-%{kernver}-%{kernrel}. \
65 \
66 %files -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
67 %dir /var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/%{kernver}-%{1}-%{kernrel} \
68 /var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/%{kernver}-%{1}-%{kernrel}/* \
69 \
70 %posttrans -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
71 %{_sbindir}/dkms install --binary -m %{drvname} -v %{drvver}-%{drvrel} -k %{kernver}-%{1}-%{kernrel} --rpm_safe_upgrade \
72 %{_sbindir}/dkms status -m %{drvname} -v %{drvver}-%{drvrel} \
73 \
74 %preun -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
75 %{_sbindir}/dkms uninstall --binary -m %{drvname} -v %{drvver}-%{drvrel} -k %{kernver}-%{1}-%{kernrel} --rpm_safe_upgrade \
76 \
77 \
78 %package -n %{drvname}-kernel-%{1}-latest \
79 Summary: Virtual rpm for latest %{drvname}-kernel-%{1} driver \
80 License: GPLv2 \
81 URL: http://www.virtualbox.org/ \
82 Group: System/Kernel and hardware \
83 Requires: %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} = %{version}-%{release} \
84 %{expand:%%{?latest_obsoletes_%{1}:Obsoletes: %{latest_obsoletes_%{1}}}} \
85 %{expand:%%{?latest_provides_%{1}:Provides: %{latest_provides_%{1}}}} \
86 %ifarch %{ix86} \
87 Conflicts: arch(x86_64) \
88 %endif \
89 \
90 %description -n %{drvname}-kernel-%{1}-latest \
91 This package is a virtual rpm that aims to make sure you always have the \
92 latest prebuilt %{drvname} driver for kernel-%{1}. \
93 \
94 %files -n %{drvname}-kernel-%{1}-latest
95
96 %ifarch %{ix86}
97 %mkflavour desktop586
98 %endif
99
100 %mkflavour desktop
101 %mkflavour server
102
103
104 %prep
105 rm -rf %{topdir}
106
107 %build
108 %{_sbindir}/dkms add -m %{drvname} -v %{drvver}-%{drvrel} --dkmstree %{topdir}/var/lib/dkms-binary
109 %ifarch %{ix86}
110 export KERN_VER=%{kernver}-desktop586-%{kernrel}
111 %{_sbindir}/dkms build --no-prepare-kernel --no-clean-kernel -m %{drvname} -v %{drvver}-%{drvrel} \
112 -k %{kernver}-desktop586-%{kernrel} --kernelsourcedir /usr/src/kernel-%{kernver}-desktop586-%{kernrel} \
113 --dkmstree %{topdir}/var/lib/dkms-binary
114 %endif
115 for flavour in desktop server; do
116 export KERN_VER=%{kernver}-$flavour-%{kernrel}
117 %{_sbindir}/dkms build --no-prepare-kernel --no-clean-kernel -m %{drvname} -v %{drvver}-%{drvrel} \
118 -k %{kernver}-$flavour-%{kernrel} --kernelsourcedir /usr/src/kernel-%{kernver}-$flavour-%{kernrel} \
119 --dkmstree %{topdir}/var/lib/dkms-binary
120 done
121
122 %install
123 mkdir -p %{buildroot}/var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}
124 cp -a %{topdir}/var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/%{kernver}-*-%{kernrel} \
125 %{buildroot}/var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/
126 for dir in %{buildroot}/var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/%{kernver}-*-%{kernrel}; do
127 cp -a /usr/src/%{drvname}-%{drvver}-%{drvrel}/dkms.conf $dir/
128 xz -6e $dir/*/module/vbox*.ko ||:
129 done

  ViewVC Help
Powered by ViewVC 1.1.26