File aerc.spec of Package aerc

#
# spec file for package aerc
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2023 Hannes Braun
#
# 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 test TEST
%{?!_libexecdir:%define _libexecdir %{_prefix}/libexec}
Name:           aerc
Version:        0.20.1+git.1758898472.a57e7830
Release:        0
Summary:        An email client for terminals
License:        MIT
Group:          Productivity/Networking/Email/Clients
URL:            https://aerc-mail.org/
#!CreateArchive: aerc
Source0:        %{name}-%{version}.tar.xz
Source1:        vendor.tar.gz
BuildRequires:  gcc
BuildRequires:  go
BuildRequires:  hicolor-icon-theme
BuildRequires:  make
BuildRequires:  notmuch-devel
BuildRequires:  scdoc
BuildRequires:  zstd
# for :menu
Recommends:     fzf
Recommends:     w3m

%description
aerc is an email client that runs in terminals.

%prep
%setup -q -a1

sed -i 's|#!%{_bindir}/env python3|#!%{_bindir}/python3|' \
    ./contrib/carddav-query \
    filters/show-ics-details.py

%build
%if "%{_arch}" == "ppc64"
    %make_build CC=cc GOFLAGS=""
%else
    %make_build CC=cc GOFLAGS="-buildmode=pie -tags=notmuch"
%endif

%install
%make_install PREFIX=%{_prefix} LIBEXECDIR=%{_libexecdir}/%{name}

%files
%license LICENSE
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_bindir}/%{name}
%{_bindir}/carddav-query
%dir %{_libexecdir}
%{_libexecdir}/%{name}
%{_mandir}/man*/aerc*%{?ext_man}
%{_datadir}/icons/hicolor/scalable/apps/aerc.svg
%{_mandir}/man1/carddav-query.1%{?ext_man}

%changelog
openSUSE Build Service is sponsored by