File only-non-binary-in-usr-lib_exception.spec of Package only-non-binary-in-usr-lib_exception

#
# spec file for package only-non-binary-in-usr-lib_exception
#
# Copyright (c) 2019 SUSE LLC
#
# 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:           only-non-binary-in-usr-lib_exception
Version:        1.0
Release:        0
Summary:        A package for only-non-binary-in-usr-lib (exception) testing
License:        MIT
URL:            https://www.binaries.com
BuildRequires:  gcc

%description
In general we want to throw a warning if we have only non-binary files in
the %{_prefix}/lib. But we can allow non-binaries via UsrLibBinaryException config
option and these files will be considered binaries.

Set 'UsrLibBinaryException' to '^%{_prefix}/lib(64)?/python' and test that no warning
is thrown.

%prep

%build
touch file1 file2 file3

%install
mkdir -p %{buildroot}%{_libdir}/python
install -m 644 file1 %{buildroot}/%{_libdir}/
install -m 644 file2 %{buildroot}/%{_libdir}/
# This file3 should be considered binary with the 'UsrLibBinaryException' set to '^%{_prefix}/lib(64)?/python'
install -m 644 file3 %{buildroot}/%{_libdir}/python

%files
%dir %{_libdir}/python
%{_libdir}/file1
%{_libdir}/file2
%{_libdir}/python/file3

%changelog
openSUSE Build Service is sponsored by