File ncpfs.spec of Package ncpfs

#
# spec file for package ncpfs (Version 2.2.6)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



%define cups_lib_dir %{_prefix}/lib/cups
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
  %define _fillupdir /var/adm/fillup-templates
%endif
Name:           ncpfs
BuildRequires:  pam-devel
License:        GPL-2.0-or-later
Group:          Productivity/Networking/Novell
AutoReqProv:    on
Version:        2.2.6
Release:        161
PreReq:         %insserv_prereq %fillup_prereq
Summary:        Tools for Accessing Novell File Systems
Source:         ftp://platan.vc.cvut.cz/pub/linux/ncpfs/ncpfs-%{version}.tar.bz2
Source1:        ncpfs.hu.po.bz2
Source2:        baselibs.conf
Source10:       ncpfs-ipxmount
Source11:       ncpfs-ipxmount.sysconfig
Source12:       ncpfs-example.tar.bz2
Source20:       cups-novell.pl
Patch403:       ncpfs-hg-commit-403.patch
Patch404:       ncpfs-hg-commit-404.patch
Patch405:       ncpfs-hg-commit-405.patch
Patch406:       ncpfs-hg-commit-406.patch
Patch407:       ncpfs-hg-commit-407.patch
Patch408:       ncpfs-hg-commit-408.patch
Patch409:       ncpfs-hg-commit-409.patch
Patch410:       ncpfs-hg-commit-410.patch
Patch411:       ncpfs-hg-commit-411.patch
Patch412:       ncpfs-hg-commit-412.patch
Patch413:       ncpfs-hg-commit-413.patch
Patch414:       ncpfs-hg-commit-414.patch
Patch415:       ncpfs-hg-commit-415.patch
Patch416:       ncpfs-hg-commit-416.patch
Patch417:       ncpfs-hg-commit-417.patch
Patch419:       ncpfs-hg-commit-419.patch
Patch420:       ncpfs-hg-commit-420.patch
Patch421:       ncpfs-hg-commit-421.patch
Patch422:       ncpfs-hg-commit-422.patch
Patch423:       ncpfs-hg-commit-423.patch
Patch424:       ncpfs-hg-commit-424.patch
Patch425:       ncpfs-hg-commit-425.patch
Patch426:       ncpfs-hg-commit-426.patch
Patch427:       ncpfs-hg-commit-427.patch
Patch428:       ncpfs-hg-commit-428.patch
Patch429:       ncpfs-hg-commit-429.patch
Patch430:       ncpfs-hg-commit-430.patch
Patch431:       ncpfs-hg-commit-431.patch
Patch432:       ncpfs-hg-commit-432.patch
Patch433:       ncpfs-hg-commit-433.patch
Patch434:       ncpfs-hg-commit-434.patch
Patch435:       ncpfs-hg-commit-435.patch
Patch436:       ncpfs-hg-commit-436.patch
Patch437:       ncpfs-hg-commit-437.patch
Patch438:       ncpfs-hg-commit-438.patch
Patch439:       ncpfs-hg-commit-439.patch
Patch440:       ncpfs-hg-commit-440.patch
Patch441:       ncpfs-hg-commit-441.patch
Patch442:       ncpfs-hg-commit-442.patch
Patch443:       ncpfs-hg-commit-443.patch
Patch444:       ncpfs-hg-commit-444.patch
Patch445:       ncpfs-hg-commit-445.patch
Patch446:       ncpfs-hg-commit-446.patch
Patch447:       ncpfs-hg-commit-447.patch
Patch448:       ncpfs-hg-commit-448.patch
Patch449:       ncpfs-hg-commit-449.patch
Patch450:       ncpfs-hg-commit-450.patch
Patch451:       ncpfs-hg-commit-451.patch
Patch452:       ncpfs-hg-commit-452.patch
Patch453:       ncpfs-hg-commit-453.patch
Patch454:       ncpfs-hg-commit-454.patch
Patch455:       ncpfs-hg-commit-455.patch
Patch456:       ncpfs-hg-commit-456.patch
Patch457:       ncpfs-hg-commit-457.patch
Patch458:       ncpfs-hg-commit-458.patch
Patch1002:      ncpfs.LDFLAGS.patch
Patch1003:      ncpfs.pam_ncp_auth.syslog.patch
Patch1005:      ncpfs.offsetof.patch
Patch1006:      ncpfs.mount_hang.patch
Patch1007:      ncpfs-2.2.6-mount-issue-ver2.patch
Patch1008:      ncpfs-2_2_6_partial.patch

%description
With this program, you can mount Netware server file systems under
Linux. You can even print Linux documents on printers attached to a
Novell server.

%package devel
Summary:        Tools for Accessing Novell Filesystems
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description devel
This package contains the libraries and header files to link against
libncp.

You can mount Netware-server filesystems under Linux using this little
tool. You can even print Linux documents on printers attached to the
Novell server.

%prep
%autosetup -p1

%build
tar xfvj %{SOURCE12}
cp %{S:1} hu.po.bz2
bunzip2 hu.po.bz2
mv hu.po po
CFLAGS="$RPM_OPT_FLAGS" \
%configure \
	--enable-pam \
	--disable-warnings
make

%install
mkdir -p $RPM_BUILD_ROOT/etc/init.d 
mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT%{_fillupdir}
mkdir -p $RPM_BUILD_ROOT%{cups_lib_dir}/backend
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:%{_builddir}/ncpfs-%{version}/lib"
make \
DESTDIR=$RPM_BUILD_ROOT \
LIB_PAM_SECURITY=/%{_lib}/security \
install install-dev
rm $RPM_BUILD_ROOT/usr/bin/ncplogout
mv contrib/pam/README{,.pam}
install -m 755 %{SOURCE10} $RPM_BUILD_ROOT/etc/init.d/ipxmount
ln -sv ../../etc/init.d/ipxmount $RPM_BUILD_ROOT/usr/sbin/rcipxmount
cp -av %{SOURCE11} $RPM_BUILD_ROOT%{_fillupdir}/sysconfig.%{name}
chmod -R a+rX ncpfs-example
install -m 755 %{SOURCE20} $RPM_BUILD_ROOT%{cups_lib_dir}/backend/novell
%find_lang %{name}

%preun
%stop_on_removal ipxmount

%post
/sbin/ldconfig
%{fillup_and_insserv ipxmount}

%postun
/sbin/ldconfig
%restart_on_update ipxmount
%{insserv_cleanup}

%files -n ncpfs -f %{name}.lang
%doc BUGS Changes COPYING FAQ README ncpfs*.lsm
%doc contrib/pam/README.pam
%doc ncpfs-example
%attr(-,root,root) /etc/init.d/*
%attr(-,root,root) /sbin/*
%attr(-,root,root) /usr/sbin/*
%attr(4750,root,trusted) /usr/bin/nwsfind
%attr(4750,root,trusted) /usr/bin/ncplogin
%attr(4750,root,trusted) /usr/bin/ncpmap
%attr(4750,root,trusted) /usr/bin/ncpmount
%attr(4750,root,trusted) /usr/bin/ncpumount
/usr/bin/ipx_*
/usr/bin/ncopy
/usr/bin/nprint
/usr/bin/nsend
/usr/bin/nwauth
/usr/bin/nwbocreate
/usr/bin/nwbols
/usr/bin/nwboprops
/usr/bin/nwborm
/usr/bin/nwbpadd
/usr/bin/nwbpcreate
/usr/bin/nwbprm
/usr/bin/nwbpset
/usr/bin/nwbpvalues
/usr/bin/nwdir
/usr/bin/nwdpvalues
/usr/bin/nwfsctrl
/usr/bin/nwfsinfo
/usr/bin/nwfstime
/usr/bin/nwgrant
/usr/bin/nwlistsalvage
/usr/bin/nwpasswd
/usr/bin/nwpjmv
/usr/bin/nwpqjob
/usr/bin/nwpurge
/usr/bin/nwrevoke
/usr/bin/nwrights
/usr/bin/nwsalvage
/usr/bin/nwtrustee
/usr/bin/nwtrustee2
/usr/bin/nwuserlist
/usr/bin/nwvolinfo
/usr/bin/p*
/usr/bin/slist
%{_libdir}/libncp.so.*
/%{_lib}/security/pam_ncp_auth.so
%doc /usr/share/man/man?/*
%{_fillupdir}/*
%{cups_lib_dir}

%files devel
/usr/include/ncp
%{_libdir}/libncp.a
%{_libdir}/libncp.so

%changelog
openSUSE Build Service is sponsored by