matterircd package creation

Signed-off-by: tuibuilder_pel7x64builder0 <tuibuilder@powerel.org>
master
tuibuilder_pel7x64builder0 2019-08-22 10:41:36 +02:00
parent b3f9aa4c54
commit fd614d8b98
1 changed files with 57 additions and 0 deletions

57
SPECS/matterircd.spec Normal file
View File

@ -0,0 +1,57 @@
%global _hardened_build 1
%define debug_package %{nil}

Name: matterircd
Version: 0.19.2
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 tags/v%{version}
go build -ldflags '-extldflags -s -w -buildid %{version}'


%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