File ifolder3.spec of Package ifolder3

#
# spec file for package ifolder3
#
# Copyright (c) 2011 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/
#

# norootforbuild


Name:           ifolder3

BuildRequires:  aspell-en bison cairo cairo-devel fdupes flex gcc-c++ gconf-sharp2 gnome-sharp2 gnutls-devel gtk-sharp2 gtk-sharp2-complete gtk2 gtk2-devel libglade2-devel libgnomeprintui-devel libgnomeui-devel libpng-devel libwnck-devel log4net mDNSResponder mono-core mono-data mono-devel mono-web pango pango-devel simias xsp
BuildRequires:  libtool
%if 0%{suse_version} > 1120
BuildRequires:  simias-devel
%endif
%define buildnum 10090

Url:            http://www.ifolder.com
%define prefix /usr
%define sysconfdir /etc
License:        GPLv2
Group:          System/GUI/Other
AutoReqProv:    on
Requires:       simias >= 1.8.3
Requires:       gconf-sharp2
Requires:       gnome-sharp2
Requires:       gtk-sharp2
Requires:       xsp >= 1.2.5
#Obsoletes:      %{name} < 3.7.2.10090.1
Version:        3.8.0.10264.3
Release:        6
Summary:        File Sharing and Collaboration Tool
Source:         ifolder3.tar.gz
Patch:          ifolder3-lib64.patch
Patch1:         ifolder3-buildfix.patch
Patch2:         ifolder3-ext.patch
Patch3:         ifolder-gtk-sharp.patch
Patch4:         ifolder-Makefile.patch
Patch5:         ifolder3-libeel.patch
Patch6:         ifolder3-gtk-deprecated.patch
ExclusiveArch:  %ix86 x86_64
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%gconf_schemas_prereq
#=============================================================================

%description
The iFolder Project is a project focused on file sharing and
collaboration, released under the GPL and supporting the iFolder 3
protocol from Novell.

%if 0%{suse_version} > 1120

%package devel
License:        GPLv2
Summary:        Development files for ifolder
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Requires:       simias-devel

%description devel
Development files for iFolder.  The iFolder Project is a project
focused on file sharing and collaboration, released under the GPL and
supporting the iFolder 3 protocol from Novell.

%endif

%prep
export BUILDNUM=%{buildnum}
%setup -q -n %{name}
%patch
%patch1 
%patch2
%patch3
%patch4
%patch5
%patch6
#=============================================================================

%build
export BUILDNUM=%{buildnum}
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
./autogen.sh --prefix=%{prefix} --sysconfdir=%{sysconfdir}
rm dependencies/external/tools/gsoap/linux-2.7/soapcpp2
rm dependencies/external/tools/gsoap/linux-2.7/wsdl2h
pushd dependencies/external/tools/gsoap/linux-2.7  
        cd src  
                make -f MakefileMacOSX COFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" LIBS=""  
                cp soapcpp2 ..  
        cd ..  
        cd wsdl  
                make -f MakefileSolaris COFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" LIBS="-lnsl"  
        cd ..  
popd
make
#make dist
#=============================================================================

%install
export BUILDNUM=%{buildnum}
%{__rm} -rf $RPM_BUILD_ROOT
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
make DESTDIR=$RPM_BUILD_ROOT install
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
# Cleanup filelist, remove not needed files
rm $RPM_BUILD_ROOT/%{prefix}/share/ifolder3/COPYING
rm $RPM_BUILD_ROOT/%{prefix}/%_lib/libtrayicon.la \
   $RPM_BUILD_ROOT/%{prefix}/%_lib/libtrayicon.a
#
# Set up iFolder in the menu for Gnome
#
    if test "%{prefix}" != "/usr"; then
		if ! [ -d  $RPM_BUILD_ROOT/usr/share/applications]; then
			mkdir -p $RPM_BUILD_ROOT/usr/share/applications
		fi
        cp -f $RPM_BUILD_ROOT%{prefix}/share/applications/ifolder.desktop $RPM_BUILD_ROOT/usr/share/applications
    fi
#
# Set up a sym link to /usr/bin so iFolder will run
#
if ! [ -d  $RPM_BUILD_ROOT/usr/bin ]; then
	mkdir -p $RPM_BUILD_ROOT/usr/bin
fi
%find_lang %{name}
%find_gconf_schemas
%fdupes $RPM_BUILD_ROOT/%{prefix}/share/ifolder3
#=============================================================================

%pre -f %{name}.schemas_pre

%post 
/sbin/ldconfig
echo "Restart the system before you start using iFolder"

%preun -f %{name}.schemas_preun

%posttrans -f %{name}.schemas_posttrans

%postun -p /sbin/ldconfig

%files -f %{name}.schemas_list -f %{name}.lang
%defattr(644,root,root, 755)
%doc COPYING
%attr(755,root,root)  %{prefix}/bin/*
%{sysconfdir}/UI.log4net
%dir %{prefix}/share/ifolder3
%{prefix}/share/ifolder3/*
%attr(755,root,root) %{prefix}/%_lib/TrayIcon.dll
%attr(755,root,root) %dir %{prefix}/%_lib/simias
%attr(755,root,root) %{prefix}/%_lib/Novell.iFolder.UI.gtk.dll
%attr(755,root,root) %{prefix}/%_lib/Novell.iFolder.dll
%attr(755,root,root) %{prefix}/%_lib/libifolderclient.so
%attr(755,root,root) %{prefix}/%_lib/libifolderclient.so.0
%attr(755,root,root) %{prefix}/%_lib/libifolderclient.so.0.0.0
# .so files are needed in main package
%attr(755,root,root) %{prefix}/%_lib/libtrayicon.so
%attr(755,root,root) %{prefix}/%_lib/libtrayicon.so.0
%attr(755,root,root) %{prefix}/%_lib/libtrayicon.so.0.0.0    
%attr(755,root,root) %dir %{prefix}/%_lib/simias/web
%attr(755,root,root) %dir %{prefix}/%_lib/simias/web/bin
%attr(755,root,root) %{prefix}/%_lib/simias/web/bin/*
%attr(755,root,root) %{prefix}/%_lib/simias/web/*
%{prefix}/share/applications/ifolder.desktop

%if 0%{suse_version} > 01120

%files devel
%defattr(644,root,root, 755)
%endif
%dir %{prefix}/include/ifolder3
%{prefix}/include/ifolder3/*
%attr(644,root,root) %{prefix}/%_lib/pkgconfig/*

%changelog
openSUSE Build Service is sponsored by