3 %bcond_without dist_kernel # allow non-distribution kernel
4 %bcond_without kernel # don't build kernel modules
5 %bcond_without userspace # don't build userspace programs
6 %bcond_with verbose # verbose build (V=1)
7 %bcond_without vserver # kernel build without vserver & grsecurity
10 %undefine with_dist_kernel
13 %define subver 20071017
14 %define prel 0.%{subver}.%{rel}
17 Summary: aufs - Another Unionfs
18 Summary(pl.UTF-8): aufs (Another Unionfs) - inny unionfs
24 Source0: %{name}-%{subver}.tar.bz2
25 # Source0-md5: dee001829acbf3a4fa857a752527b385
26 Patch0: %{name}-vserver.patch
27 URL: http://aufs.sourceforge.net/
29 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
30 BuildRequires: rpmbuild(macros) >= 1.379
32 BuildRequires: sed >= 4.0
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 In the early days, aufs was entirely re-designed and re-implemented
37 Unionfs. After many original ideas, approaches, improvements and
38 implementations, it becomes totally different from Unionfs while
39 keeping the basic features. Unionfs is being developed by Professor
40 Erez Zadok at Stony Brook University and his team. If you don't know
41 Unionfs, I recommend you to try and know it before using aufs. Some
42 terminology in aufs follows Unionfs's.
44 %description -l pl.UTF-8
45 Początkowo aufs był całkowicie przeprojektowanym i od nowa
46 zaimplementowanym unionfs-em. Po wielu oryginalnych pomysłach,
47 podejściach, poprawkach i implementacjach stał sie całkowicie innym
48 niż unionfs zachowując podstawowe możliwości. unionfs jest rozwijany
49 przez profesora Ereza Zadoka w Stony Brook University i jego zespół.
50 Nie znający unionfs-a powinni spróbować go i poznać przed używaniem
51 aufs-a. Część terminologii wywodzi się z unionfs-a.
53 %package -n kernel%{_alt_kernel}-fs-aufs
54 Summary: Linux driver for aufs
55 Summary(pl.UTF-8): Sterownik dla Linuksa do aufs
56 Release: %{prel}@%{_kernel_ver_str}
58 Requires(post,postun): /sbin/depmod
59 %if %{with dist_kernel}
60 %requires_releq_kernel
61 Requires(postun): %releq_kernel
64 %description -n kernel%{_alt_kernel}-fs-aufs
65 This is driver for aufs for Linux.
67 This package contains Linux module.
69 %description -n kernel%{_alt_kernel}-fs-aufs -l pl.UTF-8
70 Sterownik dla Linuksa do aufs.
72 Ten pakiet zawiera moduł jądra Linuksa.
82 %{!?debug:s/$(CONFIG_AUFS_DEBUG.*)/n/};
83 s/$(CONFIG_AUFS_HINOTIFY)/n/;
84 s/$(CONFIG_AUFS_EXPORT)/y/;
85 s/$(CONFIG_AUFS_SYSAUFS)/n/
87 cp -a include/linux fs/aufs
91 %build_kernel_modules -C fs/aufs -m aufs \
93 -DCONFIG_AUFS_BRANCH_MAX_127 \
94 -DCONFIG_AUFS_BRANCH_MAX_CHAR \
95 -DCONFIG_AUFS_FAKE_DM \
96 -DCONFIG_AUFS_MODULE \
97 -UCONFIG_AUFS_KSIZE_PATCH \
98 %{?debug:-DCONFIG_AUFS_DEBUG} \
99 %{?with_vserver:-DVSERVER} \
103 %if %{with userspace}
106 CFLAGS="%{rpmcflags} -DCONFIG_AUFS_BRANCH_MAX_127"
110 rm -rf $RPM_BUILD_ROOT
112 %if %{with userspace}
113 install -d $RPM_BUILD_ROOT{%{_mandir}/man5,%{_sbindir}}
114 install util/{mount.aufs,umount.aufs,auplink,aulchown} $RPM_BUILD_ROOT%{_sbindir}
115 install util/aufs.5 $RPM_BUILD_ROOT%{_mandir}/man5/
119 %install_kernel_modules -m fs/aufs/aufs -d kernel/fs/aufs
123 rm -rf $RPM_BUILD_ROOT
125 %post -n kernel%{_alt_kernel}-fs-aufs
126 %depmod %{_kernel_ver}
128 %postun -n kernel%{_alt_kernel}-fs-aufs
129 %depmod %{_kernel_ver}
132 %files -n kernel%{_alt_kernel}-fs-aufs
133 %defattr(644,root,root,755)
134 %dir /lib/modules/%{_kernel_ver}/kernel/fs/aufs
135 /lib/modules/%{_kernel_ver}/kernel/fs/aufs/*.ko*
138 %if %{with userspace}
140 %defattr(644,root,root,755)
142 %attr(755,root,root) %{_sbindir}/*