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.3.4
Release: 0
Summary: Audio Share can share Windows/Linux computer's audio to Android phone over network
License: LGPLv3
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
%cmake_build
%install
cd server-core
%cmake_install
%files
%{_bindir}/as-cmd
%changelog