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