File audio-share.spec of Package audio-share

#
# spec file for package audio-share
#
# Copyright (c) 2025 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:           audio-share
Version:        0.0.0
Release:        0
Summary:        Share computer audio to Android devices over network
License:        LGPL-3.0-or-later
URL:            https://github.com/mkckr0/audio-share
Source0:        %{name}-%{version}.tar.gz
BuildRequires:  asio-devel
BuildRequires:  cmake(protobuf)
BuildRequires:  pkgconfig(libpipewire-0.3)
BuildRequires:  cmake(spdlog)
BuildRequires:  cmake(cxxopts)
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  sed
BuildRequires:  ninja

%description
Audio Share can share Windows/Linux computer's audio to Android phone over network, so your phone becomes the speaker of computer. (You needn't buy a new speaker😄.)

%prep
%autosetup -p1
conf="find_package(Protobuf CONFIG REQUIRED)"
modf="find_package(Protobuf MODULE REQUIRED)"
sedstr="s~${conf}~${conf}\n${modf}~g;"
sedstr="${sedstr} s~.*-static-libstdc++.*~~g;"
sedstr="${sedstr} s~.*asio CONFIG.*~~g;"
sedstr="${sedstr} s~asio::asio~~g;"
sed -i "${sedstr}" server-core/CMakeLists.txt

%build
cd server-core
%cmake -GNinja
%ninja_build

%install
cd server-core/build
%ninja_install

%check
# No test suite available upstream

%files
%{_bindir}/as-cmd

%changelog
* Fri Nov 07 2025 itachi_re <xanbenson99@gmail.com> - 0.0.0-0
- Initial packaging for openSUSE
openSUSE Build Service is sponsored by