File wiliwili.spec of Package wiliwili
#
# spec file for package wiliwili
#
# Copyright (c) 2023 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: wiliwili
Version: 0.0.1.git
Release: 0
Summary: A third-party Bilibili client designed for controller users
License: GPL-3.0-only
URL: https://github.com/xfangfang/wiliwili
Source0: _service
BuildRequires: libcurl-devel
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(opencc)
BuildRequires: cmake(sdl2) sdl2-compat-devel
BuildRequires: pkgconfig(zlib-ng)
BuildRequires: pystring-devel
BuildRequires: pkgconfig(tinyxml2) cmake(qrcodegen)
BuildRequires: pkgconfig(fmt)
BuildRequires: pkgconfig(civetweb)
BuildRequires: libdbus-c++-devel
BuildRequires: libwebp-devel
BuildRequires: wayland-devel
BuildRequires: c++_compiler
BuildRequires: mbedtls-devel
BuildRequires: glibc-devel
BuildRequires: libopenssl-devel
BuildRequires: gcc-PIE
BuildRequires: cmake
BuildRequires: mpv-devel
BuildRequires: fdupes
BuildRequires: adobe-sourcehansans-cn-fonts
Requires: adobe-sourcehansans-cn-fonts
%description
A third-party Bilibili client designed for controller users
%prep
%setup -q -n %_sourcedir/%name-%version -T -D
%__mkdir -p %_builddir/%_sourcedir
%__ln -rs %_sourcedir/%name-%version %_builddir/%_sourcedir
%__rm -rf %_sourcedir/%name-%version/resources/font/{switch_font.ttf,LICENSE.txt,FREEWARE.txt}
%__rm -rf %_sourcedir/%name-%version/resources/img/sys/backup
%__ln -s %{_datadir}/fonts/truetype/SourceHanSansCN-Regular.otf %_sourcedir/%name-%version/resources/font/switch_font.ttf
%build
%cmake \
-DPLATFORM_DESKTOP=ON -DINSTALL=ON -DUSE_SYSTEM_GLFW=ON \
-DGLFW_BUILD_WAYLAND=ON -DGLFW_BUILD_X11=OFF \
-DUSE_SYSTEM_CURL=ON \
-DUSE_SYSTEM_CPR=OFF \
-DUSE_SYSTEM_OPENCC=ON \
-DUSE_SYSTEM_FMT=ON \
-DUSE_SYSTEM_TINYXML2=ON \
-DUSE_SYSTEM_SDL2=ON \
-DUSE_SDL2=ON \
-DUSE_SYSTEM_MONGOOSE=OFF \
-DUSE_SYSTEM_QRCODEGEN=ON
%cmake_build
%install
%cmake_install
%__sed -i 's|Exec=wiliwili|Exec=env SDL_VIDEODRIVER=wayland,x11 wiliwili|g' %{buildroot}/%{_datadir}/applications/cn.xfangfang.wiliwili.desktop
%fdupes %{buildroot}
%post
%postun
%files
%license LICENSE
%doc README.md
%{_datadir}/%{name}
%{_bindir}/%{name}
%{_datadir}/applications/cn.xfangfang.wiliwili.desktop
%{_datadir}/icons/hicolor
%{_datadir}/metainfo/cn.xfangfang.wiliwili.appdata.xml
%changelog