%global _hardened_build 1 %define debug_package %{nil} Name: matterircd Version: 0.23.0 Release: 1%{?dist} Summary: Connect to your mattermost or slack using your IRC-client of choice. Group: System/Library License: MIT URL: https://github.com/42wim/matterircd Source0: matterircd.service BuildRequires: golang %description Connect to your mattermost or slack using your IRC-client of choice. %prep %setup -q -T -c %{name}-%{version} export GOPATH=`pwd` go get -u -v github.com/42wim/matterircd %build export GOPATH=`pwd` cd src/github.com/42wim/matterircd git checkout v%{version} go build -v -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}" -X 'main.Version="%{version}"' -X 'main.MakeVersion="%{release}"'" %install install -p -D -m 0644 %{SOURCE0} %{buildroot}%{_unitdir}/matterircd.service install -p -D -m 0555 src/github.com/42wim/matterircd/matterircd %{buildroot}%{_bindir}/matterircd install -p -D -m 0644 src/github.com/42wim/matterircd/matterircd.toml.example %{buildroot}%{_sysconfdir}/matterircd/matterircd.toml %post %systemd_post matterircd.service %preun %systemd_preun matterircd.service %postun %systemd_postun matterircd.service %files %doc %config(noreplace) %{_sysconfdir}/matterircd/matterircd.toml %{_unitdir}/matterircd.service %{_bindir}/matterircd %changelog