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