File angelscript2_29.spec of Package angelscript2_29

#
# spec file for package angelscript2_29
#
# Copyright (c) 2016 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/
#


%define sover 2_29_2
Name:           angelscript2_29
Version:        2.29.2
Release:        0
Summary:        It is an extremely flexible cross-platform scripting library
License:        Zlib
Group:          Development/Libraries/C and C++
Url:            http://www.angelcode.com/angelscript/
Source:         http://www.angelcode.com/angelscript/sdk/files/angelscript_%{version}.zip
BuildRequires:  gcc-c++
BuildRequires:  unzip
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The AngelCode Scripting Library, or AngelScript as it is also known, is an extremely flexible cross-platform scripting library designed to allow applications to extend their functionality through external scripts. It has been designed from the beginning to be an easy to use component, both for the application programmer and the script writer.

%package -n libangelscript-%{sover}
Summary:        It is an extremely flexible cross-platform scripting library
Group:          System/Libraries

%description -n libangelscript-%{sover}
It supports Unix sockets and TCP/IP sockets with optional SSL/TLS (OpenSSL) support. It allows you to write portable and secure network applications quickly without needing to spend time learning low-level system functions or reading OpenSSL manuals.

%package devel
Summary:        It is an extremely flexible cross-platform scripting library
Group:          Development/Libraries/C and C++
Requires:       libangelscript-%{sover} = %{version}
Conflicts:      libangelscript-devel

%description devel
It supports Unix sockets and TCP/IP sockets with optional SSL/TLS (OpenSSL) support. It allows you to write portable and secure network applications quickly without needing to spend time learning low-level system functions or reading OpenSSL manuals.

%prep
%setup -q -n sdk/angelscript/projects/gnuc

%build
make %{?_smp_mflags} SHARED=1 VERSION=%{version}

%install
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_includedir}

make install SHARED=1 VERSION=%{version} LOCAL=%{buildroot}%{_prefix} INSTALL_LIBDIR=%{_lib}

# Fix Symlink points to BuildRoot
rm %{buildroot}%{_libdir}/libangelscript.so
ln -s %{_libdir}/libangelscript-%{version}.so %{buildroot}%{_libdir}/libangelscript.so

rm %{buildroot}%{_libdir}/libangelscript.so.%{version}
ln -s %{_libdir}/libangelscript-%{version}.so %{buildroot}%{_libdir}/libangelscript.so.%{version}

%post -n libangelscript-%{sover} -p /sbin/ldconfig
%postun -n libangelscript-%{sover} -p /sbin/ldconfig

%files -n libangelscript-%{sover}
%defattr(-,root,root)
%{_libdir}/libangelscript.so.*
%{_libdir}/libangelscript-*.so

%files devel
%defattr(-,root,root)
%attr(0644,root,root) %{_includedir}/*.h
%{_libdir}/libangelscript.so

%changelog