| |
@@ -59,20 +59,26 @@
|
| |
%endif
|
| |
|
| |
%build
|
| |
- export BUILDTAGS=notmuch
|
| |
- 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
|
| |
+ # GO_BUILDTAGS: Enable notmuch explicitly instead of relying on auto-detection
|
| |
+ # in build script.
|
| |
+ # GO_LDFLAGS: Set to an empty string so the C LDFLAGS set by %%set_build_flags
|
| |
+ # aren't read instead.
|
| |
+ GO_BUILDTAGS=notmuch GO_LDFLAGS=""
|
| |
+
|
| |
+ # BUILD_OPTS: Set `go build` flags
|
| |
+ # DATE: Set DATE based on SOURCE_DATE_EPOCH. The Makefile sets it based on the
|
| |
+ # current time.
|
| |
+ # GOFLAGS: Set to an empty string. We want to clear the definition from the Makefile.
|
| |
+ # GO_EXTRA_LDFLAGS: Set `go build -ldflags` argument
|
| |
+ # Other values should be self-explanatory
|
| |
+ %make_build \
|
| |
+ BUILD_OPTS=%{gobuild_baseflags_shescaped} \
|
| |
+ DATE="$(date -d "@${SOURCE_DATE_EPOCH}" +%Y-%m-%d)" \
|
| |
+ GOFLAGS= \
|
| |
+ GO_EXTRA_LDFLAGS=%{gobuild_ldflags_shescaped} \
|
| |
+ PREFIX=%{_prefix} \
|
| |
+ VERSION=%{version} \
|
| |
|
| |
%install
|
| |
export PREFIX=%{_prefix}
|
| |
This takes advantage of https://pagure.io/go-rpm-macros/pull-request/62. CI
will fail until that's merged and built.
/cc @rjarry