Sophie

Sophie

distrib > Mageia > 9 > armv7hl > by-pkgid > 6e9a1984a0bb3b8fb328efe6b47cd084 > files > 2

box2d-2.4.1-4.mga9.src.rpm

%define major   2
%define libname %mklibname %{name} %{major}
%define devname %mklibname %{name} -d

Name:           box2d
Version:        2.4.1
Release:        %mkrel 4
Summary:        2D physics engine for games
Group:          System/Libraries
License:        zlib
URL:            https://box2d.org
Source0:        https://github.com/erincatto/box2d/archive/v%{version}/%{name}-%{version}.tar.gz

BuildRequires:  cmake

%description
2D rigid body simulation library for games.

#----------------------------------------------------------------------

%package -n     %{libname}
Summary:        2D physics engine for games
Group:          System/Libraries

%description -n %{libname}
2D rigid body simulation library for games. Programmers can use it in their
games to make objects move in believable ways and make the world seem more
interactive. From the game's point of view a physics engine is just a system
for procedural animation. Rather than paying (or begging) an animator
to move your actors around, you can let Sir Isaac Newton do the directing.

%files -n       %{libname}
%{_libdir}/lib%{name}.so.%{major}
%{_libdir}/lib%{name}.so.%{version}

#----------------------------------------------------------------------

%package -n     %{devname}
Summary:        Development files for Box2D
Group:          Development/C++
Requires:       %{libname} = %{version}-%{release}

%description -n %{devname}
Development headers and libraries for Box2D.

%files -n       %{devname}
%license LICENSE
%doc README.md
%{_includedir}/%{name}/
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/cmake/%{name}/

#----------------------------------------------------------------------

%prep
%autosetup -p1

%build
%cmake \
  -DBOX2D_BUILD_SHARED=ON \
  -DBOX2D_BUILD_TESTBED=OFF \
  -DBOX2D_BUILD_UNIT_TESTS=OFF \
  -DBOX2D_BUILD_DOCS=OFF
%cmake_build

%install
%cmake_install

# pkgconfig file
install -d %{buildroot}%{_libdir}/pkgconfig
cat << EOF > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
prefix=%{_prefix}
exec_prefix=\${prefix}
libdir=\${exec_prefix}/%{_lib}
includedir=\${prefix}/include

Name: Box2D
Description: 2D physics engine for games
Version: %{version}
Libs: -L\${libdir} -l%{name}
Cflags: -I\${includedir} -I\${includedir}/%{name}
EOF

%check
#./build/bin/unit_test


%changelog
* Mon Dec 05 2022 mrambo3501 <mrambo3501> 2.4.1-4.mga9
+ Revision: 1918349
- build without unit tests
+ umeabot <umeabot>
- Mageia 9 Mass Rebuild

* Mon Oct 19 2020 akien <akien> 2.4.1-2.mga8
+ Revision: 1636942
- Fix pkgconfig file

* Mon Oct 19 2020 akien <akien> 2.4.1-1.mga8
+ Revision: 1636841
- Version 2.4.1 (major 2)

* Wed Feb 12 2020 umeabot <umeabot> 2.3.1-4.mga8
+ Revision: 1510767
- Mageia 8 Mass Rebuild
+ wally <wally>
- build with new cmake macros
- replace deprecated %%makeinstall_std

* Sat Sep 22 2018 umeabot <umeabot> 2.3.1-3.mga7
+ Revision: 1295657
- Mageia 7 Mass Rebuild

* Mon Feb 08 2016 umeabot <umeabot> 2.3.1-2.mga6
+ Revision: 950464
- Mageia 6 Mass Rebuild

* Fri Oct 31 2014 akien <akien> 2.3.1-1.mga5
+ Revision: 794988
- imported package box2d