File gnustep-libobjc2.spec of Package gnustep-libobjc2

#
# spec file for package gnustep-libobjc2
#
# Copyright (c) 2018 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 https://bugs.opensuse.org/
#


%define  _name  libobjc
%define  _ver   4_6
Name:           gnustep-libobjc2
Version:        @SERVICE@
Release:        0
Summary:        GNUstep Objective-C Runtime
License:        MIT
Group:          System/Libraries
URL:            https://github.com/gnustep/libobjc2
Source:         %{name}-%{version}.tar.gz
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  gcc-obj-c++
BuildRequires:  gnustep-base-devel
BuildRequires:  gnustep-make
BuildRequires:  llvm-clang

%description
The GNUstep Objective-C runtime is designed as a drop-in replacement for the
GCC runtime.  It supports both a legacy and a modern ABI, allowing code
compiled with old versions of GCC to be supported without requiring
recompilation.  The modern ABI adds the following features:

- Non-fragile instance variables.
- Protocol uniquing.
- Object planes support.
- Declared property introspection.

%package -n %{_name}%{_ver}
Summary:        GNUstep Objective-C Runtime
Group:          System/Libraries

%description -n %{_name}%{_ver}
The GNUstep Objective-C runtime is designed as a drop-in replacement for the
GCC runtime.  It supports both a legacy and a modern ABI, allowing code
compiled with old versions of GCC to be supported without requiring
recompilation.  The modern ABI adds the following features:

- Non-fragile instance variables.
- Protocol uniquing.
- Object planes support.
- Declared property introspection.

%package -n %{_name}-devel
Summary:        Include Files and Libraries Mandatory for Development
Group:          Development/Libraries/C and C++
Requires:       %{_name}%{_ver} = %{version}
Provides:       %{name}-devel = %{version}
Obsoletes:      %{name}-devel < %{version}

%description -n %{_name}-devel
This package contains all necessary include files and libraries needed
to develop applications that require these.

%prep
%setup -q

%build
mkdir build
pushd build
cmake .. \
    -DCMAKE_C_COMPILER=clang \
    -DCMAKE_CXX_COMPILER=clang++ \
    -DCMAKE_C_FLAGS="%{optflags}" \
    -DCMAKE_CXX_FLAGS="%{optflags}" \
    -DGNUSTEP_INSTALL_TYPE=SYSTEM \
    -DTESTS=FALSE
make %{?_smp_mflags}
popd

%install
pushd build
make  DESTDIR=%{buildroot} install/strip
popd

%post -n %{_name}%{_ver} -p /sbin/ldconfig
%postun -n %{_name}%{_ver} -p /sbin/ldconfig

%files -n %{_name}%{_ver}
%{_libdir}/*.so.*
%license COPYING

%files -n %{_name}-devel
%doc ANNOUNCE.* API README.md
%{_includedir}/objc
%{_libdir}/*.so

%changelog
openSUSE Build Service is sponsored by