# Generated by go2rpm 1.12.0.post0 %bcond_without check # https://github.com/mautrix/signal %global goipath go.mau.fi/mautrix-signal %global forgeurl https://github.com/mautrix/signal Version: 0.5.1 %gometa -L -f %global common_description %{expand: A Matrix-Signal puppeting bridge.} Name: mautrix-signal Release: %autorelease Summary: A Matrix-Signal puppeting bridge License: AGPL-3.0-only AND AGPL-3.0-or-later AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND GPL-3.0-only AND ISC AND MIT AND MPL-2.0 AND blessing URL: %{gourl} Source0: %{gosource} Source1: %{archivename}-vendor.tar.xz Source2: go-vendor-tools.toml # https://mau.dev/tulir/gomuks-build-docker/-/jobs/artifacts/master/raw/libsignal_ffi.a?job=libsignal%20linux%20amd64 Source3: libsignal_ffi.a.x86_64 # https://mau.dev/tulir/gomuks-build-docker/-/jobs/artifacts/master/raw/libsignal_ffi.a?job=libsignal%20linux%20arm64 Source4: libsignal_ffi.a.aarch64 Source5: mautrix-signal.sysusers Source6: mautrix-signal.service ExclusiveArch: x86_64 aarch64 BuildRequires: go-vendor-tools BuildRequires: g++ BuildRequires: libolm-devel BuildRequires: systemd-rpm-macros %{?sysusers_requires_compat} %description %{common_description} %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %ifarch x86_64 cp %{SOURCE3} ./libsignal_ffi.a %endif %ifarch aarch64 cp %{SOURCE4} ./libsignal_ffi.a %endif export LIBRARY_PATH=$(pwd):$LIBRARY_PATH %gobuild -o %{gobuilddir}/bin/mautrix-signal %{goipath} %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -p -D -m 0644 %{SOURCE5} %{buildroot}%{_sysusersdir}/mautrix-signal.conf install -p -D -T -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/mautrix-signal.service %check %go_vendor_license_check -c %{S:2} %if %{with check} export LIBRARY_PATH=$(pwd):$LIBRARY_PATH %gocheck %endif %pre %sysusers_create_compat %{SOURCE5} %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc README.md CHANGELOG.md ROADMAP.md pkg/libsignalgo/README.md %{_sysusersdir}/mautrix-signal.conf %{_unitdir}/mautrix-signal.service %{_bindir}/mautrix-signal %changelog %autochangelog