|
|
|
@@ -0,0 +1,107 @@
|
|
|
|
|
#
|
|
|
|
|
# spec file for package pveclib
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2020 SUSE LINUX 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/
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: pveclib
|
|
|
|
|
Version: 1.0.4
|
|
|
|
|
Release: 0
|
|
|
|
|
Summary: Power Vector Library
|
|
|
|
|
License: Apache-2.0
|
|
|
|
|
|
|
|
|
|
Url: https://github.com/open-power-sdk/pveclib
|
|
|
|
|
Source: https://github.com/open-power-sdk/pveclib/archive/v1.0.4.tar.gz
|
|
|
|
|
ExclusiveArch: ppc64le
|
|
|
|
|
BuildRequires: glibc-devel doxygen graphviz fdupes
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
See description for libpvec1
|
|
|
|
|
|
|
|
|
|
%package -n libpvec1
|
|
|
|
|
Summary: Power Vector Library
|
|
|
|
|
|
|
|
|
|
%description -n libpvec1
|
|
|
|
|
Functions leveraging the PowerISA Vector Facilities: Vector Multimedia
|
|
|
|
|
Extension (VMX aka Altivec) and Vector Scalar Extension (VSX).
|
|
|
|
|
|
|
|
|
|
This package contains the runtime files for pveclib.
|
|
|
|
|
|
|
|
|
|
%package -n libpvec-devel
|
|
|
|
|
Summary: Development files for pveclib
|
|
|
|
|
Requires: libpvec1 = 1.0.4
|
|
|
|
|
|
|
|
|
|
%description -n libpvec-devel
|
|
|
|
|
This package contains the development files for pveclib.
|
|
|
|
|
|
|
|
|
|
# Use -ffat-lto-objects because of the shipped static libraries
|
|
|
|
|
# See https://en.opensuse.org/openSUSE:LTO
|
|
|
|
|
%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# Set the install path of the documentation to %%{_docdir} in the
|
|
|
|
|
# configure step, instead of using the %%doc directive, because the main
|
|
|
|
|
# package has been made empty, thus not generated, and the %%doc
|
|
|
|
|
# directive relies on the name of the main package to copy documentation
|
|
|
|
|
# files from the source directory.
|
|
|
|
|
%configure --docdir=%{_docdir}/pveclib
|
|
|
|
|
%make_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%make_install
|
|
|
|
|
# Remove .la files as recommended by openSUSE's library packaging guidelines:
|
|
|
|
|
# https://en.opensuse.org/openSUSE:Shared_library_packaging_policy#Best_Practices
|
|
|
|
|
find %{buildroot} -type f -name "*.la" -delete
|
|
|
|
|
# Upstream build rules produce .so* files for libpvecstatic, even
|
|
|
|
|
# thought they are not supposed to be installed. Remove them.
|
|
|
|
|
find %{buildroot} -type f -name "libpvecstatic.so*" -delete
|
|
|
|
|
find %{buildroot} -type l -name "libpvecstatic.so*" -delete
|
|
|
|
|
# Convert identical files into hardlinks.
|
|
|
|
|
%fdupes %{buildroot}/%{_prefix}
|
|
|
|
|
|
|
|
|
|
%post -n libpvec1 -p /sbin/ldconfig
|
|
|
|
|
%postun -n libpvec1 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
%files -n libpvec1
|
|
|
|
|
%{_libdir}/libpvec.so.*
|
|
|
|
|
# Distribute a copy of the LICENSE with the runtime package to fulfill
|
|
|
|
|
# the requirement in section 4, first item, of the Apache 2.0 license.
|
|
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
|
|
%files -n libpvec-devel
|
|
|
|
|
%{_libdir}/lib*.a
|
|
|
|
|
%{_libdir}/libpvec.so
|
|
|
|
|
%{_includedir}/pveclib
|
|
|
|
|
# Manually add documentation and license files, instead of using the
|
|
|
|
|
# %%doc and %%license directives, because the main package has been made
|
|
|
|
|
# empty, thus not generated, and these directives rely on the name of
|
|
|
|
|
# the main package to copy files from the source directory.
|
|
|
|
|
%{_docdir}/pveclib/*
|
|
|
|
|
%{_licensedir}/pveclib/LICENSE
|
|
|
|
|
# Since the documentation and license directories were installed
|
|
|
|
|
# manually, instead of using the %%doc and %%license directives, the
|
|
|
|
|
# installed directories must be manually marked as owned, otherwise
|
|
|
|
|
# rpmbuild complains with messages similar to the following:
|
|
|
|
|
# libpvec[...].rpm: directories not owned by a package:
|
|
|
|
|
# - /usr/share/doc/packages/pveclib
|
|
|
|
|
# - /usr/share/licenses/pveclib
|
|
|
|
|
%dir %{_docdir}/pveclib
|
|
|
|
|
%dir %{_licensedir}/pveclib
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
|