File orc.spec of Package orc

#
# spec file for package orc
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2010 Dominique Leuenberger, Amsterdam, Netherlands.
#
# 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/
#


%if 0%{?suse_version} < 1200
%bcond_with gtkdoc
%else
%bcond_without gtkdoc
%endif

Name:           orc
Version:        0.4.24
Release:        0
Summary:        The Oil Runtime Compiler
License:        BSD-3-Clause
Group:          Productivity/Multimedia/Other
Url:            http://cgit.freedesktop.org/gstreamer/orc
Source:         http://gstreamer.freedesktop.org/src/orc/%{name}-%{version}.tar.xz
Source99:       baselibs.conf
%if %{with gtkdoc}
BuildRequires:  gtk-doc >= 1.12
%endif
BuildRequires:  pkg-config
%if 0%{?suse_version} <= 1130
#openSUSE until 11.3 and also SLE11 do not bring in xz on their own.
BuildRequires:  xz
%endif
Provides:       %{name}-devel = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Orc is a library and set of tools for compiling and executing very simple
programs that operate on arrays of data.  The “language” is a generic
assembly language that represents many of the features available in SIMD
architectures, including saturated addition and subtraction, and many
arithmetic operations.

%package -n liborc-0_4-0
Summary:        The Oil Runtime Compiler Library
Group:          System/Libraries

%description -n liborc-0_4-0
Orc is a library and set of tools for compiling and executing very simple
programs that operate on arrays of data.  The “language” is a generic
assembly language that represents many of the features available in SIMD
architectures, including saturated addition and subtraction, and many
arithmetic operations.

%package doc
Summary:        The Oil Runtime Compiler Library - Documentation
Group:          Documentation/HTML

%description doc
Orc is a library and set of tools for compiling and executing very simple
programs that operate on arrays of data.  The “language” is a generic
assembly language that represents many of the features available in SIMD
architectures, including saturated addition and subtraction, and many
arithmetic operations.

%prep
%setup -q

%build
%configure \
    --disable-static \
%if %{with gtkdoc}
    --enable-gtk-doc
%else
    --disable-gtk-doc
%endif
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}

# These are some examples that seem not to make sense to be distributed
rm -rf %{buildroot}%{_libdir}/orc

# Remove libtool archives
find %{buildroot} -type f -name "*.la" -delete -print

# Temp disable check on i586 until we have sorted out the i586 fails with upstream (last tested with 0.4.24)
# disable also for ppc64le as many changes required in orcprogram-altivec.c
# Testsuite is broken on aarch64
%check
%ifnarch aarch64 %{arm} %{ix86} ppc64le
make check %{?_smp_mflags}
%endif

%post -n liborc-0_4-0 -p /sbin/ldconfig

%postun -n liborc-0_4-0 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_bindir}/orc-bugreport
%{_bindir}/orcc
%{_includedir}/orc-0.4/
%{_libdir}/*.so
%{_libdir}/pkgconfig/orc-0.4.pc
%{_datadir}/aclocal/orc.m4

%files doc
%defattr(-,root,root)
%dir /usr/share/gtk-doc
%dir /usr/share/gtk-doc/html
%{_datadir}/gtk-doc/html/orc/

%files -n liborc-0_4-0
%defattr(-,root,root)
%{_libdir}/liborc*-0.4.so.*

%changelog