File invalid-soname.spec of Package invalid-soname
#
# spec file for package invalid-soname
#
# 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/
#
%define sover 1
%define libname libtest
Name: invalid-soname
Version: 1.5
Release: 0
Summary: A package for invalid-soname testing
License: MIT
URL: https://www.invalid-soname.com
Source: source.tar.gz
Source1: rpmlintrc
%description
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit.
%package -n libtest%{sover}
Summary: Test invalid-soname error
%description -n %{libname}%{sover}
It creates a library with the invalid soname (libtest.so.1x).
%prep
%setup -q -n source
%build
gcc -fPIC -c libtest.c
# create invalid soname (libtest.so.1x)
gcc -shared -fPIC -Wl,-soname,libtest.so.1x -o libtest.so.1.5.0 libtest.o -lc
%install
mkdir -p %{buildroot}%{_libdir}/
install -m 755 libtest.so.1.5.0 %{buildroot}%{_libdir}/libtest.so.1.5.0
%post -n %{libname}%{sover} -p /sbin/ldconfig
%files -n %{libname}%{sover}
%{_libdir}/libtest.so.1.5.0
%changelog