sdl12-compat/sdl12-compat.spec

122 lines
3.7 KiB
RPMSpec

%global commit cc5826a7553ad850de1dfc1264128d9df6d44fa2
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commitdate 20210602
Name: sdl12-compat
Version: 0.0.1~git.%{commitdate}.%{shortcommit}
Release: 3%{?dist}
Summary: SDL 1.2 runtime compatibility library using SDL 2.0
License: zlib
URL: https://github.com/libsdl-org/sdl12-compat
Source0: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
# Multilib aware-header stub
Source1: SDL_config.h
# Backports from upstream (0001~0500)
# Proposed patches (0501~1000)
# Fedora specific patches (1001+)
Patch1001: sdl12-compat-sdlconfig-multilib.patch
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: git-core
BuildRequires: make
BuildRequires: SDL2-devel
BuildRequires: mesa-libGL-devel
BuildRequires: mesa-libGLU-devel
# This replaces SDL
Obsoletes: SDL < 1.2.15-47
Conflicts: SDL < 1.2.50
Provides: SDL = 1.2.50
Provides: SDL%{?_isa} = 1.2.50
# This dlopens SDL2 (?!), so manually depend on it
Requires: SDL2 >= 2.0.14
%description
Simple DirectMedia Layer (SDL) is a cross-platform multimedia library
designed to provide fast access to the graphics frame buffer and audio device.
This code is a compatibility layer; it provides a binary-compatible API for
programs written against SDL 1.2, but it uses SDL 2.0 behind the scenes.
If you are writing new code, please target SDL 2.0 directly and do not use
this layer.
%package devel
Summary: Files to develop SDL 1.2 applications using SDL 2.0
Requires: %{name}%{?_isa} = %{version}-%{release}
# This replaces SDL-devel
Obsoletes: SDL-devel < 1.2.15-47
Conflicts: SDL-devel < 1.2.50
Provides: SDL-devel = 1.2.50
Provides: SDL-devel%{?_isa} = 1.2.50
%description devel
Simple DirectMedia Layer (SDL) is a cross-platform multimedia library
designed to provide fast access to the graphics frame buffer and audio device.
This code is a compatibility layer; it provides a source-compatible API for
programs written against SDL 1.2, but it uses SDL 2.0 behind the scenes.
If you are writing new code, please target SDL 2.0 directly and do not use
this layer.
%prep
%autosetup -n %{name}-%{commit} -S git_am
%build
%cmake
%cmake_build
%install
%cmake_install
# Rename SDL_config.h to SDL_config-<arch>.h to avoid file conflicts on
# multilib systems and install SDL_config.h wrapper
mv %{buildroot}/%{_includedir}/SDL/SDL_config.h %{buildroot}/%{_includedir}/SDL/SDL_config-%{_arch}.h
install -m644 %{SOURCE1} %{buildroot}/%{_includedir}/SDL/SDL_config.h
%files
%license LICENSE.txt
%doc README.md BUGS.txt
%{_libdir}/libSDL-1.2.so.*
%files devel
%{_bindir}/sdl-config
%{_includedir}/SDL/
%{_libdir}/libSDL-1.2.so
%{_libdir}/pkgconfig/sdl12_compat.pc
%changelog
* Thu Jun 03 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210602.cc5826a-3
- Fix for multilib support
* Thu Jun 03 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210602.cc5826a-2
- Add missing SDL2 dependency and fix Obsoletes
* Wed Jun 02 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210602.cc5826a-1
- Update to new snapshot release
* Sat May 29 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210528.646ecd7-0.1
- Update to new snapshot release
* Fri May 28 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210527.a915ff1-0.1
- Update to new snapshot release
* Wed May 26 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210526.848ad42-0.1
- Update to new snapshot release
* Mon May 24 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210524.cf71450-0.1
- Update to new snapshot release
* Sat May 15 2021 Neal Gompa <ngompa13@gmail.com> - 0~git.20210515.9f2d88a-1
- Initial package