Tony

I'm not sure if the .spec file was messed up halfway, as I see a EOF
line after your reply of how to star xinetd.

At present, my .spec file is as follows:

Summary:   fam 2.7.0
Name:      fam
Version:   2.7.0
Release:   2
Packager: Tony Earnshaw <[EMAIL PROTECTED]>
Vendor: Translucent Systems BV
License: SGI OSS
Group: Network System Environment/Daemons
Provides: fam
Requires: gcc, autoconf, automake, rpm >= 4
Source: http://oss.sgi.com/projects/fam/download/fam-2.7.0.tar.gz
Patch1: fam-2.7.0-dnotify-1.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

%description
fam is a server that tracks changes to the filesystem and relays these
changes to interested applications.  Applications such as fm(1G) and
mailbox(1) present an up-to-date view of the filesystem.  In the absence
of fam, these applications and others like them are forced to poll the
filesystem to detect changes.  fam is more efficient.

%define _man_dir %{_prefix}/man
%define _sh_man_dir %{_prefix}/share/man
%define _doc_dir %{_prefix}/share/doc/%{name}-base-%{version}

%package base
Summary: Base fam daemon, conf and documentation
Group: Network System Environment/Daemons
%description base
fam is a server that tracks changes to the filesystem and relays these
changes to interested applications.  Applications such as fm(1G) and
mailbox(1) present an up-to-date view of the filesystem.  In the absence
of fam, these applications and others like them are forced to poll the
filesystem to detect changes.  fam is more efficient.

%package devel
Summary: Development header and docs for fam
Group: Network System Environment/Daemons
Requires: base
%description devel
Development header and docs for the SGI fam daemon

%prep
%setup -q
%patch1 -p1 -b .orig
%build
set -x
umask 022

chmod a+w configure

CXXFLAGS="-Wno-deprecated" \
./configure \
       --prefix=/
make

%install
rm -fr $RPM_BUILD_ROOT
%makeinstall
%{__mkdir_p} 
$RPM_BUILD_ROOT{%_sysconfdir,%_sbindir,%_includedir,%_libdir,%_man_dir/man3,%_man_dir/man5,%_man_dir/man8}
%{__install} -m 644 $RPM_BUILD_DIR/%{name}-%{version}/conf/fam.conf
$RPM_BUILD_ROOT%{_sysconfdir}
%{__install} -m 644 $RPM_BUILD_DIR/%{name}-%{version}/include/fam.h
$RPM_BUILD_ROOT%{_includedir}
cp -pr $RPM_BUILD_DIR/%{name}-%{version}/lib/.libs/* $RPM_BUILD_ROOT%{_libdir}
pushd $RPM_BUILD_ROOT%{_libdir}
ln -s libfam.0.0.0 libfam.so.0
popd
%{__install} -m 644 $RPM_BUILD_DIR/%{name}-%{version}/man/*.3
$RPM_BUILD_ROOT%_man_dir/man3
%{__install} -m 644 $RPM_BUILD_DIR/%{name}-%{version}/man/*.5
$RPM_BUILD_ROOT%_man_dir/man5
%{__install} -m 644 $RPM_BUILD_DIR/%{name}-%{version}/man/*.8
$RPM_BUILD_ROOT%_man_dir/man8
%{__install} -m 755 $RPM_BUILD_DIR/%{name}-%{version}/src/famd
$RPM_BUILD_ROOT%{_sbindir}

cat $RPM_BUILD_ROOT%_man_dir/man5/famd.conf.5 | sed -s
's|\/usr\/local\/etc|\/etc|' > /var/tmp/famd.conf.5; mv
/var/tmp/famd.conf.5 $RPM_BUILD_ROOT%_man_dir/man5
cat $RPM_BUILD_ROOT%_man_dir/man8/famd.8 | sed -s
's|\/usr\/local\/etc|\/etc|' > /var/tmp/famd.8; mv /var/tmp/famd.8
$RPM_BUILD_ROOT%_man_dir/man8


%files base
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING INSTALL NEWS README TODO
%{_sbindir}/famd
%{_libdir}/*
%{_sysconfdir}/fam.conf
%_man_dir/man5/*
%_man_dir/man8/*
%_sh_man_dir/man5/*
%_sh_man_dir/man8/*

%files devel
%defattr(-,root,root)
%{_includedir}/fam.h
%_man_dir/man3/*
%_sh_man_dir/man3/*

%post base
ldconfig
cat <<EOF>>%{_doc_dir}/INSTALL
EOF

if ! grep fam /etc/rpc > /dev/null 2>&1; then
 echo "fam         391002  famd             # File Alteration Monitor"
>> /etc/rpc
 fi

if [ ! -f "/etc/xinetd.d/fam" ]; then
 cat << EOF > /etc/xinetd.d/fam
{
 type            = RPC UNLISTED
 socket_type     = stream
 user            = root
 group           = nobody
 server          = /usr/sbin/famd
 wait            = yes
 protocol        = tcp
 rpc_version     = 2
 rpc_number      = 391002
 disable         = yes
}
EOF
fi

%clean
rm -rf $RPM_BUILD_ROOT %{_tmppath}/rpm-tmp*

%changelog
* Thu Dec 29 2005 Tony Earnshaw <[EMAIL PROTECTED]>
- fam-2.7.0-dnotify-1.patch, thanks Jonathan Chong <[EMAIL PROTECTED]>
 and of course Jim Gifford (jim at linuxfromscratch dot org), whose patch it is
* Thu Jun 23 2005 Tony Earnshaw <[EMAIL PROTECTED]> 2.7.0-1
- Initial package



--
Jonathan Chong

http://www.arsenal-now.com/
http://www.arsenal-mania.com/
http://www.ashburrn.com/
http://www.jonathan-chong.com/


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to