Browse Source

matterbridge update version and optimize build

Signed-off-by: tuibuilder_pel7ppc64lebuilder0 <tuibuilder@powerel.org>
master
tuibuilder_pel7ppc64lebuilder0 4 years ago
parent
commit
357dbe1b6e
  1. 14
      SPECS/matterbridge.spec

14
SPECS/matterbridge.spec

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
%define debug_package %{nil}

Name: matterbridge
Version: 1.22.0
Version: 1.22.1
Release: 1%{?dist}
Summary: Bridge to your chat channels
Group: System/Library
@ -21,20 +21,22 @@ and matrix with REST API (mattermost not required!) @@ -21,20 +21,22 @@ and matrix with REST API (mattermost not required!)
%prep
%setup -q -T -c %{name}-%{version}
export GOPATH=`pwd`
go get -u -v github.com/42wim/matterbridge
mkdir -p go/src/github.com/42wim/
cd go/src/github.com/42wim/
git clone https://github.com/42wim/matterbridge


%build
export GOPATH=`pwd`
cd src/github.com/42wim/matterbridge
cd go/src/github.com/42wim/matterbridge
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}"'"
go build -v -trimpath -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}"' -X 'main.githash="$(git log --pretty=format:'%h' -n 1)"'" -o matterbridge


%install
install -p -D -m 0644 %{SOURCE0} %{buildroot}%{_unitdir}/matterbridge.service
install -p -D -m 0555 src/github.com/42wim/matterbridge/matterbridge %{buildroot}%{_bindir}/matterbridge
install -p -D -m 0644 src/github.com/42wim/matterbridge/matterbridge.toml.sample %{buildroot}%{_sysconfdir}/matterbridge/matterbridge.toml
install -p -D -m 0555 go/src/github.com/42wim/matterbridge/matterbridge %{buildroot}%{_bindir}/matterbridge
install -p -D -m 0644 go/src/github.com/42wim/matterbridge/matterbridge.toml.sample %{buildroot}%{_sysconfdir}/matterbridge/matterbridge.toml


%post

Loading…
Cancel
Save