Summary: Utilities for the ncpfs filesystem, a NetWare client for Linux.
Name: ncpfs
%define pversion 2.2.0.18
Version: %{pversion}
Release: 3vl1
Copyright:  GPL
Source: ftp://ftp.platan.vc.cvut.cz/pub/linux/ncpfs/ncpfs-%{version}/ncpfs-%{pversion}.tgz
Group: Applications/System
Requires: ipxutils
Buildroot: %{_tmppath}/%{name}-%{version}-root

%description
Ncpfs is a filesystem which understands the Novell NetWare(TM) NCP
protocol.  Functionally, NCP is used for NetWare the way NFS is used
in the TCP/IP world.  For a Linux system to mount a NetWare
filesystem, it needs a special mount program.  The ncpfs package
contains such a mount program plus other tools for configuring and
using the ncpfs filesystem.

Install the ncpfs package if you need to use the ncpfs filesystem
to use Novell NetWare files or services.

%package -n ipxutils
Summary: Tools for configuring and debugging IPX interfaces and networks.
Group: Applications/System

%description -n ipxutils
The ipxutils package includes utilities for configuring and debugging
IPX interfaces and networks under Linux. IPX is the low-level protocol
used by Novell's NetWare file server system to transfer data.

Install ipxutils if you need to configure IPX networking on your
network.

%prep
%setup -q -n ncpfs-%{pversion}

%build
%configure --disable-pam --disable-function-sections
make
make -C ipxdump
mv ipxdump/README ipxdump/README.ipxdump

%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT/sbin
mkdir -p $RPM_BUILD_ROOT/usr/sbin
%makeinstall install-dev libsodir=$RPM_BUILD_ROOT/usr/lib

# Move ipx_configure/ipx_internal_net to permit /usr from NFS
for i in ipx_configure ipx_internal_net ipx_interface
do
	mv $RPM_BUILD_ROOT/usr/bin/$i $RPM_BUILD_ROOT/sbin/$i
done

install -m755 ipxdump/ipxdump ipxdump/ipxparse $RPM_BUILD_ROOT/usr/bin/

# these could be SUID root, but it's a security hole
chmod 755 $RPM_BUILD_ROOT/usr/bin/ncpmount $RPM_BUILD_ROOT/usr/bin/ncpumount 
ln -s mount.ncp $RPM_BUILD_ROOT/sbin/mount.ncpfs
ln -s ../usr/bin/ncpmount $RPM_BUILD_ROOT/sbin/mount.ncp

strip --strip-unneeded $RPM_BUILD_ROOT/usr/lib/libncp*.so.*

# file list
find $RPM_BUILD_ROOT -type f -or -type l | \
	grep -v ipx | grep -v mount.ncp.8| \
	sed -e "s|$RPM_BUILD_ROOT||g" | \
	sed -e "s|/usr/bin/nwsfind|%attr(4755,root,root) /usr/bin/nwsfind|g" > rpm.files

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT
rm -f rpm.files

%files -f rpm.files
%defattr(-,root,root)
%doc BUGS COPYING Changes FAQ README 

%files -n ipxutils
%defattr(-,root,root)
%doc ipx-1.0/COPYING ipx-1.0/README
%doc ipxdump/README.ipxdump
/sbin/ipx_*
/usr/bin/ipx*
%{_mandir}/man8/ipx*

%changelog
* Mon Jun 11 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
- 2.2.0.18-3vl1

* Fri Jul 21 2000 Bill Nottingham <notting@redhat.com>
- fix absolute symlink

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Sat Jun 10 2000 Bill Nottingham <notting@redhat.com>
- update to 2.2.0.18

* Mon May 22 2000 Bill Nottingham <notting@redhat.com>
- simply link mount.ncp to ncpmount

* Tue Apr 18 2000 Bill Nottingham <notting@redhat.com>
- build on alpha

* Fri Mar 31 2000 Bill Nottingham <notting@redhat.com>
- fix handling of large keys (#10454)

* Thu Feb  3 2000 BIll Nottingham <notting@redhat.com>
- fix shared library

* Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
- fix description

* Tue Jan 11 2000 Bill Nottingham <notting@redhat.com>
- update to 2.2.0.17

* Thu Jul 15 1999 Bill Nottingham <notting@redhat.com>
- add patch to update to 2.2.0.16.a (#4051)

* Tue Jul  6 1999 Bill Nottingham <notting@redhat.com>
- oops, left ipx_interface out of %files

* Mon Jun 14 1999 Bill Nottingham <notting@redhat.com>
- update to 2.2.0.16
- fix mount.ncp USER arg

* Thu May 13 1999 Bill Nottingham <notting@redhat.com>
- update to 2.2.0.15

* Tue May 11 1999 Bill Nottingham <notting@redhat.com>
- update to 2.2.0.14
- fix bug in slist/nwsfind
- move ipxdump docs to the package that it's in...

* Tue Apr  6 1999 Bill Nottingham <notting@redhat.com>
- turn off setuid on nwsfind
- move ipxutils to using ncpfs versioning for sanity reasons

* Fri Mar 26 1999 Bill Nottingham <notting@redhat.com>
- doesn't work on alpha, apparently
- add a mount.ncp mount helper

* Mon Mar 22 1999 Bill Nottingham <notting@redhat.com>
- remove dangling symlink

* Tue Feb 23 1999 Bill Nottingham <notting@redhat.com>
- update to 2.2.0.12

* Fri Jan 22 1999 Bill Nottingham <notting@redhat.com>
- build for arm. Yuk.

* Wed Dec  9 1998 Bill Nottingham <notting@redhat.com>
- update to 2.2.0.11

* Fri Sep 11 1998 Jeff Johnson <jbj@redhat.com>
- update to 2.2.0.

* Fri Jul 10 1998 Jeff Johnson <jbj@redhat.com>
- exclusively i386 for now.

* Tue Jul  7 1998 Jeff Johnson <jbj@redhat.com>
- move ipx_configure/ipx_internal_net to /sbin to permit /usr from NFS.

* Thu May 07 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Mon Apr 13 1998 Cristian Gafton <gafton@redhat.com>
- manhattan rebuild
- there is a new version out, 2.0.12, but it contains RSA crypto code, so
  it's of no use for us. :-(
- buildroot and spec file cleanup

* Thu Dec 18 1997 Erik Troan <ewt@redhat.com>
- uid_t, gid_t, mode_t fixes for glibc 2.0.5 and linux 2.0.x

* Wed Oct 23 1997 Michael Fulbright <msf@redhat.com>
- added a few file which were missing from the file list

* Sun Oct 19 1997 Erik Troan <ewt@redhat.com>
- updated to 2.0.11
- massive hacking for glibc

* Thu Mar 06 1997 Michael K. Johnson <johnsonm@redhat.com>
- nwrights program now included in package.
