File nothing.spec of Package nothing

#
# spec file for package nothing
#
# Copyright (c) 2022 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:           nothing
Version:        0
Release:        0
Summary:        A library which does nothing
License:        SUSE-Public-Domain
Group:          Development/Libraries/C and C++
URL:            https://build.opensuse.org/package/show/openSUSE:Factory/nothing



%description
libnothing is useless shared library providing one function nop() which returns immediately.

%package -n libnothing0
Summary:        A library which does nothing
Group:          System/Libraries

%description -n libnothing0
libnothing is useless shared library providing one function nop() which returns immediately.

This package provides the shared library

%package devel
Summary:        A library which does nothing – development files
Requires:       libnothing0%{_isa} = %version

%description devel
libnothing is useless shared library providing one function nop() which returns immediately.

This package provides the files needed todevelop your programs using libnothing.


%prep
set
ld.so --help
cat /proc/cpuinfo
gcc -v
uname -m
echo 'void nop(){}' > nothing.c
echo 'void nop();' > nothing.h


%build
gcc %optflags -fpic -c nothing.c
gcc %{?build_ldflags} -Wl,-v -v -shared -Wl,-soname,libnothing.so.0 -o libnothing.so.0 nothing.o

%install
install -pvDm755 libnothing.so.0 -t %buildroot%{_libdir}
ln -srv %buildroot%{_libdir}/libnothing.so{.0,}
install -pvDm644 nothing.h -t %buildroot%{_includedir}

#touch %{buildroot}/skipped-install-cross

%files -n libnothing0
%{_libdir}/libnothing.so.0

%post -n libnothing0 -p /sbin/ldconfig
%postun -n libnothing0 -p /sbin/ldconfig


%files devel
%{_libdir}/libnothing.so
%{_includedir}/nothing.h


%changelog
openSUSE Build Service is sponsored by