/[packages]/updates/2/kmod-xtables-addons/current/SPECS/kmod-xtables-addons.spec
ViewVC logotype

Contents of /updates/2/kmod-xtables-addons/current/SPECS/kmod-xtables-addons.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 332211 - (show annotations) (download)
Mon Dec 17 22:00:56 2012 UTC (11 years, 2 months ago) by tmb
File size: 4450 byte(s)
rebuild for kernel-3.4.24-1.mga2
1 # define driver name, version and release
2 %define drvname xtables-addons
3 %define drvver 1.41
4 %define drvrel 3.mga2
5 %define license GPLv2
6 %define url http://xtables-addons.sourceforge.net/
7
8 # define core kernel version we build against
9 %define kernver 3.4.24
10 %define kernrel 1.mga2
11
12 # where to build
13 %define topdir ${RPM_BUILD_DIR}/%{name}-%{_arch}
14
15 # source package
16 Name: kmod-%{drvname}
17 Version: %{drvver}
18 Release: %mkrel 18
19 Summary: Prebuilt %{drvname} modules for kernel-%{kernver}-%{kernrel}
20 License: %{license}
21 URL: %{url}
22 Group: System/Kernel and hardware
23 ExclusiveArch: %{ix86} x86_64
24
25 BuildRequires: dkms-%{drvname} = %{drvver}-%{drvrel}
26 %ifarch %{ix86}
27 BuildRequires: kernel-desktop586-devel-%{kernver}-%{kernrel}
28 %endif
29 BuildRequires: kernel-desktop-devel-%{kernver}-%{kernrel}
30 BuildRequires: kernel-netbook-devel-%{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
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: %{license} \
43 URL: %{url} \
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: %{license} \
74 URL: %{url} \
75 Group: System/Kernel and hardware \
76 Requires: %{drvname}-kernel-%{kernver}-%{1}-%{kernrel} = %{version}-%{release} \
77 %ifarch %{ix86} \
78 Conflicts: arch(x86_64) \
79 %endif \
80 \
81 %description -n %{drvname}-kernel-%{1}-latest \
82 This package is a virtual rpm that aims to make sure you always have the \
83 latest prebuilt %{drvname} driver for kernel-%{1}. \
84 \
85 %files -n %{drvname}-kernel-%{1}-latest
86
87 %ifarch %{ix86}
88 %mkflavour desktop586
89 %endif
90
91 %mkflavour desktop
92 %mkflavour netbook
93 %mkflavour server
94
95
96 %prep
97 rm -rf %{topdir}
98
99 %build
100 %{_sbindir}/dkms add -m %{drvname} -v %{drvver}-%{drvrel} --dkmstree %{topdir}/var/lib/dkms-binary
101 %ifarch %{ix86}
102 %{_sbindir}/dkms build --no-prepare-kernel --no-clean-kernel -m %{drvname} -v %{drvver}-%{drvrel} \
103 -k %{kernver}-desktop586-%{kernrel} --kernelsourcedir /usr/src/linux-%{kernver}-desktop586-%{kernrel} \
104 --dkmstree %{topdir}/var/lib/dkms-binary
105 %endif
106 for flavour in desktop netbook server; do
107 %{_sbindir}/dkms build --no-prepare-kernel --no-clean-kernel -m %{drvname} -v %{drvver}-%{drvrel} \
108 -k %{kernver}-$flavour-%{kernrel} --kernelsourcedir /usr/src/linux-%{kernver}-$flavour-%{kernrel} \
109 --dkmstree %{topdir}/var/lib/dkms-binary
110 done
111
112 %install
113 mkdir -p %{buildroot}/var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}
114 cp -a %{topdir}/var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/%{kernver}-*-%{kernrel} \
115 %{buildroot}/var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/
116 for dir in %{buildroot}/var/lib/dkms-binary/%{drvname}/%{drvver}-%{drvrel}/%{kernver}-*-%{kernrel}; do
117 cp -a /usr/src/%{drvname}-%{drvver}-%{drvrel}/dkms.conf $dir/
118 xz -6e $dir/*/module/*.ko
119 done

  ViewVC Help
Powered by ViewVC 1.1.30