Browse Source

mattermost-plugin-statuspage package creation

Signed-off-by: webbuilder_pel7x64builder0 <webbuilder@powerel.org>
master
webbuilder_pel7x64builder0 6 years ago
parent
commit
c4e2d6d16b
  1. 55
      SPECS/mattermost-plugin-statuspage.spec

55
SPECS/mattermost-plugin-statuspage.spec

@ -0,0 +1,55 @@
%define mattermost_user mattermost
%define mattermost_group mattermost
%define mattermost_home /var/lib/mattermost
%define debug_package %{nil}

Name: mattermost-plugin-statuspage
Version: 0.0.7
Release: 1%{?dist}
Summary: Plugin for Mattermost and StatusPage
License: Apache
Patch1: mattermost-plugin-github-arch-make.patch
BuildRequires: golang
Requires: mattermost


%description


%prep
%setup -q -T -c %{name}-%{version}
export GOPATH=`pwd`
go get -u -v github.com/golang/dep/cmd/dep
mkdir -p src/github.com/cpanato/
cd src/github.com/cpanato/
#git clone https://github.com/mattermost/mattermost-server
#git clone https://github.com/mattermost/mattermost-webapp
git clone https://github.com/cpanato/mattermost-plugin-statuspage
#%patch1 -p0


%build
export GOPATH=`pwd`
export PATH="bin:"$PATH
cd src/github.com/cpanato/mattermost-plugin-statuspage
pushd server
$GOPATH/bin/dep ensure
popd
go build -o plugin.exe ./server


%install
mkdir -p %{buildroot}%{mattermost_home}/plugins/statuspage/server
cp -rv src/github.com/cpanato/mattermost-plugin-statuspage/plugin.json %{buildroot}%{mattermost_home}/plugins/statuspage/
sed 's/"executables": {/"executables": { "server\/plugin.exe"/' -i %{buildroot}%{mattermost_home}/plugins/statuspage/plugin.json
sed '/"darwin-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/statuspage/plugin.json
sed '/"linux-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/statuspage/plugin.json
sed '/"windows-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/statuspage/plugin.json
cp -rv src/github.com/cpanato/mattermost-plugin-statuspage/plugin.exe %{buildroot}%{mattermost_home}/plugins/statuspage/server/


%files
%{mattermost_home}/plugins/statuspage/plugin.json
%{mattermost_home}/plugins/statuspage/server/plugin.exe

%changelog
Loading…
Cancel
Save