/[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 1298593 - (hide 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 tmb 232879 # define driver name, version and release
2     %define drvname vboxadditions
3 tmb 1228686 %define drvver 5.2.12
4 tmb 1221224 %define drvrel 1.mga7
5 tmb 232879
6     # define core kernel version we build against
7 tmb 1232217 %define kernver 4.14.44
8 tmb 1232861 %define kernrel 2.mga7
9 tmb 232879
10 tmb 1098898 # where to build6
11 tmb 232879 %define topdir ${RPM_BUILD_DIR}/%{name}-%{_arch}
12    
13 tmb 818336 # source package1
14 tmb 232879 Name: kmod-%{drvname}
15     Version: %{drvver}
16 umeabot 1298593 Release: %mkrel 6
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 tmb 1181752 BuildRequires: kernel-desktop586-%{kernver}-%{kernrel}
26 tmb 232879 BuildRequires: kernel-desktop586-devel-%{kernver}-%{kernrel}
27     %endif
28 tmb 1181752 BuildRequires: kernel-desktop-%{kernver}-%{kernrel}
29 tmb 232879 BuildRequires: kernel-desktop-devel-%{kernver}-%{kernrel}
30 tmb 1181752 BuildRequires: kernel-server-%{kernver}-%{kernrel}
31 tmb 232879 BuildRequires: kernel-server-devel-%{kernver}-%{kernrel}
32    
33     %description
34     This package creates prebuilt %{drvname} kernel modules for core kernel.
35    
36    
37 tmb 327583 # obsoletes prebuilt -netbook-latest modules with matching -desktop-latest
38 tmb 327594 %define latest_obsoletes_desktop %{drvname}-kernel-netbook-latest < 4.2.4-2
39 tmb 327583 %define latest_provides_desktop %{drvname}-kernel-netbook-latest = %{drvver}-%{release}
40 tmb 232879
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 tmb 723729 Provides: kmod(vboxguest.ko) = %{version} \
49     Provides: kmod(vboxsf.ko) = %{version} \
50     Provides: kmod(vboxvideo.ko) = %{version} \
51 tmb 1216205 Provides: installonlypkg(kernel-module) \
52 tmb 232879 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 tv 675953 Recommends: %{drvname}-kernel-%{1}-latest \
58 tmb 232879 %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 tmb 810422 %posttrans -n %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} \
71 tmb 232879 %{_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 tmb 327583 %{expand:%%{?latest_obsoletes_%{1}:Obsoletes: %{latest_obsoletes_%{1}}}} \
85     %{expand:%%{?latest_provides_%{1}:Provides: %{latest_provides_%{1}}}} \
86 tmb 232879 %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 tmb 1180932 export KERN_VER=%{kernver}-desktop586-%{kernrel}
111 tmb 232879 %{_sbindir}/dkms build --no-prepare-kernel --no-clean-kernel -m %{drvname} -v %{drvver}-%{drvrel} \
112 tmb 595516 -k %{kernver}-desktop586-%{kernrel} --kernelsourcedir /usr/src/kernel-%{kernver}-desktop586-%{kernrel} \
113 tmb 232879 --dkmstree %{topdir}/var/lib/dkms-binary
114     %endif
115 tmb 327583 for flavour in desktop server; do
116 tmb 1180932 export KERN_VER=%{kernver}-$flavour-%{kernrel}
117 tmb 232879 %{_sbindir}/dkms build --no-prepare-kernel --no-clean-kernel -m %{drvname} -v %{drvver}-%{drvrel} \
118 tmb 595516 -k %{kernver}-$flavour-%{kernrel} --kernelsourcedir /usr/src/kernel-%{kernver}-$flavour-%{kernrel} \
119 tmb 232879 --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 tmb 319229 xz -6e $dir/*/module/vbox*.ko ||:
129 tmb 232879 done

  ViewVC Help
Powered by ViewVC 1.1.26