8b007e4
# No FUSE on RHEL5
8b007e4
%if %{?el5:1}0
8b007e4
%define _without_fuse 1
8b007e4
%endif
8b007e4
8b007e4
Name:           afpfs-ng
8b007e4
Version:        0.8.1
8b007e4
Release:        2%{?dist}
8b007e4
Summary:        Apple Filing Protocol client
8b007e4
8b007e4
Group:          System Environment/Base
8b007e4
License:        GPLv2
8b007e4
URL:            http://alexthepuffin.googlepages.com/home
8b007e4
Source0:        http://downloads.sourceforge.net/afpfs-ng/%{name}-%{version}.tar.bz2
8b007e4
Patch0:         afpfs-ng-0.8.1-overflows.patch
8b007e4
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
8b007e4
8b007e4
%{?!_without_fuse:BuildRequires: fuse-devel}
8b007e4
BuildRequires: libgcrypt-devel gmp-devel readline-devel
8b007e4
8b007e4
%description
8b007e4
A command line client to access files exported from Mac OS system via
8b007e4
AppleTalk or TCP using Apple Filing Protocol.
8b007e4
%{?!_without_fuse:The FUSE filesystem module for AFP is in fuse-afp package}
8b007e4
8b007e4
8b007e4
%if %{?!_without_fuse:1}0
8b007e4
%package -n fuse-afp
8b007e4
Summary:        FUSE driver for AFP filesystem
8b007e4
Group:          System Environment/Base
8b007e4
8b007e4
%description -n fuse-afp
8b007e4
A FUSE file system server to access files exported from Mac OS system
8b007e4
via AppleTalk or TCP using Apple Filing Protocol.
8b007e4
The command line client for AFP is in fuse-afp package
8b007e4
%endif
8b007e4
8b007e4
8b007e4
%package devel
8b007e4
Summary:        Development files for afpfs-ng
8b007e4
Group:          Development/Libraries
8b007e4
Requires:       %{name} = %{version}
8b007e4
8b007e4
%description devel
8b007e4
Library for dynamic linking and header files of afpfs-ng.
8b007e4
8b007e4
8b007e4
%prep
8b007e4
%setup -q
8b007e4
%patch0 -p1 -b .overflows
8b007e4
8b007e4
8b007e4
%build
8b007e4
# make would rebuild the autoconf infrastructure due to the following:
8b007e4
# Prerequisite `configure.ac' is newer than target `Makefile.in'.
8b007e4
# Prerequisite `aclocal.m4' is newer than target `Makefile.in'.
8b007e4
# Prerequisite `configure.ac' is newer than target `aclocal.m4'.
8b007e4
touch --reference aclocal.m4 configure.ac Makefile.in
8b007e4
8b007e4
%configure %{?_without_fuse:--disable-fuse} --disable-static
8b007e4
make %{?_smp_mflags}
8b007e4
8b007e4
8b007e4
%install
8b007e4
rm -rf $RPM_BUILD_ROOT
8b007e4
make install DESTDIR=$RPM_BUILD_ROOT
8b007e4
install -d $RPM_BUILD_ROOT%{_includedir}/afpfs-ng
8b007e4
cp -p include/* $RPM_BUILD_ROOT%{_includedir}/afpfs-ng
8b007e4
8b007e4
8b007e4
%clean
8b007e4
rm -rf $RPM_BUILD_ROOT
8b007e4
8b007e4
8b007e4
%files
8b007e4
%defattr(-,root,root,-)
8b007e4
%{_bindir}/afpcmd
8b007e4
%{_bindir}/afpgetstatus
8b007e4
%{_mandir}/man1/afpcmd.1*
8b007e4
%{_mandir}/man1/afpgetstatus.1*
8b007e4
%{_libdir}/*.so.*
8b007e4
%exclude %{_libdir}/*.la
8b007e4
%doc COPYING AUTHORS ChangeLog docs/README docs/performance docs/FEATURES.txt docs/REPORTING-BUGS.txt
8b007e4
8b007e4
8b007e4
%if %{?!_without_fuse:1}0
8b007e4
%files -n fuse-afp
8b007e4
%defattr(-,root,root,-)
8b007e4
%{_bindir}/afp_client
8b007e4
%{_bindir}/afpfs
8b007e4
%{_bindir}/afpfsd
8b007e4
%{_bindir}/mount_afp
8b007e4
%{_mandir}/man1/afp_client.1*
8b007e4
%{_mandir}/man1/afpfsd.1*
8b007e4
%{_mandir}/man1/mount_afp.1*
8b007e4
%doc COPYING AUTHORS ChangeLog
8b007e4
%endif
8b007e4
8b007e4
8b007e4
%files devel
8b007e4
%defattr(-,root,root,-)
8b007e4
%{_includedir}/afpfs-ng
8b007e4
%{_libdir}/*.so
8b007e4
8b007e4
8b007e4
%post -p /sbin/ldconfig
8b007e4
8b007e4
8b007e4
%postun -p /sbin/ldconfig
8b007e4
8b007e4
8b007e4
%changelog
8b007e4
* Thu Mar 19 2009 Lubomir Rintel <lkundrak@v3.sk> - 0.8.1-2
8b007e4
- Add more include files (Jan F. Chadima)
8b007e4
- Don't needlessly build static library (Stefan Kasal)
8b007e4
- Fix fuse-afp summary (Stefan Kasal)
8b007e4
- Remove redundant license file from -devel (Stefan Kasal)
8b007e4
8b007e4
* Mon Oct 6 2008 Lubomir Rintel <lkundrak@v3.sk> - 0.8.1-1
8b007e4
- Initial packaging attempt