1 |
Name: autofs |
2 |
Version: 5.0.6 |
3 |
Release: %mkrel 2 |
4 |
License: GPL |
5 |
Summary: A tool for automatically mounting and unmounting filesystems |
6 |
Group: System/Kernel and hardware |
7 |
URL: ftp://ftp.kernel.org/pub/linux/daemons/autofs |
8 |
Source0: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.bz2 |
9 |
Source1: %{name}.init |
10 |
Patch0: autofs-5.0.6-fix-ipv6-name-for-lookup-fix.patch |
11 |
Patch102: autofs-5.0.4-separate-config-files.patch |
12 |
Patch103: autofs-5.0.4-rename-configuration-file.patch |
13 |
Requires(post): rpm-helper |
14 |
Requires(preun):rpm-helper |
15 |
BuildRequires: openldap-devel |
16 |
BuildRequires: flex |
17 |
BuildRequires: bison |
18 |
BuildRequires: libsasl-devel |
19 |
BuildRequires: krb-devel |
20 |
BuildRequires: libxml2-devel |
21 |
Conflicts: autosmb |
22 |
Buildroot: %{_tmppath}/%{name}-%{version} |
23 |
|
24 |
%description |
25 |
autofs is a daemon which automatically mounts filesystems when you use |
26 |
them, and unmounts them later when you are not using them. This can |
27 |
include network filesystems, CD-ROMs, floppies, and so forth. |
28 |
|
29 |
%prep |
30 |
%setup -q -n %{name}-%{version} |
31 |
%patch0 -p 1 |
32 |
%patch102 -p 1 |
33 |
%patch103 -p 1 |
34 |
|
35 |
%build |
36 |
autoreconf |
37 |
%serverbuild |
38 |
%configure2_5x --with-mapdir=%{_sysconfdir}/%{name} \ |
39 |
--with-confdir=%{_sysconfdir}/%{name} \ |
40 |
--with-sasl=yes |
41 |
%make DONTSTRIP=1 |
42 |
|
43 |
mkdir examples |
44 |
cp samples/ldap* examples |
45 |
cp samples/autofs.schema examples |
46 |
|
47 |
rm -f README.gentoo |
48 |
|
49 |
%install |
50 |
rm -rf %{buildroot} |
51 |
mkdir -p %{buildroot}%{_sbindir} |
52 |
mkdir -p %{buildroot}%{_libdir}/autofs |
53 |
mkdir -p %{buildroot}%{_mandir}/{man5,man8} |
54 |
mkdir -p %{buildroot}%{_sysconfdir} |
55 |
|
56 |
%make install INSTALLROOT=%{buildroot} |
57 |
|
58 |
install -d -m 755 %{buildroot}%{_initrddir} |
59 |
install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name} |
60 |
|
61 |
rm -f %{buildroot}%{_sysconfdir}/init.d/%{name} |
62 |
rm -f %{buildroot}%{_mandir}/man8/autofs* |
63 |
|
64 |
cat > README.urpmi <<EOF |
65 |
Mandriva RPM specific notes |
66 |
|
67 |
setup |
68 |
----- |
69 |
Configuration handling in Mageia package differs from upstream one on several |
70 |
points: |
71 |
- the automounts daemon configuration file is %{_sysconfdir}/autofs/autofs.conf |
72 |
- the autofs service configuration file is %{_sysconfdir}/sysconfig/autofs |
73 |
|
74 |
Upgrade |
75 |
------- |
76 |
Map files have been moved from %{_sysconfdir} to %{_sysconfdir}/autofs. Upgrade |
77 |
procedure should handle the change automatically. |
78 |
LDAP usage has changed between autofs 4 and 5. The LDAP schema used has now to |
79 |
be configured explicitely in autofs configuration, so as to avoid useless |
80 |
queries. As this can't be handled by package upgrade procedure, you'll have to |
81 |
edit your configuration manually. See auto.master(5) for details. |
82 |
|
83 |
EOF |
84 |
|
85 |
# tune default configuration |
86 |
perl -pi -e 's|^BROWSE_MODE="no"|BROWSE_MODE="yes"|' \ |
87 |
%{buildroot}%{_sysconfdir}/autofs/autofs.conf |
88 |
perl -pi \ |
89 |
-e 's|^/misc\t|#/misc\t|;' \ |
90 |
-e 's|^/net\t|#/net\t|;' \ |
91 |
%{buildroot}%{_sysconfdir}/autofs/auto.master |
92 |
|
93 |
%post |
94 |
%_post_service autofs |
95 |
|
96 |
%preun |
97 |
%_preun_service autofs |
98 |
|
99 |
%files |
100 |
%doc INSTALL CHANGELOG CREDITS README* examples |
101 |
%config(noreplace) %{_sysconfdir}/autofs |
102 |
%config(noreplace) %{_sysconfdir}/sysconfig/autofs |
103 |
%{_initrddir}/%{name} |
104 |
%{_libdir}/%{name} |
105 |
%{_sbindir}/automount |
106 |
%{_mandir}/*/* |