| |
@@ -1,35 +1,41 @@
|
| |
# Generated by go2rpm 1.6.0
|
| |
- %bcond_without check
|
| |
+ %bcond check 1
|
| |
+ # aerc has a lot of dependencies and is picky about them. Upstream does a good
|
| |
+ # job at keeping them updated. aerc is prone to crashes with Fedora's
|
| |
+ # dependency versions, many of which are out of date
|
| |
+ %bcond vendor 1
|
| |
|
| |
# https://git.sr.ht/~rjarry/aerc
|
| |
%global goipath git.sr.ht/~rjarry/aerc
|
| |
- Version: 0.15.2
|
| |
- %global topdir %{name}-%{version}
|
| |
+ %global version0 0.17.0
|
| |
|
| |
%gometa
|
| |
|
| |
%global common_description %{expand:
|
| |
- Aerc is an email client that runs in your terminal. It's highly
|
| |
+ Aerc is an email client that runs in your terminal. It is highly
|
| |
efficient and extensible, perfect for the discerning hacker.}
|
| |
|
| |
- %global golicenses LICENSE
|
| |
- %global godocs doc README.md
|
| |
-
|
| |
Name: aerc
|
| |
+ Version: %{forgeversion}
|
| |
Release: %autorelease
|
| |
Summary: Email client for your terminal
|
| |
|
| |
- License: MIT
|
| |
+ SourceLicense: MIT
|
| |
+ # See LICENSES.dependencies
|
| |
+ License: MIT AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC
|
| |
URL: %{gourl}
|
| |
- # The forge macros don't support Sourcehut.
|
| |
- # https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/209
|
| |
- Source: %{gourl}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
| |
+ Source0 %{forgesource}
|
| |
+ Source1: aerc-%{version}-vendor.tar.gz
|
| |
+ # https://git.sr.ht/~gotmax23/fedora-scripts/tree/main/item/go-sig/go_vendor_licenses.py
|
| |
+ Source2: LICENSES.dependencies
|
| |
|
| |
- BuildRequires: scdoc
|
| |
BuildRequires: desktop-file-utils
|
| |
+ # wrap and colorize filters are written in C
|
| |
+ BuildRequires: gcc
|
| |
+ BuildRequires: glibc-all-langpacks
|
| |
BuildRequires: gnupg
|
| |
BuildRequires: notmuch-devel
|
| |
- BuildRequires: gcc
|
| |
+ BuildRequires: scdoc
|
| |
|
| |
Requires: notmuch
|
| |
|
| |
@@ -37,36 +43,37 @@
|
| |
%{common_description}
|
| |
|
| |
%prep
|
| |
- %goprep
|
| |
- %autopatch -p1
|
| |
-
|
| |
- # Disable building of aerc that we handle manually in the SPEC and
|
| |
- # preserve mtimes
|
| |
- sed -e 's|install: $(DOCS) aerc wrap|install: $(DOCS)|' \
|
| |
- -e 's|install -m|install -pm|' \
|
| |
- -i Makefile
|
| |
+ %autosetup -p1 %{forgesetupargs} %{?with_vendor:-b1}
|
| |
+ %goprep -e %{?with_vendor:-k}
|
| |
+ cp %{SOURCE2} .
|
| |
|
| |
+ %if %{without vendor}
|
| |
# From go.mod replace statements:
|
| |
# replace golang.org/x/crypto => github.com/ProtonMail/go-crypto v0.0.0-20200420072808-71bec3603bf3
|
| |
- # replace github.com/zenhack/go.notmuch => github.com/brunnre8/go.notmuch v0.0.0-20201126061756-caa2daf7093c
|
| |
sed -i "s|golang.org/x/crypto|github.com/ProtonMail/go-crypto|" $(find . -name "*.go" -type f)
|
| |
- sed -i "s|github.com/zenhack/go.notmuch|github.com/brunnre8/go.notmuch|" $(find . -name "*.go" -type f)
|
| |
+ %endif
|
| |
|
| |
%generate_buildrequires
|
| |
+ %if %{without vendor}
|
| |
%go_generate_buildrequires
|
| |
- echo 'golang(github.com/brunnre8/go.notmuch)'
|
| |
+ %endif
|
| |
|
| |
%build
|
| |
- %set_build_flags
|
| |
- make wrap colorize
|
| |
export BUILDTAGS=notmuch
|
| |
- export LDFLAGS="-X main.Version=%{version} \
|
| |
- -X main.Prefix=%{_prefix} \
|
| |
- -X main.Flags=$(echo -- $(GOFLAGS) | base64 | tr -d '\r\n') \
|
| |
- -X git.sr.ht/~rjarry/aerc/config.shareDir=%{_datadir} \
|
| |
- -X git.sr.ht/~rjarry/aerc/config.libexecDir=%{_libexecdir}"
|
| |
+ export LDFLAGS="\
|
| |
+ -X main.Version=%{version} \
|
| |
+ -X main.Date="$(date -d "@${SOURCE_DATE_EPOCH}" +%Y-%m-%d)" \
|
| |
+ -X git.sr.ht/~rjarry/aerc/config.shareDir=%{_datadir} \
|
| |
+ -X git.sr.ht/~rjarry/aerc/config.libexecDir=%{_libexecdir} \
|
| |
+ "
|
| |
%gobuild -o aerc %{goipath}
|
| |
|
| |
+ # The go macros interfere with C build flags.
|
| |
+ # Reset LDFLAGS and set other missing build flags.
|
| |
+ unset LDFLAGS
|
| |
+ %set_build_flags
|
| |
+ %make_build wrap colorize doc
|
| |
+
|
| |
%install
|
| |
export PREFIX=%{_prefix}
|
| |
%make_install
|
| |
@@ -74,17 +81,20 @@
|
| |
|
| |
%if %{with check}
|
| |
%check
|
| |
+ LANG=en_US.UTF-8 ./filters/test.sh
|
| |
%gocheck
|
| |
%endif
|
| |
|
| |
%files
|
| |
- %license LICENSE
|
| |
+ %license LICENSE %{?with_vendor:vendor/modules.txt LICENSES.dependencies}
|
| |
%doc doc README.md
|
| |
%{_bindir}/aerc
|
| |
+ %{_bindir}/carddav-query
|
| |
%{_datadir}/aerc/
|
| |
%{_datadir}/applications/aerc.desktop
|
| |
%{_libexecdir}/aerc/
|
| |
%{_mandir}/man1/aerc-*.1.*
|
| |
+ %{_mandir}/man1/carddav-query.1*
|
| |
%{_mandir}/man1/aerc.1*
|
| |
%{_mandir}/man5/aerc-*.5.*
|
| |
%{_mandir}/man7/aerc-*.7.*
|
| |