File proton-bridge.spec of Package proton-bridge

#
# spec file for package proton-bridge
#
# 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/
#


Name:           proton-bridge
Version:        2.0.1
Release:        0
Summary:        ProtonMail Bridge for e-mail clients
License:        GPL-3.0
URL:            https://github.com/ProtonMail/proton-bridge/releases
Source:         https://github.com/ProtonMail/proton-bridge/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        vendor.tar.xz
BuildRequires:  golang-packaging
BuildRequires:  golang(API) >= 1.17
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig(libsecret-1)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Multimedia)
BuildRequires:  pkgconfig(Qt5Designer)
BuildRequires:  pkgconfig(Qt5Quick)
BuildRequires:  pkgconfig(Qt5RemoteObjects)
BuildRequires:  pkgconfig(Qt5Script)

%description
When launched, Bridge will initialize local IMAP/SMTP servers and render its GUI.

%prep
%autosetup -n %{name}-%{version} -p1 -a 1

%build
pushd utils
./credits.sh bridge
popd
%define qt_modules Qt5Core Qt5Multimedia Qt5DBus Qt5Designer Qt5Quick Qt5Qml Qt5RemoteObjects Qt5Script
export CGO_CFLAGS_ALLOW=".*"
export CGO_CXXFLAGS_ALLOW=".*"
export CGO_LDFLAGS_ALLOW=".*"
export CGO_CXXFLAGS="$(pkg-config --cflags %{qt_modules}) -Wno-deprecated-declarations -Wno-return-type"
export CGO_LDFLAGS="$(pkg-config   --libs  %{qt_modules})"
go build -mod=vendor -buildmode=pie ./cmd/...

%install

%files

%changelog
openSUSE Build Service is sponsored by