sdl12-compat/sdl12-compat.spec

208 lines
6.5 KiB
RPMSpec
Raw Normal View History

2021-06-29 04:30:26 +00:00
%global commit cf47f88e169cc9680e2dd1a89f775e2da129cded
2021-06-02 16:00:02 +00:00
%global shortcommit %(c=%{commit}; echo ${c:0:7})
2021-06-29 04:30:26 +00:00
%global commitdate 20210628
%if 0%{?rhel}
# Features disabled for RHEL
%bcond_with static
%else
%bcond_without static
%endif
2021-06-02 16:00:02 +00:00
Name: sdl12-compat
Version: 0.0.1~git.%{commitdate}.%{shortcommit}
2021-06-28 11:54:44 +00:00
Release: 1%{?dist}
2021-06-02 16:00:02 +00:00
Summary: SDL 1.2 runtime compatibility library using SDL 2.0
# mp3 decoder code is MIT-0/PD
2021-06-20 12:38:08 +00:00
# SDL_opengl.h is zlib and MIT
License: zlib and (Public Domain or MIT-0) and MIT
2021-06-02 16:00:02 +00:00
URL: https://github.com/libsdl-org/sdl12-compat
Source0: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
2021-06-03 12:35:19 +00:00
# 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
2021-06-02 16:00:02 +00:00
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
2021-06-02 16:00:02 +00:00
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
2021-06-02 16:00:02 +00:00
%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
2021-06-02 16:00:02 +00:00
Conflicts: SDL-devel < 1.2.50
Provides: SDL-devel = 1.2.50
Provides: SDL-devel%{?_isa} = 1.2.50
# Add deps required to compile SDL apps
## For SDL_opengl.h
Requires: pkgconfig(gl)
Requires: pkgconfig(glu)
## For SDL_syswm.h
Requires: pkgconfig(x11)
Requires: pkgconfig(xproto)
2021-06-02 16:00:02 +00:00
%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.
%if %{with static}
%package static
Summary: Static library to develop SDL 1.2 applications using SDL 2.0
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
# This replaces SDL-static
Obsoletes: SDL-static < 1.2.15-47
Conflicts: SDL-static < 1.2.50
Provides: SDL-static = 1.2.50
Provides: SDL-static%{?_isa} = 1.2.50
%description static
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 static link library for
programs written against SDL 1.2, but it uses SDL 2.0 behind the scenes.
Note that applications that use this library will need to declare SDL2 as
a dependency manually, as the library is dlopen()'d to preserve APIs between
SDL-1.2 and SDL-2.0.
If you are writing new code, please target SDL 2.0 directly and do not use
this layer.
%endif
2021-06-02 16:00:02 +00:00
%prep
%autosetup -n %{name}-%{commit} -S git_am
%build
%cmake %{?with_static:-DSTATICDEVEL=ON}
2021-06-02 16:00:02 +00:00
%cmake_build
%install
%cmake_install
2021-06-03 12:35:19 +00:00
# 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
2021-06-28 11:57:40 +00:00
%if ! %{with static}
# Delete leftover static files
rm -rf %{buildroot}%{_libdir}/*.a
%endif
2021-06-02 16:00:02 +00:00
%files
%license LICENSE.txt
%doc README.md BUGS.txt
%{_libdir}/libSDL-1.2.so.*
%files devel
%{_bindir}/sdl-config
%{_datadir}/aclocal/sdl.m4
2021-06-02 16:00:02 +00:00
%{_includedir}/SDL/
%{_libdir}/libSDL-1.2.so
%{_libdir}/libSDL.so
2021-06-02 16:00:02 +00:00
%{_libdir}/pkgconfig/sdl12_compat.pc
%if %{with static}
%files static
%{_libdir}/libSDL.a
2021-06-28 11:54:44 +00:00
%{_libdir}/libSDLmain.a
%endif
2021-06-02 16:00:02 +00:00
%changelog
2021-06-29 04:30:26 +00:00
* Tue Jun 29 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210628.cf47f88-1
- Update to new snapshot release
2021-06-28 11:54:44 +00:00
* Mon Jun 28 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210624.08b5def-1
- Update to new snapshot release
* Sun Jun 20 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210619.4ad7ba6-2
- Update devel dependencies based on upstream feedback
2021-06-20 12:38:08 +00:00
* Sun Jun 20 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210619.4ad7ba6-1
- Update to new snapshot release
* Sun Jun 20 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210618.f44f295-2
- Add devel dependencies expected by SDL packages to devel subpackage
2021-06-18 16:04:04 +00:00
* Fri Jun 18 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210618.f44f295-1
- Update to new snapshot release
* Sun Jun 13 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210612.44f299f-1
- Update to new snapshot release
- Update license tag information
2021-06-13 00:41:24 +00:00
* Sat Jun 12 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210612.c0504eb-1
- Update to new snapshot release
* Thu Jun 10 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210610.21830e8-1
- Update to new snapshot release
- Add static link library for non-RHEL
* Wed Jun 09 2021 Neal Gompa <ngompa13@gmail.com> - 0.0.1~git.20210609.efe9791-1
- Update to new snapshot release
- Refresh patch for multilib support
2021-06-03 12:35:19 +00:00
* 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
2021-06-02 16:00:02 +00:00
* 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