File wineasio.spec of Package wineasio

#
# spec file for package wineasio
#
# Copyright (c) 2020 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}
Name:           wineasio
Version:        1.3.0
Release:        0
Summary:        ASIO to JACK driver for wine
License:        GPL-2.0 and LGPL-2.1-or-later
Group:          System/Emulators/PC
URL:            https://github.com/falkTX/wineasio
Source0:        %{name}-%{version}.tar.gz
BuildRequires:  pkgconfig
BuildRequires:  wine
BuildRequires:  wine-devel
BuildRequires:  pkgconfig(jack)
Recommends:     %{name}-settings

%description
WineASIO provides an ASIO to JACK driver for WINE.
ASIO is the most common Windows low-latency driver,
so is commonly used in audio workstation programs.

After install run:

(modify if you have differen wine prefix)
ln -s /usr/lib64/wine/x86_64-windows/wineasio.dll ~/.wine/drive_c/windows/system32/wineasio.dll
wine64 regsvr32 wineasio.dll

for 32 bit apps:
ln -s /usr/lib64/wine/i386-windows/wineasio.dll ~/.wine/drive_c/windows/syswow64/wineasio.dll
regsvr32 wineasio.dll

%package settings
Summary:        Custom GUI for WineASIO settings, made by PyQt
License:        GPL-2.0-only
BuildArch:      noarch
Requires:       %{name}

%description settings
A custom GUI for WineASIO settings, made by PyQt (taken off Cadence project code).
Also the "wineasio-register" script.

%prep
%setup -q

%build

%ifarch x86_64
make 64
%else

%make_build 32
%endif

%install

%ifarch x86_64
mkdir -p %{buildroot}/%{_libdir}/wine/x86_64-unix
mkdir -p %{buildroot}/%{_libdir}/wine/x86_64-windows
cp build64/wineasio64.dll.so %{buildroot}/%{_libdir}/wine/x86_64-unix/
cp build64/wineasio64.dll %{buildroot}/%{_libdir}/wine/x86_64-windows/
%else
mkdir -p %{buildroot}/%{_libdir}/wine/i386-unix
mkdir -p %{buildroot}/%{_libdir}/wine/i386-windows
cp build32/wineasio32.dll.so %{buildroot}/%{_libdir}/wine/i386-unix/
cp build32/wineasio32.dll %{buildroot}/%{_libdir}/wine/i386-windows/
%endif
pushd gui
%make_install
popd

install wineasio-register %{buildroot}/%{_bindir}/

%python3_fix_shebang_path %{buildroot}%{_datadir}/wineasio/*

%files
%doc README.md
%license COPYING.LIB
%ifarch x86_64
%{_libdir}/wine/x86_64-unix/wineasio64.dll.so
%{_libdir}/wine/x86_64-windows/wineasio64.dll
%else
%{_libdir}/wine/i386-unix/wineasio32.dll.so
%{_libdir}/wine/i386-windows/wineasio32.dll
%endif
%files settings
%license COPYING.GUI
%{_bindir}/wineasio-settings
%{_bindir}/wineasio-register
%dir %{_datadir}/wineasio
%{_datadir}/wineasio/settings.py
%{_datadir}/wineasio/ui_settings.py

%changelog
openSUSE Build Service is sponsored by