]> git.pld-linux.org Git - packages/aufs.git/blob - aufs.spec
- spin_lock conflict with unionfs
[packages/aufs.git] / aufs.spec
1 #
2 # Conditional build:
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
8 %if %{without kernel}
9 %undefine       with_dist_kernel
10 %endif
11
12 %define         subver          20080517
13 %define         prel            0.%{subver}.%{rel}
14
15 %define         rel             1
16 Summary:        aufs - Another Unionfs
17 Summary(pl.UTF-8):      aufs (Another Unionfs) - inny unionfs
18 Name:           aufs
19 Version:        0
20 Release:        %{prel}
21 License:        GPL v2
22 Group:          Base/Kernel
23 Source0:        %{name}-%{subver}.tar.bz2
24 # Source0-md5:  61a932836cdb0f34e9aed6a6a6697547
25 Patch0:         %{name}-vserver.patch
26 URL:            http://aufs.sourceforge.net/
27 %if %{with kernel}
28 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.25.2}
29 BuildRequires:  rpmbuild(macros) >= 1.379
30 %endif
31 BuildRequires:  sed >= 4.0
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
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
52 %package -n kernel%{_alt_kernel}-fs-aufs
53 Summary:        Linux driver for aufs
54 Summary(pl.UTF-8):      Sterownik dla Linuksa do aufs
55 Release:        %{prel}@%{_kernel_ver_str}
56 Group:          Base/Kernel
57 Requires(post,postun):  /sbin/depmod
58 %if %{with dist_kernel}
59 %requires_releq_kernel
60 Requires(postun):       %releq_kernel
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
73 %prep
74 %setup -qn %{name}
75 %patch0 -p1
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
84 cp -a include/linux fs/aufs
85
86 %build
87 %if %{with kernel}
88 if [ -f %{_kernelsrcdir}/include/linux/vs_base.h ]; then
89         isvserver="-DVSERVER"
90 fi
91 %build_kernel_modules -C fs/aufs -m aufs \
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 \
98                 -UCONFIG_AUFS_DLGT \
99                 %{?debug:-DCONFIG_AUFS_DEBUG} \
100                 $isvserver"
101 %endif
102
103 %if %{with userspace}
104 %{__make} -C util \
105         CC="%{__cc}" \
106         CFLAGS="%{rpmcflags} -DCONFIG_AUFS_BRANCH_MAX_127"
107 %endif
108
109 %install
110 rm -rf $RPM_BUILD_ROOT
111
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
118 %if %{with kernel}
119 %install_kernel_modules -m fs/aufs/aufs -d kernel/fs/aufs
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
131 %if %{with kernel}
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*
136 %endif
137
138 %if %{with userspace}
139 %files
140 %defattr(644,root,root,755)
141 %doc README History
142 %attr(755,root,root) %{_sbindir}/*
143 %{_mandir}/man5/*
144 %endif
This page took 0.077932 seconds and 3 git commands to generate.