]>
Commit | Line | Data |
---|---|---|
bf531407 | 1 | # |
4734e1ff ER |
2 | # Conditional build: |
3 | %bcond_without dist_kernel # allow non-distribution kernel | |
4 | %bcond_without kernel # don't build kernel modules | |
4734e1ff ER |
5 | %bcond_without userspace # don't build userspace programs |
6 | %bcond_with verbose # verbose build (V=1) | |
7 | ||
8 | %if %{without kernel} | |
9 | %undefine with_dist_kernel | |
10 | %endif | |
11 | ||
e9863e61 | 12 | %define subver 20080517 |
46de4e94 ER |
13 | %define prel 0.%{subver}.%{rel} |
14 | ||
069b6c5a | 15 | %define rel 1 |
509b678e | 16 | Summary: aufs - Another Unionfs |
bf531407 | 17 | Summary(pl.UTF-8): aufs (Another Unionfs) - inny unionfs |
4734e1ff ER |
18 | Name: aufs |
19 | Version: 0 | |
46de4e94 | 20 | Release: %{prel} |
4734e1ff ER |
21 | License: GPL v2 |
22 | Group: Base/Kernel | |
46de4e94 | 23 | Source0: %{name}-%{subver}.tar.bz2 |
e9863e61 | 24 | # Source0-md5: 61a932836cdb0f34e9aed6a6a6697547 |
509b678e | 25 | Patch0: %{name}-vserver.patch |
4734e1ff ER |
26 | URL: http://aufs.sourceforge.net/ |
27 | %if %{with kernel} | |
069b6c5a | 28 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.25.2} |
509b678e | 29 | BuildRequires: rpmbuild(macros) >= 1.379 |
4734e1ff | 30 | %endif |
518cfd38 | 31 | BuildRequires: sed >= 4.0 |
4734e1ff ER |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
34 | %description | |
35 | In the early days, aufs was entirely re-designed and re-implemented | |
36 | Unionfs. After many original ideas, approaches, improvements and | |
37 | implementations, it becomes totally different from Unionfs while | |
38 | keeping the basic features. Unionfs is being developed by Professor | |
39 | Erez Zadok at Stony Brook University and his team. If you don't know | |
40 | Unionfs, I recommend you to try and know it before using aufs. Some | |
41 | terminology in aufs follows Unionfs's. | |
42 | ||
bf531407 JB |
43 | %description -l pl.UTF-8 |
44 | Początkowo aufs był całkowicie przeprojektowanym i od nowa | |
45 | zaimplementowanym unionfs-em. Po wielu oryginalnych pomysłach, | |
46 | podejściach, poprawkach i implementacjach stał sie całkowicie innym | |
47 | niż unionfs zachowując podstawowe możliwości. unionfs jest rozwijany | |
48 | przez profesora Ereza Zadoka w Stony Brook University i jego zespół. | |
49 | Nie znający unionfs-a powinni spróbować go i poznać przed używaniem | |
50 | aufs-a. Część terminologii wywodzi się z unionfs-a. | |
51 | ||
4734e1ff ER |
52 | %package -n kernel%{_alt_kernel}-fs-aufs |
53 | Summary: Linux driver for aufs | |
54 | Summary(pl.UTF-8): Sterownik dla Linuksa do aufs | |
46de4e94 | 55 | Release: %{prel}@%{_kernel_ver_str} |
4734e1ff ER |
56 | Group: Base/Kernel |
57 | Requires(post,postun): /sbin/depmod | |
58 | %if %{with dist_kernel} | |
509b678e | 59 | %requires_releq_kernel |
60 | Requires(postun): %releq_kernel | |
4734e1ff ER |
61 | %endif |
62 | ||
63 | %description -n kernel%{_alt_kernel}-fs-aufs | |
64 | This is driver for aufs for Linux. | |
65 | ||
66 | This package contains Linux module. | |
67 | ||
68 | %description -n kernel%{_alt_kernel}-fs-aufs -l pl.UTF-8 | |
69 | Sterownik dla Linuksa do aufs. | |
70 | ||
71 | Ten pakiet zawiera moduł jądra Linuksa. | |
72 | ||
4734e1ff ER |
73 | %prep |
74 | %setup -qn %{name} | |
509b678e | 75 | %patch0 -p1 |
509b678e | 76 | |
77 | sed ' | |
78 | s/$(CONFIG_AUFS)/m/; | |
79 | %{!?debug:s/$(CONFIG_AUFS_DEBUG.*)/n/}; | |
80 | s/$(CONFIG_AUFS_HINOTIFY)/n/; | |
81 | s/$(CONFIG_AUFS_EXPORT)/y/; | |
82 | s/$(CONFIG_AUFS_SYSAUFS)/n/ | |
83 | ' -i fs/aufs/Makefile | |
518cfd38 | 84 | cp -a include/linux fs/aufs |
4734e1ff ER |
85 | |
86 | %build | |
87 | %if %{with kernel} | |
dd9fb61b | 88 | if [ -f %{_kernelsrcdir}/include/linux/vs_base.h ]; then |
89 | isvserver="-DVSERVER" | |
90 | fi | |
518cfd38 | 91 | %build_kernel_modules -C fs/aufs -m aufs \ |
509b678e | 92 | EXTRA_CFLAGS=" \ |
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 \ | |
3b805c44 | 98 | -UCONFIG_AUFS_DLGT \ |
509b678e | 99 | %{?debug:-DCONFIG_AUFS_DEBUG} \ |
dd9fb61b | 100 | $isvserver" |
4734e1ff ER |
101 | %endif |
102 | ||
7d59a9cf | 103 | %if %{with userspace} |
104 | %{__make} -C util \ | |
105 | CC="%{__cc}" \ | |
106 | CFLAGS="%{rpmcflags} -DCONFIG_AUFS_BRANCH_MAX_127" | |
107 | %endif | |
108 | ||
4734e1ff ER |
109 | %install |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
7d59a9cf | 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/ | |
116 | %endif | |
117 | ||
4734e1ff | 118 | %if %{with kernel} |
0f3a7497 | 119 | %install_kernel_modules -m fs/aufs/aufs -d kernel/fs/aufs |
4734e1ff ER |
120 | %endif |
121 | ||
122 | %clean | |
123 | rm -rf $RPM_BUILD_ROOT | |
124 | ||
125 | %post -n kernel%{_alt_kernel}-fs-aufs | |
126 | %depmod %{_kernel_ver} | |
127 | ||
128 | %postun -n kernel%{_alt_kernel}-fs-aufs | |
129 | %depmod %{_kernel_ver} | |
130 | ||
4734e1ff | 131 | %if %{with kernel} |
4734e1ff ER |
132 | %files -n kernel%{_alt_kernel}-fs-aufs |
133 | %defattr(644,root,root,755) | |
0f3a7497 | 134 | %dir /lib/modules/%{_kernel_ver}/kernel/fs/aufs |
135 | /lib/modules/%{_kernel_ver}/kernel/fs/aufs/*.ko* | |
4734e1ff ER |
136 | %endif |
137 | ||
4734e1ff ER |
138 | %if %{with userspace} |
139 | %files | |
140 | %defattr(644,root,root,755) | |
141 | %doc README History | |
7d59a9cf | 142 | %attr(755,root,root) %{_sbindir}/* |
143 | %{_mandir}/man5/* | |
4734e1ff | 144 | %endif |