|
|
|
@ -3,12 +3,12 @@
@@ -3,12 +3,12 @@
|
|
|
|
|
%define mattermost_home /var/lib/mattermost |
|
|
|
|
%define debug_package %{nil} |
|
|
|
|
|
|
|
|
|
Name: mattermost-plugin-welcombot |
|
|
|
|
Version: 0.1 |
|
|
|
|
Name: mattermost-plugin-welcomebot |
|
|
|
|
Version: 1.1.0 |
|
|
|
|
Release: 1%{?dist} |
|
|
|
|
URL: https://github.com/mattermost/mattermost-plugin-welcomebot/ |
|
|
|
|
Summary: Plugin for Mattermost as a Welcome Bot |
|
|
|
|
License: Apache |
|
|
|
|
Patch1: mattermost-plugin-welcomebot-arch-make.patch |
|
|
|
|
BuildRequires: golang |
|
|
|
|
Requires: mattermost |
|
|
|
|
|
|
|
|
@ -22,32 +22,31 @@ export GOPATH=`pwd`
@@ -22,32 +22,31 @@ export GOPATH=`pwd`
|
|
|
|
|
go get -u -v github.com/golang/dep/cmd/dep |
|
|
|
|
mkdir -p src/github.com/mattermost/ |
|
|
|
|
cd src/github.com/mattermost/ |
|
|
|
|
git clone https://github.com/mattermost/mattermost-server |
|
|
|
|
git clone https://github.com/mattermost/mattermost-webapp |
|
|
|
|
git clone https://github.com/mattermost/mattermost-plugin-welcomebot |
|
|
|
|
%patch1 -p0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build |
|
|
|
|
export GOPATH=`pwd` |
|
|
|
|
export PATH="bin:"$PATH |
|
|
|
|
export GO111MODULE=on |
|
|
|
|
cd src/github.com/mattermost/mattermost-plugin-welcomebot |
|
|
|
|
%ifarch ppc64 |
|
|
|
|
sed 's/-race//' -i Makefile |
|
|
|
|
%endif |
|
|
|
|
make |
|
|
|
|
go mod download |
|
|
|
|
go build -ldflags '-extldflags -s -w -buildid %{version}' -o plugin.exe ./server |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install |
|
|
|
|
mkdir -p %{buildroot}%{mattermost_home}/plugins |
|
|
|
|
cp -rv src/github.com/mattermost/mattermost-plugin-welcomebot/dist/com.mattermost.welcomebot/ %{buildroot}%{mattermost_home}/plugins/ |
|
|
|
|
mkdir -p %{buildroot}%{mattermost_home}/plugins/com.mattermost.welcomebot/server/dist/ |
|
|
|
|
cp -rv src/github.com/mattermost/mattermost-plugin-welcomebot/plugin.json %{buildroot}%{mattermost_home}/plugins/com.mattermost.welcomebot/ |
|
|
|
|
sed 's/"executables": {/"executables": { "server\/dist\/plugin.exe"/' -i %{buildroot}%{mattermost_home}/plugins/com.mattermost.welcomebot/plugin.json |
|
|
|
|
sed '/"darwin-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/com.mattermost.welcomebot/plugin.json |
|
|
|
|
sed '/"linux-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/com.mattermost.welcomebot/plugin.json |
|
|
|
|
sed '/"windows-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/com.mattermost.welcomebot/plugin.json |
|
|
|
|
cp -rv src/github.com/mattermost/mattermost-plugin-welcomebot/plugin.exe %{buildroot}%{mattermost_home}/plugins/com.mattermost.welcomebot/server/dist/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files |
|
|
|
|
%{mattermost_home}/plugins/com.mattermost.welcomebot/plugin.json |
|
|
|
|
%{mattermost_home}/plugins/com.mattermost.welcomebot/server/dist/plugin-linux-amd64 |
|
|
|
|
%{mattermost_home}/plugins/com.mattermost.welcomebot/server/dist/plugin-linux-ppc64 |
|
|
|
|
%{mattermost_home}/plugins/com.mattermost.welcomebot/server/dist/plugin-linux-ppc64le |
|
|
|
|
%{mattermost_home}/plugins/com.mattermost.welcomebot/server/dist/plugin.exe |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog |
|
|
|
|