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