File adtrack2.spec of Package adtrack2
#
# spec file for package adtrack2
#
# Copyright (c) 2021 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/
#
Name: adtrack2
Version: 2.4.24
Release: 0
Summary: Adlib Tracker II - OPL3 music tracker
License: LGPL-2.1-or-later
Group: Productivity/Multimedia/Sound/Editors and Convertors
URL: http://www.adlibtracker.net/
Source: http://www.adlibtracker.net/files/at2_sourcecode_09-09-2019.zip
Source1: %{name}.desktop
Source2: %{name}.changes
Source3: %{name}-rpmlintrc
# Add more search locations for the configuration file -- Arachnos
Patch0: adtrack2-configfile.patch
# Fix note unused variables "drive_list" and "idx" when compiling for Linux -- Arachnos
Patch1: adtrack2-drivelist.patch
# Fix warning comparison always true -- Arachnos
Patch2: adtrack2-comparison.patch
BuildRequires: fpc = 3.0.4
BuildRequires: libSDL-devel >= 1.2.15
BuildRequires: make
BuildRequires: unzip
BuildRequires: update-desktop-files
ExclusiveArch: %ix86
%description
This is an 18-channel FM tracker for the OPL3-chip (or compatible) generally found on the older Soundblaster soundcards from Creative Labs. In other words - a tool for making music with FM-synthesis.
%prep
%setup -qn git
%autopatch -p1
sed -i 's/\r$//' package/ver/sdl/linux/*.sh package/ver/sdl/%{name}.ini package/ver/sdl/%{name}.mht package/ver/sdl/*.txt *.txt
# Set default program home directory
sed -i '/^ *home_dir_path/s|=.*|=%{_datadir}/%{name}|' package/ver/sdl/%{name}.ini
%build
%make_build
%install
install -Dpm 0755 %{name} %{buildroot}%{_bindir}/%{name}
install -Dpm 0755 package/ver/sdl/linux/%{name}_hq1.sh %{buildroot}%{_bindir}/%{name}_hq1.sh
install -Dpm 0755 package/ver/sdl/linux/%{name}_hq2.sh %{buildroot}%{_bindir}/%{name}_hq2.sh
install -Dpm 0644 package/ver/sdl/%{name}.ini %{buildroot}%{_sysconfdir}/%{name}.ini
install -Dpm 0644 package/ver/sdl/linux/%{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -Dpm 0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
install -Dpm 0644 package/ver/sdl/%{name}.mht %{buildroot}%{_defaultdocdir}/%{name}/%{name}.mht
install -Dpm 0644 package/ver/sdl/readme-sdl.txt %{buildroot}%{_defaultdocdir}/%{name}/readme-sdl.txt
install -Dpm 0644 package/ver/sdl/revision.txt %{buildroot}%{_defaultdocdir}/%{name}/revision.txt
install -Dpm 0644 lgpl-2.1.txt %{buildroot}%{_defaultlicensedir}/%{name}/lgpl-2.1.txt
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -pr package/instr package/modules %{buildroot}%{_datadir}/%{name}
%suse_update_desktop_file %{name}
%files
%{_bindir}/%{name}
%{_bindir}/%{name}_hq1.sh
%{_bindir}/%{name}_hq2.sh
%config(noreplace) %{_sysconfdir}/%{name}.ini
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/%{name}/
%{_defaultdocdir}/%{name}/
%{_defaultlicensedir}/%{name}/
%changelog