File autofs.spec of Package autofs
#
# spec file for package autofs
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: autofs
Url: http://www.kernel.org/pub/linux/daemons/autofs/v5/
BuildRequires: bison e2fsprogs flex module-init-tools nfs-client
BuildRequires: krb5-devel libxml2-devel openldap2-devel
License: GPLv2+
Group: System/Daemons
AutoReqProv: on
Version: 5.0.5
Release: 14.<RELEASE2>
Summary: A Kernel-Based Automounter
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/%{name}-%{version}.tar.bz2
Source1: sysconfig.autofs
Source3: autofs.schema
Source4: README.SuSE.ldap
Source5: README.SuSE
Source7: NetworkManager-autofs
Source8: get-upstream-patches
%define patchdate 20101021
Patch0: autofs-%{version}-upstream-patches-%{patchdate}.bz2
Patch1: autofs-5.0.5-invalid-ghost-dirs.patch
Patch10: autofs-suse-auto_master_default.patch
Patch11: autofs-suse-autofs_init.patch
Patch12: autofs-suse-build.patch
PreReq: %fillup_prereq %insserv_prereq aaa_base
Recommends: nfs-client
%description
AutoFS is a kernel-based automounter for Linux. It automatically
mounts filesystems when you use them, and unmounts them later when
you are not using them. This can include network filesystems, CD-ROMs,
floppies, and so forth.
Authors:
--------
H. Peter Anvin <hpa@transmeta.com>
Ian Kent <raven@themaw.net>
%prep
%setup
cp %{SOURCE3} .
cp %{SOURCE4} .
cp %{SOURCE5} .
#
%patch0 -p1
%patch1 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%build
rm -f configure
autoconf -f
./configure %{_target_cpu}-suse-linux \
--libdir=%{_libdir} --mandir=%{_mandir} \
--with-confdir=/etc/sysconfig \
--disable-mount-locking \
--enable-forced-shutdown \
--enable-ignore-busy \
--with-hesiod=no \
--with-sasl
make all DONTSTRIP=1 LOCAL_CFLAGS="$RPM_OPT_FLAGS %(getconf LFS_CFLAGS)"
%install
make install INSTALLROOT=$RPM_BUILD_ROOT
ln -s ../../etc/init.d/autofs $RPM_BUILD_ROOT/usr/sbin/rcautofs
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 %{S:1} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.autofs
mkdir -p $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d
install -m 755 %{S:7} $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/autofs
# will be installed by fillup scripts
rm -f $RPM_BUILD_ROOT/etc/sysconfig/autofs
%clean
rm -rf %{buildroot}
%post
if /sbin/chkconfig -c autofs 3; then
%{insserv_force_if_yast autofs}
fi
%{fillup_only -n autofs}
%preun
%{stop_on_removal autofs}
%postun
%{insserv_cleanup}
%files
%defattr (-, root, root)
/var/adm/fillup-templates/sysconfig.autofs
%config(noreplace) /etc/auto.master
%config(noreplace) /etc/auto.misc
%config(noreplace) /etc/auto.net
%config(noreplace) /etc/auto.smb
%config(noreplace) /etc/autofs_ldap_auth.conf
%config /etc/init.d/autofs
%dir /etc/NetworkManager
%dir /etc/NetworkManager/dispatcher.d
/etc/NetworkManager/dispatcher.d/autofs
%doc COPYRIGHT README README.changer README.ncpfs README.replicated-server
%doc README.smbfs README.v5.release autofs.schema README.active-restart
%doc README.SuSE README.SuSE.ldap
%dir %{_libdir}/autofs/
%{_libdir}/autofs/
%{_mandir}/man5/*
%{_mandir}/man8/*
%{_sbindir}/rcautofs
%{_sbindir}/automount
%changelog