File hermes.spec of Package hermes

#
# spec file for package hermes
#
# Copyright (c) 2012 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 https://bugs.opensuse.org/
#


Name:           hermes
Version:        1.3.3
Release:        0
Summary:        A Graphics Conversion Library
License:        LGPL-2.0+
Group:          System/Libraries
Url:            https://github.com/berkus/hermes-pixel-format
Source:         Hermes-%{version}.tar.bz2
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch0:         Hermes-%{version}-intptr_t.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1:         Hermes-%{version}-destdir.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch2:         Hermes-%{version}-libtool.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch3:         Hermes-%{version}-gcc4.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch4:         Hermes-%{version}-noexecstack.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch5:         Hermes-%{version}-AR_FLAGS.patch
BuildRequires:  automake
BuildRequires:  libtool
Provides:       Hermes
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A graphics library for converting between various pixel formats.

%package -n libHermes1
Summary:        A Graphics Conversion Library
Group:          System/Libraries
Provides:       hermes = %{version}
Obsoletes:      hermes < %{version}

%description -n libHermes1
A graphics library for converting between various pixel formats.

%package -n hermes-devel
Summary:        Hermes library developer files
Group:          Development/Libraries/C and C++
Requires:       libHermes1 = %{version}

%description -n hermes-devel
This package contains files needed for development with the hermes
library.

%prep
%setup -q -n Hermes-%{version}
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5

%build
autoreconf --force --install
%configure \
%ifnarch %ix86
  --disable-x86asm \
%endif
  --disable-static
%make_build
rm -rf docs/api/{generate,sgml}

%install
mkdir -p %{buildroot}%{_includedir}/Hermes
%make_install
# https://en.opensuse.org/openSUSE:Packaging_guidelines#Static_Libraries
rm -fv %{buildroot}%{_libdir}/libHermes.la

%post -n libHermes1  -p /sbin/ldconfig

%postun -n libHermes1 -p /sbin/ldconfig

%files -n libHermes1
%license COPYING
%{_libdir}/libHermes.so.*

%files -n hermes-devel
%defattr(-,root,root)
%doc docs/api/*
%doc AUTHORS ChangeLog FAQ INSTALL.unix NEWS README TODO*
%{_includedir}/Hermes
%{_libdir}/libHermes.so

%changelog
openSUSE Build Service is sponsored by