File gnustep-GNUMail.spec of Package gnustep-GNUMail

#
# spec file for package gnustep-GNUMail
#
# Copyright (c) 2015 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 _name GNUMail
%define _ver 1
%if "%_repository" == "SLE_11_SP2"
%define make_install make install DESTDIR=%{?buildroot}
%endif

Name:           gnustep-GNUMail
Version:        1.2.2
Release:        0
License:        GPL-2.0
Summary:        A GNUstep mail client
Url:            http://home.gna.org/gnustep-nonfsf/gnumail.html
Group:          Productivity/Networking/Email/Clients
Source:         %{_name}-%{version}.tar.gz

Requires:       gnustep-back

BuildRequires:  gcc-objc
BuildRequires:  gnustep-make
BuildRequires:  gnustep-base-devel
BuildRequires:  gnustep-gui-devel
BuildRequires:  libPantomime-devel
BuildRequires:  libAddressManager-devel
BuildRequires:  pkgconfig(openssl)
BuildRequires:  fdupes
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
An email client for GNUstep. This is a fork of the original project, due to the
inactivity of this.

%package -n lib%{_name}
Summary:        Shared libraries of %{_name}
Group:          System/Libraries
Requires:       %{name} = %{version}-%{release}

%description -n lib%{_name}
This package contains shared libraries of %_{name}.

%package -n lib%{_name}-devel
Summary:        Development files of %{_name}
Group:          Development/Objective-C
Provides:       %{name}-devel = %{version}-%{release}
Requires:       %{name} = %{version}-%{release}
Requires:       lib%{_name} = %{version}-%{release}

%description -n lib%{_name}-devel
This package contains development files of %{_name}

%prep
%setup -q -n %{_name}-%{version}

%build
. %{_datadir}/GNUstep/Makefiles/GNUstep.sh
make %{?_smp_mflags}

%install
. %{_datadir}/GNUstep/Makefiles/GNUstep.sh
%make_install GNUSTEP_INSTALLATION_DOMAIN=SYSTEM
ln -sf GNUstep/Frameworks/%{_name}.framework/Versions/%{_ver}/lib%{_name}.so.%{_ver} %{buildroot}%{_libdir}/lib%{_name}.so.%{_ver}
ln -sf GNUstep/Frameworks/%{_name}.framework/Versions/%{_ver}/lib%{_name}.so.%{version} %{buildroot}%{_libdir}/lib%{_name}.so.%{version}
ln -sf Versions/%{_ver}/Resources %{buildroot}%{_libdir}/GNUstep/Frameworks/%{_name}.framework/
chmod a-x %{buildroot}%{_libdir}/GNUstep/Applications/%{_name}.app/Resources/%{_name}.desktop
%fdupes -s %{buildroot}%{_libdir}/GNUstep/Application*/

%post -n lib%{_name} -p /sbin/ldconfig

%postun -n lib%{_name} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc Documentation/* ChangeLog*
%{_bindir}/*
%{_libdir}/GNUstep
%exclude %{_libdir}/GNUstep/Frameworks/%{_name}.framework/Headers
%exclude %{_libdir}/GNUstep/Frameworks/%{_name}.framework/%{_name}
%exclude %{_libdir}/GNUstep/Frameworks/%{_name}.framework/lib%{_name}.so
%exclude %{_libdir}/GNUstep/Frameworks/%{_name}.framework/Versions/Current
%exclude %{_libdir}/GNUstep/Frameworks/%{_name}.framework/Versions/%{_ver}/lib%{_name}.so.*
%exclude %{_libdir}/GNUstep/Frameworks/%{_name}.framework/Versions/%{_ver}/Headers
%exclude %{_libdir}/GNUstep/Frameworks/%{_name}.framework/Versions/%{_ver}/%{_name}
%exclude %{_libdir}/GNUstep/Frameworks/%{_name}.framework/Versions/%{_ver}/lib%{_name}.so

%files -n lib%{_name}
%defattr(-,root,root)
%{_libdir}/lib%{_name}.so.*
%{_libdir}/GNUstep/Frameworks/%{_name}.framework/Versions/%{_ver}/lib%{_name}.so.*

%files -n lib%{_name}-devel
%defattr(-,root,root)
%{_includedir}/%{_name}
%{_libdir}/lib%{_name}.so
%{_libdir}/GNUstep/Frameworks/%{_name}.framework/Headers
%{_libdir}/GNUstep/Frameworks/%{_name}.framework/%{_name}
%{_libdir}/GNUstep/Frameworks/%{_name}.framework/lib%{_name}.so
%{_libdir}/GNUstep/Frameworks/%{_name}.framework/Versions/Current
%{_libdir}/GNUstep/Frameworks/%{_name}.framework/Versions/%{_ver}/Headers
%{_libdir}/GNUstep/Frameworks/%{_name}.framework/Versions/%{_ver}/%{_name}
%{_libdir}/GNUstep/Frameworks/%{_name}.framework/Versions/%{_ver}/lib%{_name}.so

%changelog
openSUSE Build Service is sponsored by