File vice.spec of Package vice
#
# spec file for package vice
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define _lto_cflags %{nil}
%define _configure ../configure
%define version 3.8
%define rel 1
Name: vice
Version: %{version}
Release: %{rel}
Summary: VICE, the Versatile Commodore Emulator
License: GPL-2.0-or-later
Group: System/Emulators/Other
URL: http://vice-emu.sourceforge.net
Source: %{name}-%{version}.tar.gz
BuildRequires: bison
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: giflib-devel
BuildRequires: libieee1284-devel
BuildRequires: libjpeg-devel
BuildRequires: libmp3lame-devel
BuildRequires: libpcap
BuildRequires: libpcap-devel
BuildRequires: pkgconfig
BuildRequires: texinfo
BuildRequires: update-desktop-files
BuildRequires: xa
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(flac)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glew)
BuildRequires: pkgconfig(glu)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavresample)
BuildRequires: pkgconfig(libavutil)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libmpg123)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(libswscale)
BuildRequires: pkgconfig(portaudio-2.0)
BuildRequires: pkgconfig(vorbis)
BuildRequires: pkgconfig(vte-2.91)
BuildRequires: pkgconfig(x11)
%description
VICE is a set of accurate emulators for the Commodore 64, 128, VIC20,
PET, Plus4, CBM-II 8-bit computers and the C64DTV.
- Upgrading
===========
If you run into trouble please try removing any VICE configuration files
left over from previous installs.
(vice.ini / .vicerc / vice2.cfg / vice-sdl.ini depending on platform)
Before reporting bugs, always try with a clean config: Run the emulator
with the "-default" command line argument or use "restore default config"
in the UI).
%prep
%setup -q
%build
mkdir builddir
pushd builddir
%configure \
--docdir=%{_docdir}/%{name} \
--enable-gtk3ui \
--with-alsa \
--with-pulse \
--with-mpg123 \
--with-vorbis \
--with-flac \
--with-gif \
--with-jpeg \
--with-fastsid \
--enable-ethernet \
--enable-ffmpeg \
--enable-lame \
--enable-libieee1284 \
--enable-midi \
--enable-cpuhistory \
--enable-x64 \
--enable-x64-image \
--silent
%make_build
popd
%install
pushd builddir
%make_install
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{128x128,scalable}/apps/
install -m 444 -D $RPM_BUILD_DIR/%{name}-%{version}/data/common/CBM_Logo.svg %{buildroot}/%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%suse_update_desktop_file -c x128 "VICE C-128" "Commodore C-128 Emulator" x128 %{name} "System;Emulator;"
%suse_update_desktop_file -c x64 "VICE C-64" "Commodore C-64 Emulator" x64 %{name} "System;Emulator;"
%suse_update_desktop_file -c x64sc "VICE C-64 (accurate)" "Accurate Commodore C-64 Emulator" x64sc %{name} "System;Emulator;"
%suse_update_desktop_file -c x64dtv "VICE C-64 DTV" "Commodore C-64 DTV Emulator" x64dtv %{name} "System;Emulator;"
%suse_update_desktop_file -c xcbm2 "VICE CBM-II" "Commodore CBM-II Emulator" xcbm2 %{name} "System;Emulator;"
%suse_update_desktop_file -c xcbm5x0 "VICE CBM-II (5x0)" "Commodore CBM-II (5x0 Models) Emulator" xcbm5x0 %{name} "System;Emulator;"
%suse_update_desktop_file -c xpet "VICE PET" "Commodore PET Emulator" xpet %{name} "System;Emulator;"
%suse_update_desktop_file -c xplus4 "VICE PLUS/4" "Commodore PLUS/4 Emulator" xplus4 %{name} "System;Emulator;"
%suse_update_desktop_file -c xvic "VICE VIC20" "Commodore VIC20 Emulator" xvic %{name} "System;Emulator;"
popd
%fdupes %{buildroot}
%files
%doc README NEWS
%license COPYING
%{_bindir}/c1541
%{_bindir}/cartconv
%{_bindir}/petcat
%{_bindir}/vsid
%{_bindir}/x128
%{_bindir}/x64
%{_bindir}/x64dtv
%{_bindir}/x64sc
%{_bindir}/xcbm2
%{_bindir}/xcbm5x0
%{_bindir}/xpet
%{_bindir}/xplus4
%{_bindir}/xscpu64
%{_bindir}/xvic
%{_datadir}/vice
%{_datadir}/icons/hicolor/
%{_datadir}/applications/*.desktop
%changelog