]> git.pld-linux.org Git - packages/am-utils.git/blobdiff - am-utils.spec
- replace non-existent %chkconfig_{post,preun} macros with
[packages/am-utils.git] / am-utils.spec
index f5016a19bbd46cae5fcea49b5c4ed2210296f0fe..0a84b0b897010dc02c01f6086f03320156d953c3 100644 (file)
@@ -1,30 +1,31 @@
-Summary: Automount utilities including an updated version of Amd.
-Name: am-utils
-Version: 6.0
-Serial: 1
-Release: 3
-Copyright: BSD
-Group: System Environment/Daemons
-Source: ftp://shekel.mcl.cs.columbia.edu/pub/am-utils/am-utils-%{version}.tar.gz
-Source1: am-utils.init
-Source2: am-utils.conf
-Source3: am-utils.sysconf
-Patch0: am-utils-6.0a16-linux.patch
-Patch1: am-utils-6.0a16-alpha.patch
-Patch2: am-utils-6.0a16-glibc21.patch
-Prereq: /sbin/install-info
-Requires: portmap
-BuildRoot: /var/tmp/am-utils-root
-Prereq: /sbin/chkconfig
-Obsoletes: amd
+Summary:       Automount utilities including an updated version of Amd
+Summary(pl):   Narzêdzia do automatycznego montowania systemów plików
+Name:          am-utils
+Version:       6.0.3
+Release:       1
+License:       BSD
+Group:         Daemons
+Group(de):     Server
+Group(pl):     Serwery
+Source0:       ftp://shekel.mcl.cs.columbia.edu/pub/am-utils/%{name}-%{version}.tar.gz
+Source1:       %{name}.init
+Source2:       %{name}.conf
+Source3:       %{name}.sysconf
+Patch0:                %{name}-6.0a16-linux.patch
+Patch1:                %{name}-6.0a16-alpha.patch
+Patch2:                %{name}-6.0a16-glibc21.patch
+Requires:      portmap
+Prereq:                /sbin/chkconfig
+Obsoletes:     amd
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %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.  
+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.
@@ -39,24 +40,31 @@ mounting and unmounting filesystems.
 
 %build
 cd aux ; autoconf ; mv -f configure .. ; cd ..
-CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr \
-       --enable-shared --sysconfdir=/etc --enable-libs=-lnsl
+CFLAGS="%{rpmcflags}" ./configure \
+       --prefix=%{_prefix} \
+       --enable-shared \
+       --sysconfdir=%{_sysconfdir} \
+       --enable-libs=-lnsl
+       
 # fun with autoconf
 touch `find -name Makefile.in`
-make
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-make install prefix=$RPM_BUILD_ROOT/usr sysconfdir=`pwd`/etc
-mkdir -p $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
-install -m 600 $RPM_SOURCE_DIR/am-utils.conf $RPM_BUILD_ROOT/etc/amd.conf
-install -m 755 $RPM_SOURCE_DIR/am-utils.sysconf $RPM_BUILD_ROOT/etc/sysconfig/amd
-install -m 755 $RPM_SOURCE_DIR/am-utils.init $RPM_BUILD_ROOT/etc/rc.d/init.d/amd
-strip $RPM_BUILD_ROOT/usr/sbin/* $RPM_BUILD_ROOT/usr/bin/* || :
-gzip -q9f $RPM_BUILD_ROOT/usr/info/*info*
-mkdir -p $RPM_BUILD_ROOT/.automount
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/{sysconfig,rc.d/init.d}
+
+%{__make} install prefix=$RPM_BUILD_ROOT%{_prefix} sysconfdir=`pwd`%{_sysconfdir}
+install $RPM_SOURCE_DIR/am-utils.conf $RPM_BUILD_ROOT%{_sysconfdir}/amd.conf
+install $RPM_SOURCE_DIR/am-utils.sysconf $RPM_BUILD_ROOT/etc/sysconfig/amd
+install $RPM_SOURCE_DIR/am-utils.init $RPM_BUILD_ROOT/etc/rc.d/init.d/amd
+
+gzip -9nf AUTHORS TODO BUGS NEWS README* ChangeLog
+
+install -d $RPM_BUILD_ROOT/.automount
+
 # get rid of some lame scripts
-file $RPM_BUILD_ROOT/usr/sbin/* | \
+file $RPM_BUILD_ROOT%{_sbindir}/* | \
        grep -v ELF | grep -v am-eject | \
        cut -f 1 -d':' | xargs rm -f
 
@@ -65,31 +73,25 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/ldconfig
-/sbin/chkconfig --add amd
-/sbin/install-info /usr/info/am-utils.info.gz /usr/info/dir
+NAME=amd; %chkconfig_add
+%fix_info_dir
 
 %preun
-if [ $1 = 0 ]; then
-   /sbin/install-info --delete /usr/info/am-utils.info.gz /usr/info/dir
-fi
+NAME=amd; %chkconfig_del
 
 %postun
+%fix_info_dir
 /sbin/ldconfig
-if [ $1 = 0 ]; then
-    /sbin/chkconfig --del amd
-fi
 
 %files
-%defattr(-,root,root)
-%doc doc/*.ps AUTHORS BUGS ChangeLog NEWS README* TODO
+%defattr(644,root,root,755)
+%doc doc/*.ps {AUTHORS,BUGS,ChangeLog,NEWS,README*,TODO}.gz
 %dir /.automount
-/usr/bin/pawd
-/usr/sbin/*
-/usr/man/man[58]/*
-/usr/man/man1/pawd.1
-%config /etc/amd.conf
+%config %{_sysconfdir}/amd.conf
 %config /etc/sysconfig/amd
-%config /etc/rc.d/init.d/amd
-/usr/info/*info*.gz
-/usr/lib/libamu.so
-/usr/lib/libamu.so.*
+%attr(754,root,root) /etc/rc.d/init.d/amd
+%attr(755,root,root) %{_bindir}/pawd
+%attr(755,root,root) %{_sbindir}/*
+%attr(755,root,root) %{_libdir}/*
+%{_mandir}/man[158]/*
+%{_infodir}/*
This page took 0.075608 seconds and 4 git commands to generate.