webbuilder_pel7x64builder0
6 years ago
1 changed files with 53 additions and 0 deletions
@ -0,0 +1,53 @@
@@ -0,0 +1,53 @@
|
||||
%define mattermost_user mattermost |
||||
%define mattermost_group mattermost |
||||
%define mattermost_home /var/lib/mattermost |
||||
%define debug_package %{nil} |
||||
|
||||
Name: mattermost-plugin-remind |
||||
Version: 0.0.1 |
||||
Release: 1%{?dist} |
||||
Summary: Plugin for Mattermost and Remind |
||||
License: Apache |
||||
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/scottleedavis/ |
||||
cd src/github.com/scottleedavis/ |
||||
git clone https://github.com/scottleedavis/mattermost-plugin-remind |
||||
|
||||
|
||||
%build |
||||
export GOPATH=`pwd` |
||||
export PATH="bin:"$PATH |
||||
cd src/github.com/scottleedavis/mattermost-plugin-remind |
||||
pushd server |
||||
$GOPATH/bin/dep ensure |
||||
go build -o plugin.exe |
||||
popd |
||||
|
||||
|
||||
|
||||
%install |
||||
mkdir -p %{buildroot}%{mattermost_home}/plugins/remind/{server,webapp} |
||||
cp -rv src/github.com/scottleedavis/mattermost-plugin-remind/plugin.json %{buildroot}%{mattermost_home}/plugins/remind/ |
||||
sed 's/"executables": {/"executables": { plugin.exe/' -i %{buildroot}%{mattermost_home}/plugins/remind/plugin.json |
||||
sed '/"darwin-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/remind/plugin.json |
||||
sed '/"linux-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/remind/plugin.json |
||||
sed '/"windows-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/remind/plugin.json |
||||
cp -rv src/github.com/scottleedavis/mattermost-plugin-remind/server/plugin.exe %{buildroot}%{mattermost_home}/plugins/remind/server/ |
||||
|
||||
|
||||
%files |
||||
%{mattermost_home}/plugins/remind/plugin.json |
||||
%{mattermost_home}/plugins/remind/server/plugin.exe |
||||
|
||||
|
||||
%changelog |
Loading…
Reference in new issue