]>
Commit | Line | Data |
---|---|---|
4734e1ff ER |
1 | # Conditional build: |
2 | %bcond_without dist_kernel # allow non-distribution kernel | |
3 | %bcond_without kernel # don't build kernel modules | |
4 | %bcond_without up # don't build UP module | |
5 | %bcond_without smp # don't build SMP module | |
6 | %bcond_without userspace # don't build userspace programs | |
7 | %bcond_with verbose # verbose build (V=1) | |
8 | ||
9 | %if %{without kernel} | |
10 | %undefine with_dist_kernel | |
11 | %endif | |
12 | ||
13 | %define _rel 0.1 | |
14 | Summary: Aufs - Another Unionfs | |
15 | Name: aufs | |
16 | Version: 0 | |
17 | Release: %{_rel} | |
18 | License: GPL v2 | |
19 | Group: Base/Kernel | |
20 | Source0: %{name}-20070220.tar.bz2 | |
21 | # Source0-md5: 81bc264f83a3cdd579e0bffcbf5f0d74 | |
22 | URL: http://aufs.sourceforge.net/ | |
23 | %if %{with kernel} | |
24 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.14} | |
25 | BuildRequires: rpmbuild(macros) >= 1.330 | |
26 | %endif | |
518cfd38 | 27 | BuildRequires: sed >= 4.0 |
4734e1ff ER |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %description | |
31 | In the early days, aufs was entirely re-designed and re-implemented | |
32 | Unionfs. After many original ideas, approaches, improvements and | |
33 | implementations, it becomes totally different from Unionfs while | |
34 | keeping the basic features. Unionfs is being developed by Professor | |
35 | Erez Zadok at Stony Brook University and his team. If you don't know | |
36 | Unionfs, I recommend you to try and know it before using aufs. Some | |
37 | terminology in aufs follows Unionfs's. | |
38 | ||
39 | %package -n kernel%{_alt_kernel}-fs-aufs | |
40 | Summary: Linux driver for aufs | |
41 | Summary(pl.UTF-8): Sterownik dla Linuksa do aufs | |
42 | Release: %{_rel}@%{_kernel_ver_str} | |
43 | Group: Base/Kernel | |
44 | Requires(post,postun): /sbin/depmod | |
45 | %if %{with dist_kernel} | |
46 | %requires_releq_kernel_up | |
47 | Requires(postun): %releq_kernel_up | |
48 | %endif | |
49 | ||
50 | %description -n kernel%{_alt_kernel}-fs-aufs | |
51 | This is driver for aufs for Linux. | |
52 | ||
53 | This package contains Linux module. | |
54 | ||
55 | %description -n kernel%{_alt_kernel}-fs-aufs -l pl.UTF-8 | |
56 | Sterownik dla Linuksa do aufs. | |
57 | ||
58 | Ten pakiet zawiera moduł jądra Linuksa. | |
59 | ||
60 | %package -n kernel%{_alt_kernel}-smp-fs-aufs | |
61 | Summary: Linux SMP driver for aufs | |
62 | Summary(pl.UTF-8): Sterownik dla Linuksa SMP do aufs | |
63 | Release: %{_rel}@%{_kernel_ver_str} | |
64 | Group: Base/Kernel | |
65 | Requires(post,postun): /sbin/depmod | |
66 | %if %{with dist_kernel} | |
67 | %requires_releq_kernel_smp | |
68 | Requires(postun): %releq_kernel_smp | |
69 | %endif | |
70 | ||
71 | %description -n kernel%{_alt_kernel}-smp-fs-aufs | |
72 | This is driver for aufs for Linux. | |
73 | ||
74 | This package contains Linux SMP module. | |
75 | ||
76 | %description -n kernel%{_alt_kernel}-smp-fs-aufs -l pl.UTF-8 | |
77 | Sterownik dla Linuksa do aufs. | |
78 | ||
79 | Ten pakiet zawiera moduł jądra Linuksa SMP. | |
80 | ||
81 | %prep | |
82 | %setup -qn %{name} | |
518cfd38 | 83 | sed 's/$(CONFIG_AUFS)/m/; %{!?debug:s/$(CONFIG_AUFS_DEBUG.*)/n/}; s/$(CONFIG_AUFS_HINOTIFY)/n/' -i fs/aufs/Makefile |
84 | cp -a include/linux fs/aufs | |
4734e1ff ER |
85 | |
86 | %build | |
87 | %if %{with kernel} | |
518cfd38 | 88 | %build_kernel_modules -C fs/aufs -m aufs \ |
89 | EXTRA_CFLAGS="-DCONFIG_AUFS_BRANCH_MAX_CHAR -DCONFIG_AUFS_FAKE_DM -DCONFIG_AUFS_MODULE -UCONFIG_AUFS_KSIZE_PATCH %{?debug:-DCONFIG_AUFS_DEBUG}" | |
4734e1ff ER |
90 | %endif |
91 | ||
92 | %install | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %if %{with kernel} | |
518cfd38 | 96 | %install_kernel_modules -m fs/aufs/aufs -d fs |
4734e1ff ER |
97 | %endif |
98 | ||
99 | %clean | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
102 | %post -n kernel%{_alt_kernel}-fs-aufs | |
103 | %depmod %{_kernel_ver} | |
104 | ||
105 | %postun -n kernel%{_alt_kernel}-fs-aufs | |
106 | %depmod %{_kernel_ver} | |
107 | ||
108 | %post -n kernel%{_alt_kernel}-smp-fs-aufs | |
109 | %depmod %{_kernel_ver}smp | |
110 | ||
111 | %postun -n kernel%{_alt_kernel}-smp-fs-aufs | |
112 | %depmod %{_kernel_ver}smp | |
113 | ||
114 | %if %{with kernel} | |
115 | %if %{with up} || %{without dist_kernel} | |
116 | %files -n kernel%{_alt_kernel}-fs-aufs | |
117 | %defattr(644,root,root,755) | |
118 | /lib/modules/%{_kernel_ver}/fs/*.ko* | |
119 | %endif | |
120 | ||
121 | %if %{with smp} && %{with dist_kernel} | |
122 | %files -n kernel%{_alt_kernel}-smp-fs-aufs | |
123 | %defattr(644,root,root,755) | |
124 | /lib/modules/%{_kernel_ver}smp/fs/*.ko* | |
125 | %endif | |
126 | %endif | |
127 | ||
128 | %if %{with userspace} | |
129 | %files | |
130 | %defattr(644,root,root,755) | |
131 | %doc README History | |
132 | %endif |