X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=autofs.spec;h=5d2ea69e56f83bd09554fddb0ee48e4e448529bc;hb=4a2d320263cfb72ac2f7a8caf3be57580a9ebaa2;hp=9013f63e47510b8ee0a1c095fa9039599bab68c3;hpb=f12849ca96cc0b1e54ab96eb7cbf6d36d3de56d8;p=packages%2Fautofs.git diff --git a/autofs.spec b/autofs.spec index 9013f63..5d2ea69 100644 --- a/autofs.spec +++ b/autofs.spec @@ -1,110 +1,182 @@ +# TODO: +# - change /net to something FHS-compliant ? +# - upgrade to autofs5 - maybe separate package? +# - build of ldap-related things has some errors Summary: autofs daemon -Summary(de): autofs daemon +Summary(de): autofs daemon +Summary(es): Servidor autofs Summary(fr): démon autofs -Summary(pl): Demon autofs +Summary(pl): Demon autofs +Summary(pt_BR): Servidor autofs Summary(tr): autofs sunucu süreci Name: autofs -Version: 3.1.3 -Release: 5 -Copyright: GPL +Version: 4.1.4 +Release: 3.6 +Epoch: 1 +License: GPL v2+ Group: Daemons -Group(pl): Serwery -Source0: ftp://ftp.kernel.org/pub/linux/daemons/autofs/%{name}-%{version}.tar.bz2 -Source1: autofs.init -Patch: autofs.patch -Buildroot: /tmp/%{name}-%{version}-root -Prereq: /sbin/chkconfig +Source0: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v4/%{name}-%{version}.tar.bz2 +# Source0-md5: 7e3949114c00665b4636f0c318179657 +Source1: %{name}.init +Source2: %{name}-auto.master +Source3: %{name}-auto.media +Source4: %{name}-auto.net +Source5: %{name}.sysconfig +Patch0: %{name}-open_max.patch +Patch1: %{name}-hesiod-includes.patch +Patch2: http://www.kernel.org/pub/linux/daemons/autofs/v4/%{name}-4.1.4-misc-fixes.patch +Patch3: http://www.kernel.org/pub/linux/daemons/autofs/v4/%{name}-4.1.4-multi-parse-fix.patch +Patch4: http://www.kernel.org/pub/linux/daemons/autofs/v4/%{name}-4.1.4-no-unlink-upstream.patch +Patch5: http://www.kernel.org/pub/linux/daemons/autofs/v4/%{name}-4.1.4-non-replicated-ping.patch +Patch6: http://www.kernel.org/pub/linux/daemons/autofs/v4/%{name}-4.1.4-auto.smb-cifs.patch +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: bind-devel +BuildRequires: openldap-devel >= 2.3.0 +BuildRequires: rpmbuild(macros) >= 1.268 +Requires(post,preun): /sbin/chkconfig Requires: mktemp +Requires: rc-scripts +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _sysconfdir /etc/autofs %description autofs is a daemon which automatically mounts filesystems when you use -them, and unmounts them later when you are not using them. This can +them, and unmounts them later when you are not using them. This can include network filesystems, CD-ROMs, floppies, and so forth. %description -l de -autofs ist ein Dämon, der Dateisysteme automatisch montiert, wenn sie -benutzt werden, und sie später bei Nichtbenutzung wieder demontiert. -Dies kann Netz-Dateisysteme, CD-ROMs, Disketten und ähnliches einschließen. +autofs ist ein Dämon, der Dateisysteme automatisch montiert, wenn sie +benutzt werden, und sie später bei Nichtbenutzung wieder demontiert. +Dies kann Netz-Dateisysteme, CD-ROMs, Disketten und ähnliches +einschließen. + +%description -l es +Autofs es un servidor que monta automáticamente sistemas de archivos +cuando los usa, y los desmonta, más tarde, al terminar de usarlos. +Incluyendo sistemas de archivo en red, CD-ROMS, disquetes, etc. %description -l fr autofs est un démon qui monte automatiquement les systèmes de fichiers -lorsqu'on les utilise et les démonte lorsqu'on ne les utilise plus. Cela -inclus les systèmes de fichiers réseau, les CD-ROMs, les disquettes, etc. +lorsqu'on les utilise et les démonte lorsqu'on ne les utilise plus. +Cela inclus les systèmes de fichiers réseau, les CD-ROMs, les +disquettes, etc. %description -l pl Autofs jest demonem, który montuje automatycznie systemy plików je¿eli -je u¿ywasz i odmontowuje pó¼niej, je¿eli ich nie u¿ywasz. Mo¿e montowaæ -sieciowy system plików, CD-romy, stacje dyskietek i inne. +je u¿ywasz i odmontowuje pó¼niej, je¿eli ich nie u¿ywasz. Mo¿e +montowaæ sieciowy system plików, CD-romy, stacje dyskietek i inne. + +%description -l pt_BR +O autofs é um servidor que monta automaticamente sistemas de arquivos +quando estes forem usados, desmontando-os mais tarde quando não +estiverem mais em uso. Incluindo sistemas de arquivo em rede, CD-ROMS, +disquetes, etc. %description -l tr -autofs, kullanýlan dosya sistemlerini gerek olunca kendiliðinden baðlar -ve kullanýmlarý sona erince yine kendiliðinden çözer. Bu iþlem, að dosya -sistemleri, CD-ROM'lar ve disketler üzerinde yapýlabilir. +autofs, kullanýlan dosya sistemlerini gerek olunca kendiliðinden +baðlar ve kullanýmlarý sona erince yine kendiliðinden çözer. Bu iþlem, +að dosya sistemleri, CD-ROM'lar ve disketler üzerinde yapýlabilir. + +%package ldap +Summary: LDAP lookup module for autofs +Summary(pl): Modu³ LDAP dla autofs +Summary(pt_BR): Suporte a mapas LDAP para o pacote autofs +Group: Daemons +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description ldap +This package contains the autofs module necessary to use automount +maps stored on an LDAP server. + +%description ldap -l pl +Ten pakiet zawiera modu³ autofs potrzebny do u¿ywania map automounta +trzymanych na serwerze LDAP. %prep %setup -q -%patch -p1 +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 %build -LDFLAGS="-s"; export LDFLAGS +chmod a+w configure +%{__aclocal} +%{__autoconf} %configure - -make + +%{__make} \ + initdir=/etc/rc.d/init.d \ + CC="%{__cc}" \ + DAEMON_CFLAGS="%{rpmcflags}" %install rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT{/misc,/net,%{_sbindir},%{_libdir}/autofs,%{_mandir}/man{5,8}} \ + $RPM_BUILD_ROOT/etc/{rc.d/init.d,autofs,sysconfig} -install -d $RPM_BUILD_ROOT/{misc,%{_sbindir},%{_libdir}/autofs,%{_mandir}/man{5,8}} \ - $RPM_BUILD_ROOT/etc/{rc.d/init.d,autofs} +%{__make} install \ + INSTALLROOT=$RPM_BUILD_ROOT -make install \ - sbindir=$RPM_BUILD_ROOT%{_sbindir} \ - mandir=$RPM_BUILD_ROOT%{_mandir} \ - autofslibdir=$RPM_BUILD_ROOT%{_libdir}/autofs +install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/autofs -install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/autofs -install samples/auto.* $RPM_BUILD_ROOT/etc/autofs +install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/auto.master +install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/auto.media +install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/auto.net +install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/autofs +mv $RPM_BUILD_ROOT/etc/auto.smb $RPM_BUILD_ROOT%{_sysconfdir} -touch $RPM_BUILD_ROOT/etc/autofs/auto.{home,misc,var,tmp} +touch $RPM_BUILD_ROOT%{_sysconfdir}/auto.{home,var,tmp} -strip --strip-unneeded $RPM_BUILD_ROOT%{_libdir}/autofs/* +# Do some cleanups: +rm -f $RPM_BUILD_ROOT/etc/auto.{master,misc,net} -gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man[58]/* \ - NEWS README +%clean +rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add autofs -if test -r /var/lock/subsys/automount; then - /etc/rc.d/init.d/autofs restart 1>&2 -else - echo "Run \"/etc/rc.d/init.d/autofs start\" to start autofs daemon." +# triggerpostun would get called after %%post +if [ -f /var/lock/subsys/automount ]; then + mv /var/lock/subsys/{automount,autofs} fi +%service autofs restart "autofs daemon" %preun if [ "$1" = "0" ]; then + %service autofs stop /sbin/chkconfig --del autofs - if [ -f /var/lock/subsys/automount ]; then - /etc/rc.d/init.d/autofs stop 1>&2 - fi fi -%clean -rm -rf $RPM_BUILD_ROOT - %files %defattr(644,root,root,755) -%doc {NEWS,README}.gz +%doc CHANGELOG CREDITS README* %attr(754,root,root) %config /etc/rc.d/init.d/autofs %dir %{_sysconfdir} -%attr(644,root,root) %config %verify(not size mtime md5) %{_sysconfdir}/* +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/autofs +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.home +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.master +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.media +%attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.net +%attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.smb +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.tmp +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/auto.var %attr(755,root,root) %{_sbindir}/automount - -%dir /misc +%dir /net %dir %{_libdir}/autofs -%attr(755,root,root) %{_libdir}/autofs/* +%attr(755,root,root) %{_libdir}/autofs/mount_* +%attr(755,root,root) %{_libdir}/autofs/parse_* +%attr(755,root,root) %{_libdir}/autofs/lookup_[!l]* %{_mandir}/man[58]/* + +%files ldap +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/autofs/lookup_ldap.so