Files
86Box/src/unix/assets/86Box.spec

126 lines
3.4 KiB
RPMSpec
Raw Normal View History

2022-03-20 11:46:02 +01:00
# Fedora RPM spec file for 86Box including roms
#
# To create RPM files from this spec file, run the following commands:
# sudo dnf install rpm-build
# mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
#
# copy this 86Box.spec file to ~/rpmbuild/SPECS and run the following commands:
# cd ~/rpmbuild
# sudo dnf builddep SPECS/86Box.spec
# rpmbuild --undefine=_disable_source_fetch -ba SPECS/86Box.spec
#
# After a successful build, you can install the RPMs as follows:
# sudo dnf install RPMS/$(uname -m)/86Box-3* RPMS/noarch/86Box-roms*
2023-10-12 00:28:51 +02:00
%global romver 4.1
2022-03-19 15:16:01 +01:00
Name: 86Box
2023-07-29 17:32:57 +02:00
Version: 4.1
2022-03-19 15:16:01 +01:00
Release: 1%{?dist}
Summary: Classic PC emulator
License: GPLv2+
2022-03-19 15:16:01 +01:00
URL: https://86box.net
2023-04-10 10:11:32 +02:00
Source0: https://github.com/86Box/86Box/archive/refs/tags/v%{version}.tar.gz
Source1: https://github.com/86Box/roms/archive/refs/tags/v%{romver}.zip
2022-03-19 15:16:01 +01:00
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: extra-cmake-modules
BuildRequires: fluidsynth-devel
2022-04-22 19:15:46 +02:00
BuildRequires: freetype-devel
2022-03-19 15:16:01 +01:00
BuildRequires: gcc-c++
BuildRequires: libFAudio-devel
BuildRequires: libappstream-glib
BuildRequires: libatomic
2022-03-19 15:16:01 +01:00
BuildRequires: libevdev-devel
BuildRequires: libslirp-devel
2023-04-10 10:11:32 +02:00
BuildRequires: libxkbcommon-x11-devel
2022-03-19 15:16:01 +01:00
BuildRequires: libXi-devel
BuildRequires: ninja-build
2022-08-02 07:49:01 +02:00
BuildRequires: openal-soft-devel
2022-03-19 15:16:01 +01:00
BuildRequires: qt5-linguist
BuildRequires: qt5-qtconfiguration-devel
BuildRequires: qt5-qtbase-private-devel
BuildRequires: qt5-qtbase-static
BuildRequires: rtmidi-devel
BuildRequires: wayland-devel
BuildRequires: SDL2-devel
Requires: hicolor-icon-theme
Requires: fluid-soundfont-gm
2022-03-20 10:07:01 +01:00
Requires: 86Box-roms
2022-03-19 15:16:01 +01:00
%description
86Box is a hypervisor and IBM PC system emulator that specializes in
running old operating systems and software designed for IBM
PC systems and compatibles from 1981 through fairly recent
system designs based on the PCI bus.
It supports various models of PCs, graphics and sound cards, and CPUs.
2022-03-20 10:07:01 +01:00
%package roms
Summary: ROMs for use with 86Box
Version: %{romver}
2022-03-20 10:07:01 +01:00
License: Proprietary
BuildArch: noarch
%description roms
Collection of ROMs for use with 86Box.
2022-03-19 15:16:01 +01:00
%prep
2022-03-20 10:07:01 +01:00
%autosetup -p1 -a1
2022-03-19 15:16:01 +01:00
%build
2022-03-20 10:07:01 +01:00
%ifarch i386 x86_64
2022-03-20 10:36:00 +01:00
%cmake -DRELEASE=on
2022-03-19 15:16:01 +01:00
%else
2022-03-20 10:36:00 +01:00
%ifarch arm aarch64
%cmake -DRELEASE=on -DNEW_DYNAREC=on
2022-03-20 10:36:00 +01:00
%else
2022-03-20 10:46:06 +01:00
%cmake -DRELEASE=on -DDYNAREC=off
2022-03-20 10:36:00 +01:00
%endif
2022-03-19 15:16:01 +01:00
%endif
%cmake_build
%install
2022-03-20 10:07:01 +01:00
# install base package
2022-03-19 15:16:01 +01:00
%cmake_install
# install icons
for i in 48 64 72 96 128 192 256 512; do
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${i}x${i}/apps
2022-04-22 19:15:46 +02:00
cp src/unix/assets/${i}x${i}/net.86box.86Box.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${i}x${i}/apps
2022-03-19 15:16:01 +01:00
done
2022-03-20 10:07:01 +01:00
# install desktop file
2022-03-19 15:16:01 +01:00
desktop-file-install --dir=%{buildroot}%{_datadir}/applications src/unix/assets/net.86box.86Box.desktop
2022-03-20 10:07:01 +01:00
# install metadata
2022-03-19 15:16:01 +01:00
mkdir -p %{buildroot}%{_metainfodir}
cp src/unix/assets/net.86box.86Box.metainfo.xml %{buildroot}%{_metainfodir}
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/net.86box.86Box.metainfo.xml
2022-03-20 10:07:01 +01:00
# install roms
2023-04-10 10:11:32 +02:00
pushd roms-%{romver}
2022-03-20 10:07:01 +01:00
mkdir -p %{buildroot}%{_datadir}/%{name}/roms
cp -a * %{buildroot}%{_datadir}/%{name}/roms/
popd
# files part of the main package
2022-03-19 15:16:01 +01:00
%files
%license COPYING
%{_bindir}/86Box
%{_datadir}/applications/net.86box.86Box.desktop
%{_metainfodir}/net.86box.86Box.metainfo.xml
%{_datadir}/icons/hicolor/*/apps/net.86box.86Box.png
2022-03-20 10:07:01 +01:00
# files part of the rom package
%files roms
%license roms-%{romver}/LICENSE
2022-03-20 10:07:01 +01:00
%{_datadir}/%{name}/roms
2022-03-19 15:16:01 +01:00
%changelog
2023-11-04 02:50:13 -04:00
* Mon Oct 16 2023 Robert de Rooy <robert.de.rooy[AT]gmail.com> 4.1-1
2022-04-22 19:15:46 +02:00
- Bump release