You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.5 KiB
53 lines
1.5 KiB
%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
|
|
|