%define major 4 %define libname %mklibname amu %major %define develname %mklibname amu -d Summary: Automount utilities including an updated version of Amd Name: am-utils Version: 6.1.5 Release: %mkrel 11 Epoch: 2 License: BSD Group: System/Servers URL: http://www.am-utils.org/ Source: ftp://ftp.am-utils.org/pub/am-utils/%{name}/%{name}-%{version}.tar.bz2 Source1: am-utils.init Source2: am-utils.conf Source3: am-utils.sysconf Source4: am-utils.net.map Patch0: am-utils-6.0.4-nfs3.patch # RH/Fedora #203193, MDV #45007 - tmpfile usage Patch1: am-utils-6.1.5-rmtab-temp.patch # RH/Fedora #202180, MDV #45007 - amd service doesn't work Patch2: am-utils-6.1.5-nfs-version.patch # MDV #45007, from RH: UTS_RELEASE macro has been removed from the latest kernel Patch3: am-utils-6.1.5-UTS_RELEASE.patch # MDV #45007, Fedora build system bugfixes Patch4: am-utils-6.1.5-buildsys.patch # RH/Fedora #435420, MDV #45007 - CVE-2008-1078 am-utils: insecure usage of # temporary files Patch5: am-utils-6.1.5-expn-temp.patch # RH/Fedora #450754, MDV #45007 - Amd does not work with 2.6.25 Patch6: am-utils-6.1.5-nolock-toplvl.patch # RH/Fedora #566711 - am-utils: incorrect use of tcp_wrapper Patch7: am-utils-6.1.5-libwarp.patch Patch8: am-utils-6.1.5-fix-configure.patch Requires(pre): grep Requires(post): rpm-helper chkconfig info-install Requires(preun): info-install rpm-helper chkconfig Requires: rpcbind Obsoletes: amd Provides: amd BuildRequires: bison byacc flex gdbm-devel openldap-devel >= 2.0.0 texinfo BuildConflicts: db2-devel db1-devel %description Am-utils includes an updated version of Amd, the popular BSD automounter. An automounter is a program which maintains a cache of mounted filesystems. Filesystems are mounted when they are first referenced by the user and unmounted after a certain period of inactivity. Amd supports a variety of filesystems, including NFS, UFS, CD-ROMS and local drives. You should install am-utils if you need a program for automatically mounting and unmounting filesystems. %package -n %libname Group: System/Servers Summary: Shared library files for am-utils # wrongly named lib pkg (wally 01/2013) Obsoletes: %{_lib}amu2 < 2:6.1.5-10 %description -n %libname Shared library files from the am-utils package. %package -n %develname Group: Development/C Summary: Development files for am-utils Requires: %libname = %{epoch}:%version-%release Obsoletes: %mklibname amu -d 2 %description -n %develname Development headers, and files for development from the am-utils package. %prep %setup -q %apply_patches %build # generate build scripts with our autotools mkdir -p m4 %serverbuild ./bootstrap %configure2_5x \ --enable-shared \ --disable-static \ --sysconfdir=%{_sysconfdir} \ --enable-libs="-lnsl -lresolv" \ --disable-amq-mount \ --without-ldap make %install %makeinstall_std mkdir -p %{buildroot}%{_sysconfdir}/{sysconfig,rc.d/init.d} install -m 755 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/amd install -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/rc.d/init.d/amd mkdir -p %{buildroot}/.automount rm -f %{buildroot}%{_sbindir}/ctl-amd # install the default config and map files install -m 600 %{SOURCE2} %{buildroot}%{_sysconfdir}/amd.conf install -m 640 %{SOURCE4} %{buildroot}%{_sysconfdir}/amd.net rm -f %{buildroot}/amd.conf rm -f %{buildroot}/%{_sysconfdir}/*-sample rm -f %{buildroot}/amd #we don't want these find %{buildroot} -name "*.la" -delete %pre # Check if we have an old fashioned amd.conf and rename if to amd.net if [ "$1" = "0" ] ; then if grep -q "auto_dir" %{_sysconfdir}/amd.conf 2>/dev/null > /dev/null ; then # this is okay exit 0 else # this needs to be renamed. Still, if %{_sysconfdir}/amd.net exists, then # don't bother renamig it. RPM will handle it better than us here. if [ -e %{_sysconfdir}/amd.net ] ; then exit 0 else mv -f %{_sysconfdir}/amd.conf /etc/amd.net fi fi fi exit 0 %post %_post_service amd %_install_info %name %preun %_preun_service amd %_remove_install_info %name %files %doc doc/*.ps AUTHORS BUGS ChangeLog NEWS README* scripts/*-sample INSTALL COPYING %dir /.automount %{_bindir}/pawd %{_bindir}/expn %{_sbindir}/* %{_mandir}/man[58]/* %{_mandir}/man1/pawd.1* %{_mandir}/man1/expn.1* %config(noreplace) %verify(not md5) %{_sysconfdir}/amd.conf %config(noreplace) %verify(not md5) %{_sysconfdir}/amd.net %config(noreplace) %{_sysconfdir}/sysconfig/amd %config(noreplace) %{_sysconfdir}/rc.d/init.d/amd %{_infodir}/*.info* %files -n %libname %_libdir/*.so.%{major} %_libdir/*.so.%{major}.* %files -n %develname %_libdir/*.so %changelog * Fri Jan 11 2013 umeabot <umeabot> 2:6.1.5-11.mga3 + Revision: 345524 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Tue Jan 08 2013 wally <wally> 2:6.1.5-10.mga3 + Revision: 343017 - fix major - obsolete old wrongly named lib pkg with wrong major - disable static build and drop .la files - clean .spec a bit * Tue Jan 08 2013 sander85 <sander85> 2:6.1.5-9.mga3 + Revision: 342832 - Fix buildrequires + dmorgan <dmorgan> - Fix build with new autotools * Sun May 08 2011 nanardon <nanardon> 2:6.1.5-8.mga1 + Revision: 96049 - Mdv cleanup - imported package am-utils