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)
10 %undefine with_dist_kernel
14 Summary: Aufs - Another Unionfs
20 Source0: %{name}-20070220.tar.bz2
21 # Source0-md5: 81bc264f83a3cdd579e0bffcbf5f0d74
22 URL: http://aufs.sourceforge.net/
24 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.14}
25 BuildRequires: rpmbuild(macros) >= 1.330
27 BuildRequires: sed >= 4.0
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
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}
44 Requires(post,postun): /sbin/depmod
45 %if %{with dist_kernel}
46 %requires_releq_kernel_up
47 Requires(postun): %releq_kernel_up
50 %description -n kernel%{_alt_kernel}-fs-aufs
51 This is driver for aufs for Linux.
53 This package contains Linux module.
55 %description -n kernel%{_alt_kernel}-fs-aufs -l pl.UTF-8
56 Sterownik dla Linuksa do aufs.
58 Ten pakiet zawiera moduł jądra Linuksa.
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}
65 Requires(post,postun): /sbin/depmod
66 %if %{with dist_kernel}
67 %requires_releq_kernel_smp
68 Requires(postun): %releq_kernel_smp
71 %description -n kernel%{_alt_kernel}-smp-fs-aufs
72 This is driver for aufs for Linux.
74 This package contains Linux SMP module.
76 %description -n kernel%{_alt_kernel}-smp-fs-aufs -l pl.UTF-8
77 Sterownik dla Linuksa do aufs.
79 Ten pakiet zawiera moduł jądra Linuksa SMP.
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
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}"
93 rm -rf $RPM_BUILD_ROOT
96 %install_kernel_modules -m fs/aufs/aufs -d fs
100 rm -rf $RPM_BUILD_ROOT
102 %post -n kernel%{_alt_kernel}-fs-aufs
103 %depmod %{_kernel_ver}
105 %postun -n kernel%{_alt_kernel}-fs-aufs
106 %depmod %{_kernel_ver}
108 %post -n kernel%{_alt_kernel}-smp-fs-aufs
109 %depmod %{_kernel_ver}smp
111 %postun -n kernel%{_alt_kernel}-smp-fs-aufs
112 %depmod %{_kernel_ver}smp
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*
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*
128 %if %{with userspace}
130 %defattr(644,root,root,755)