|
|
@ -4,11 +4,11 @@ |
|
|
|
%define debug_package %{nil} |
|
|
|
%define debug_package %{nil} |
|
|
|
|
|
|
|
|
|
|
|
Name: mattermost-plugin-github |
|
|
|
Name: mattermost-plugin-github |
|
|
|
Version: 0.9.1 |
|
|
|
Version: 0.10.2 |
|
|
|
Release: 1%{?dist} |
|
|
|
Release: 1%{?dist} |
|
|
|
|
|
|
|
URL: https://github.com/mattermost/mattermost-plugin-github |
|
|
|
Summary: Plugin for Mattermost and Github |
|
|
|
Summary: Plugin for Mattermost and Github |
|
|
|
License: Apache |
|
|
|
License: Apache |
|
|
|
Patch1: mattermost-plugin-github-arch-make.patch |
|
|
|
|
|
|
|
BuildRequires: golang |
|
|
|
BuildRequires: golang |
|
|
|
Requires: mattermost |
|
|
|
Requires: mattermost |
|
|
|
|
|
|
|
|
|
|
@ -22,31 +22,42 @@ export GOPATH=`pwd` |
|
|
|
go get -u -v github.com/golang/dep/cmd/dep |
|
|
|
go get -u -v github.com/golang/dep/cmd/dep |
|
|
|
mkdir -p src/github.com/mattermost/ |
|
|
|
mkdir -p src/github.com/mattermost/ |
|
|
|
cd 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-github |
|
|
|
git clone https://github.com/mattermost/mattermost-plugin-github |
|
|
|
%patch1 -p0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build |
|
|
|
%build |
|
|
|
export GOPATH=`pwd` |
|
|
|
export GOPATH=`pwd` |
|
|
|
export PATH="bin:"$PATH |
|
|
|
export PATH="bin:"$PATH |
|
|
|
|
|
|
|
export GO111MODULE=on |
|
|
|
cd src/github.com/mattermost/mattermost-plugin-github |
|
|
|
cd src/github.com/mattermost/mattermost-plugin-github |
|
|
|
sed 's/-race//' -i Makefile |
|
|
|
git checkout tags/v%{version} |
|
|
|
make |
|
|
|
# webapp |
|
|
|
|
|
|
|
pushd webapp |
|
|
|
|
|
|
|
npm install |
|
|
|
|
|
|
|
npm run build |
|
|
|
|
|
|
|
popd |
|
|
|
|
|
|
|
# server |
|
|
|
|
|
|
|
go mod download |
|
|
|
|
|
|
|
go build -ldflags '-extldflags -s -w -buildid %{version}' -o plugin.exe ./server |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install |
|
|
|
%install |
|
|
|
mkdir -p %{buildroot}%{mattermost_home}/plugins |
|
|
|
mkdir -p %{buildroot}%{mattermost_home}/plugins/github/{server,webapp}/dist/ |
|
|
|
cp -rv src/github.com/mattermost/mattermost-plugin-github/dist/github/ %{buildroot}%{mattermost_home}/plugins/ |
|
|
|
cp -rv src/github.com/mattermost/mattermost-plugin-github/plugin.json %{buildroot}%{mattermost_home}/plugins/github/ |
|
|
|
|
|
|
|
sed 's/"executables": {/"executables": { "server\/dist\/plugin.exe"/' -i %{buildroot}%{mattermost_home}/plugins/github/plugin.json |
|
|
|
|
|
|
|
sed '/"darwin-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/github/plugin.json |
|
|
|
|
|
|
|
sed '/"linux-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/github/plugin.json |
|
|
|
|
|
|
|
sed '/"windows-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/github/plugin.json |
|
|
|
|
|
|
|
cp -rv src/github.com/mattermost/mattermost-plugin-github/plugin.exe %{buildroot}%{mattermost_home}/plugins/github/server/dist/ |
|
|
|
|
|
|
|
cp -rv src/github.com/mattermost/mattermost-plugin-github/webapp/dist/main.js %{buildroot}%{mattermost_home}/plugins/github/webapp/dist/ |
|
|
|
|
|
|
|
cp -rv src/github.com/mattermost/mattermost-plugin-github/assets %{buildroot}%{mattermost_home}/plugins/github/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files |
|
|
|
%files |
|
|
|
%{mattermost_home}/plugins/github/assets/profile.png |
|
|
|
%{mattermost_home}/plugins/github/assets/profile.png |
|
|
|
%{mattermost_home}/plugins/github/plugin.json |
|
|
|
%{mattermost_home}/plugins/github/plugin.json |
|
|
|
%{mattermost_home}/plugins/github/server/dist/plugin-linux-amd64 |
|
|
|
%{mattermost_home}/plugins/github/server/dist/plugin.exe |
|
|
|
%{mattermost_home}/plugins/github/server/dist/plugin-linux-ppc64 |
|
|
|
|
|
|
|
%{mattermost_home}/plugins/github/server/dist/plugin-linux-ppc64le |
|
|
|
|
|
|
|
%{mattermost_home}/plugins/github/webapp/dist/main.js |
|
|
|
%{mattermost_home}/plugins/github/webapp/dist/main.js |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog |
|
|
|
%changelog |
|
|
|