File simias.spec of Package simias

#
# spec file for package simias (Version 1.8.2.9141.1)
#
# Copyright (c) 2009 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:           simias
BuildRequires:  bison dos2unix e2fsprogs e2fsprogs-devel flex gcc-c++ gcc43 gcc43-c++ gconf2 glib2 glib2-devel libflaim libflaim-devel libxml2 libxml2-devel log4net mono-core mono-data mono-devel mono-web ncurses-devel pkgconfig xsp
%define buildnum 9141
Url:            http://www.ifolder.com
%define prefix /usr
%define sysconfdir /etc
License:        GPL v2 only
Group:          System/Libraries
AutoReqProv:    on
Requires:       mono-core >= 1.2.2
Requires:       mono-data >= 1.2.2
Requires:       mono-web >= 1.2.2
Requires:       log4net >= 1.2.9
Requires:       xsp >= 1.2.5
#Obsoletes:      %{name} < 1.8.2.9141.1
Version:        1.8.2.9141.1
Release:        9.<RELEASE2>
Summary:        Collection-Oriented Data Storage
Source:         simias.tar.gz
Patch:          Simias.cs.patch
Patch1:         simias-lib64.patch
Patch2:         simias-libflaim.patch
Patch3:         simias-fixes.patch
Patch4:         simias-buildfix.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
#=============================================================================

%description
Simias is a technology that will allow various types of data to be
stored and related in what is known as a collection.  Initially Simias
is the underlying data store for the iFolder project, although it has
potential to do much more.



%prep
export BUILDNUM=%{buildnum}
%setup -q -n %{name}
%if %{suse_version} > 1110
%patch -p1
%endif
%patch1
%patch2
pushd dependencies/external
%patch3 -p1
popd
%patch4 
#=============================================================================

%build
export SUSE_ASNEEDED=0
export CC=gcc-4.3
export CXX=g++-4.3
export BUILDNUM=%{buildnum}
export LIBDIR=%{_lib}
./autogen.sh --prefix=%{prefix} --with-runasclient --sysconfdir=%{sysconfdir}
## re-added from code10 (begin)
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
## re-added from code10 (end)
make
#make dist
#=============================================================================

%install
export BUILDNUM=%{buildnum}
make DESTDIR=$RPM_BUILD_ROOT install
find $RPM_BUILD_ROOT/%{prefix}/* -type f | xargs chmod 644
find $RPM_BUILD_ROOT/%{prefix}/* -type d | xargs chmod 755
chmod a+x $RPM_BUILD_ROOT/%{prefix}/%_lib/simias/web/bin/ifdata
# COPYING goes to usr/src/packages/simias
rm -rf $RPM_BUILD_ROOT/%{prefix}/share/simias/
#=============================================================================

%clean
%{__rm} -rf $RPM_BUILD_ROOT

%preun
if [ -d %{prefix}/%_lib/simias/web/bin/\$\{HOME\}/ ]
then
        rm -rf %{prefix}/%_lib/simias/web/bin/\$\{HOME\}/
fi
if [ -d %{prefix}/%_lib/simias/web/bin/\$\{APPDATA\}/ ]
then
        rm -rf %{prefix}/%_lib/simias/web/bin/\$\{APPDATA\}/
fi

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc COPYING
%attr(755,root,root) %{prefix}/bin/*
%dir %{sysconfdir}/simias
%{sysconfdir}/simias/Simias.config
%{sysconfdir}/simias/Simias.log4net
%{sysconfdir}/simias/defaults.config
%{prefix}/%_lib/pkgconfig/*
%{prefix}/%_lib/libFlaimWrapper.so
%{prefix}/%_lib/libFlaimWrapper.so.0
%{prefix}/%_lib/libFlaimWrapper.so.0.0.0
%{prefix}/%_lib/libsimias-event.so
%{prefix}/%_lib/libsimias-event.so.0
%{prefix}/%_lib/libsimias-event.so.0.0.0
%{prefix}/%_lib/libsimias-manager.a
%{prefix}/%_lib/libsimias.so
%{prefix}/%_lib/libsimias.so.0
%{prefix}/%_lib/libsimias.so.0.0.0
%dir %{prefix}/%_lib/simias
%{prefix}/%_lib/simias/*
%dir %{prefix}/include/simias/
%{prefix}/include/simias/*

%changelog
openSUSE Build Service is sponsored by