]> git.pld-linux.org Git - packages/aufs.git/blob - aufs.spec
- baaaad shadzik, baaaad :)
[packages/aufs.git] / aufs.spec
1 #
2 # TODO:
3 # - define CONFIG_ option directly
4 #
5 # Conditional build:
6 %bcond_without  dist_kernel     # allow non-distribution kernel
7 %bcond_without  kernel          # don't build kernel modules
8 %bcond_without  userspace       # don't build userspace programs
9 %bcond_with     verbose         # verbose build (V=1)
10
11 %if %{without kernel}
12 %undefine       with_dist_kernel
13 %endif
14
15 %if "%{_alt_kernel}" != "%{nil}"
16 %undefine       with_userspace
17 %endif
18
19 %define         subver          20090315
20 %define         prel            0.%{subver}.%{rel}
21
22 %define         pname           aufs
23 %define         rel             1
24 Summary:        aufs - Another Unionfs
25 Summary(pl.UTF-8):      aufs (Another Unionfs) - inny unionfs
26 Name:           %{pname}%{_alt_kernel}
27 Version:        0
28 Release:        %{prel}
29 License:        GPL v2
30 Group:          Base/Kernel
31 Source0:        %{pname}-%{subver}.tar.bz2
32 # Source0-md5:  f2cb8c2dcf40ed076b1fcdcb1e91412e
33 Patch0:         %{pname}-vserver.patch
34 #Patch1:                %{pname}-disable-security_inode_permission.patch
35 Patch2:         %{pname}-fixes.patch
36 #Patch3:                %{pname}-spin_lock.patch
37 Patch4:         %{pname}-apparmor.patch
38 Patch5:         %{pname}-br-xfs-fix.patch
39 Patch6:         %{pname}-vfsub.c.patch
40 URL:            http://aufs.sourceforge.net/
41 %if %{with kernel}
42 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.25.2}
43 BuildRequires:  rpmbuild(macros) >= 1.379
44 %endif
45 BuildRequires:  sed >= 4.0
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 In the early days, aufs was entirely re-designed and re-implemented
50 Unionfs. After many original ideas, approaches, improvements and
51 implementations, it becomes totally different from Unionfs while
52 keeping the basic features. Unionfs is being developed by Professor
53 Erez Zadok at Stony Brook University and his team. If you don't know
54 Unionfs, I recommend you to try and know it before using aufs. Some
55 terminology in aufs follows Unionfs's.
56
57 %description -l pl.UTF-8
58 Początkowo aufs był całkowicie przeprojektowanym i od nowa
59 zaimplementowanym unionfs-em. Po wielu oryginalnych pomysłach,
60 podejściach, poprawkach i implementacjach stał sie całkowicie innym
61 niż unionfs zachowując podstawowe możliwości. unionfs jest rozwijany
62 przez profesora Ereza Zadoka w Stony Brook University i jego zespół.
63 Nie znający unionfs-a powinni spróbować go i poznać przed używaniem
64 aufs-a. Część terminologii wywodzi się z unionfs-a.
65
66 %package -n kernel%{_alt_kernel}-fs-aufs
67 Summary:        Linux driver for aufs
68 Summary(pl.UTF-8):      Sterownik dla Linuksa do aufs
69 Release:        %{prel}@%{_kernel_ver_str}
70 Group:          Base/Kernel
71 Requires(post,postun):  /sbin/depmod
72 %if %{with dist_kernel}
73 %requires_releq_kernel
74 Requires(postun):       %releq_kernel
75 %endif
76
77 %description -n kernel%{_alt_kernel}-fs-aufs
78 This is driver for aufs for Linux.
79
80 This package contains Linux module.
81
82 %description -n kernel%{_alt_kernel}-fs-aufs -l pl.UTF-8
83 Sterownik dla Linuksa do aufs.
84
85 Ten pakiet zawiera moduł jądra Linuksa.
86
87 %prep
88 %setup -qn %{pname}
89 %patch0 -p1
90 #%patch1 -p1
91 %patch2 -p1
92 #%patch3 -p1
93 if [ -d %{_kernelsrcdir}/security/apparmor ]; then
94 %patch4 -p1
95 fi
96 %patch5 -p1
97 if [ -d %{_kernelsrcdir}/fs/unionfs ]; then
98 %patch6 -p0
99 fi
100
101 cp -a include/linux fs/aufs25
102
103 %build
104 %if %{with kernel}
105 if [ -f %{_kernelsrcdir}/include/linux/vs_base.h &&
106      ! -d %{_kernelsrcdir}/security/apparmor ]; then
107         isvserver="-DVSERVER"
108 fi
109 %ifarch %{x8664} ia64 ppc64 sparc64
110         ino_t64="-DCONFIG_AUFS_INO_T_64"
111 %endif
112
113 export CONFIG_AUFS=m
114 export CONFIG_AUFS_BR_XFS=y
115 %build_kernel_modules -C fs/aufs25 -m aufs \
116         EXTRA_CFLAGS+=" \
117                 -DCONFIG_AUFS_BRANCH_MAX_127 \
118                 -DCONFIG_AUFS_BRANCH_MAX_CHAR \
119                 -DCONFIG_AUFS_FAKE_DM \
120                 -DCONFIG_AUFS_MODULE \
121                 -UCONFIG_AUFS_KSIZE_PATCH \
122                 -UCONFIG_AUFS_DLGT \
123 %if "%{_alt_kernel}" != "vanilla"
124                 -DCONFIG_AUFS_UNIONFS23_PATCH \
125                 -DCONFIG_AUFS_UNIONFS22_PATCH \
126                 -DCONFIG_AUFS_SPLICE_PATCH \
127 %endif
128                 %{?debug:-DCONFIG_AUFS_DEBUG} \
129                 $isvserver \
130                 $ino_t64"
131 %endif
132
133 %if %{with userspace}
134 %{__make} -C util \
135         CC="%{__cc}" \
136         CFLAGS="%{rpmcflags} -DCONFIG_AUFS_BRANCH_MAX_127"
137 %endif
138
139 %install
140 rm -rf $RPM_BUILD_ROOT
141
142 %if %{with userspace}
143 install -d $RPM_BUILD_ROOT{%{_mandir}/man5,%{_sbindir}}
144 install util/{mount.aufs,umount.aufs,auplink,aulchown} $RPM_BUILD_ROOT%{_sbindir}
145 install util/aufs.5 $RPM_BUILD_ROOT%{_mandir}/man5/
146 %endif
147
148 %if %{with kernel}
149 %install_kernel_modules -m fs/aufs25/aufs -d kernel/fs/aufs
150 %endif
151
152 %clean
153 rm -rf $RPM_BUILD_ROOT
154
155 %post   -n kernel%{_alt_kernel}-fs-aufs
156 %depmod %{_kernel_ver}
157
158 %postun -n kernel%{_alt_kernel}-fs-aufs
159 %depmod %{_kernel_ver}
160
161 %if %{with kernel}
162 %files -n kernel%{_alt_kernel}-fs-aufs
163 %defattr(644,root,root,755)
164 %dir /lib/modules/%{_kernel_ver}/kernel/fs/aufs
165 /lib/modules/%{_kernel_ver}/kernel/fs/aufs/*.ko*
166 %endif
167
168 %if %{with userspace}
169 %files
170 %defattr(644,root,root,755)
171 %doc README.aufs1 README.aufs2 History
172 %attr(755,root,root) %{_sbindir}/*
173 %{_mandir}/man5/*
174 %endif
This page took 0.063932 seconds and 3 git commands to generate.