# Note that this is NOT a relocatable package
%define	name	gnome-vfs
%define	ver	1.0.5
%define	rel	13vl4

Summary:	The GNOME virtual file-system libraries
Name:		gnome-vfs
Version:	1.0.5
Release:	14%{?_dist_release}
License:	LGPL
Group:		System Environment/Libraries
Source:		ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/1.0/%{name}-%{ver}.tar.gz
Source2:        macros.tar.gz
Source3:        gnome-vfs-pofiles.tar.gz

Patch1: gnome-vfs-1.0.5-charset-and-rpmsave.patch
Patch2: gnome-vfs-1.0.5-lib64.patch
Patch3: gnome-vfs-1.0.5-mimesniffcrash-backport.patch
Patch4: gnome-vfs-1.0.5-compilation-fix.patch

Patch100: gnome-vfs-1.0.5-configure.patch

URL:		http://www.gnome.org/
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
Requires:	glib >= 1.2.4
Requires:	GConf >= 0.9
Requires:	oaf >= 0.3.0
Requires:	gnome-mime-data
BuildRequires: GConf-devel, oaf-devel, glib-devel, libxml-devel, zlib-devel
BuildRequires: popt-devel, bzip2-devel, ORBit-devel, libX11-devel
BuildRequires: gnome-libs-devel, pkgconfig, intltool, gettext, openjade
BuildRequires: gnome-mime-data
BuildRequires: automake14

%description
GNOME VFS is the GNOME virtual file system. It is the foundation of the
Nautilus file manager. It provides a modular architecture and ships with
several modules that implement support for file systems, http, ftp and others.
It provides a URI-based API, a backend supporting asynchronous file operations,
a MIME type manipulation library and other features.


%package devel
Summary: Libraries and include files for developing GNOME VFS applications.
Group: Development/Libraries
Requires: %{name} = %{version}
Requires: GConf-devel
Requires: oaf-devel


%description devel
This package provides the necessary development libraries for writing
GNOME VFS modules and applications that use the GNOME VFS APIs.


%prep
%setup -q

%patch1 -p1 -b .charset-and-rpmsave

if [ "%{_lib}" == "lib64" ] ; then
%patch2 -p1 -b .lib64
fi
%patch3 -p1 -b .mimecrash
%patch4 -p1 -b .compilation-fix

tar zxf %{SOURCE2}

# unpack translations
tar zxf %{SOURCE3} 

%patch100 -p1 -b .configure


# workaround glibc21.m4 being installed
mkdir tmp-macros
cp libgnomevfs/libcharset/*.m4 tmp-macros
rm tmp-macros/glibc21.m4

# for patch 1
aclocal-1.4 -I macros -I tmp-macros
automake-1.4
autoheader
autoconf

%build
if pkg-config openssl ; then
        CPPFLAGS=`pkg-config --cflags openssl`; export CPPFLAGS
        LDFLAGS=`pkg-config --libs-only-L openssl`; export LDFLAGS
fi

%configure --disable-gtk-doc
export tagname=CC
make LIBTOOL=/usr/bin/libtool

%install
rm -rf %{buildroot}

export tagname=CC
%makeinstall LIBTOOL=/usr/bin/libtool

%find_lang %{name}

# Remove files which we won't include in this package.
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT/%{_libdir}/libgnomevfs-pthread.a
rm -f $RPM_BUILD_ROOT/%{_libdir}/vfs/modules/*.la
rm -f $RPM_BUILD_ROOT/%{_libdir}/vfs/modules/*.a

%clean
rm -rf %{buildroot}


%post -p /sbin/ldconfig


%postun -p /sbin/ldconfig


%files -f %{name}.lang
%defattr(-, root, root)

%doc AUTHORS COPYING ChangeLog NEWS README
%dir %{_sysconfdir}/vfs
%dir %{_sysconfdir}/vfs/modules
%config %{_sysconfdir}/vfs/modules/*.conf
%{_libdir}/lib*.so.*
%{_libdir}/libgnomevfs-pthread.so
%{_libdir}/vfs/extfs/*
%{_libdir}/vfs/modules/*.so
#{_datadir}/gtk-doc/html/*


%files devel
%defattr(-, root, root)
%{_bindir}/gnome-vfs-config
%{_includedir}/gnome-vfs-1.0
%{_libdir}/gnome-vfs-1.0
%{_libdir}/lib*.a
%{_libdir}/lib*.so
%{_libdir}/*.sh
#{_libdir}/vfs/modules/*.a


%changelog
* Sat Oct 25 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.5-14vl5
- applied new versioning policy

* Sat Jul 28 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.5-13vl4
- rebuild with new toolchain
- added Patch100

* Sun Apr 25 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.0.5-13vl3
- rebuild with openssl-0.9.7d
- s/Copyright/License/
- added BuildRequires gettext

* Sun Apr 13 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 1.0.5-13vl2
- added BuildRequires intltool 

* Sat Apr 12 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 1.0.5-13vl1
- synced with Rawhide

* Sun Dec 15 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.5-0vl1
- new upstream release
- split mime stuff to gnome-mime-data.

* Fri Nov 23 2001 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.0.3-0vl1
- updated to the new upstream release

* Fri May 18 2001 Akira TAGOH <tagoh@gnome.gr.jp> 1.0.1-0vl2
- Added mime of .ttc

* Wed May  9 2001 Akira TAGOH <tagoh@gnome.gr.jp> 1.0.1-0vl1
- New upstream release.

* Thu Apr 12 2001 Akira TAGOH <tagoh@gnome.gr.jp> 1.0-0vl3
- Include the API documents.

* Mon Apr  9 2001 Akira TAGOH <tagoh@gnome.gr.jp> 1.0-0vl2
- Added some build depends.
- Fixed relative config.

* Tue Apr  3 2001 Akira TAGOH <tagoh@gnome.gr.jp> 1.0-0vl1
- New upstream release.
- Use find_lang macro.

* Fri Mar  9 2001 Akira TAGOH <tagoh@gnome.gr.jp> 0.6.2-0vl1
- New upstream release.

* Wed Dec 27 2000 Akira TAGOH <tagoh@gnome.gr.jp> 0.4.2-0vl1
- Build for Vine

* Tue Feb 22 2000 Ross Golder <rossigee@bigfoot.com>
- Integrate into source tree

