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.
 
 
 
 
 
 

59 lines
1.7 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.4.4
Release: 1%{?dist}
URL: https://github.com/scottleedavis/mattermost-plugin-remind/
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/gorilla/mux
mkdir -p src/github.com/mattermost/
mkdir -p src/github.com/scottleedavis/
pushd src/github.com/mattermost
git clone https://github.com/mattermost/mattermost-server
popd
pushd src/github.com/scottleedavis/
git clone https://github.com/scottleedavis/mattermost-plugin-remind
popd
%build
export GOPATH=`pwd`
export PATH="bin:"$PATH
cd src/github.com/scottleedavis/mattermost-plugin-remind
pushd server
go build -o plugin.exe ./server
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": { "server\/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