/[packages]/cauldron/autofs/current/SPECS/autofs.spec
ViewVC logotype

Contents of /cauldron/autofs/current/SPECS/autofs.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 133582 - (show annotations) (download)
Mon Aug 15 15:17:15 2011 UTC (12 years, 7 months ago) by guillomovitch
File size: 3239 byte(s)
- new version
- drop obsoletes 4->5 transition post scripts
- spec cleanup

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

  ViewVC Help
Powered by ViewVC 1.1.30