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.
57 lines
1.8 KiB
57 lines
1.8 KiB
%define mattermost_user mattermost |
|
%define mattermost_group mattermost |
|
%define mattermost_home /var/lib/mattermost |
|
%define debug_package %{nil} |
|
|
|
Name: mattermost-plugin-jitsi |
|
Version: 1.3.0 |
|
Release: 1%{?dist} |
|
URL: https://github.com/mattermost/mattermost-plugin-jitsi |
|
Summary: Plugin for Mattermost and Jitsi |
|
License: Apache |
|
BuildRequires: golang |
|
Requires: mattermost |
|
|
|
|
|
%description |
|
|
|
|
|
%prep |
|
%setup -q -T -c %{name}-%{version} |
|
export GOPATH=`pwd` |
|
mkdir -p src/github.com/mattermost/ |
|
cd src/github.com/mattermost/ |
|
git clone https://github.com/mattermost/mattermost-plugin-jitsi |
|
|
|
|
|
%build |
|
export GOPATH=`pwd` |
|
export PATH="bin:"$PATH |
|
export GO111MODULE=on |
|
cd src/github.com/mattermost/mattermost-plugin-jitsi |
|
git checkout tags/v%{version} |
|
pushd webapp |
|
ppm install |
|
npm run build |
|
popd |
|
go build -o plugin.exe ./server |
|
|
|
|
|
%install |
|
mkdir -p %{buildroot}%{mattermost_home}/plugins/jitsi/{server,webapp} |
|
cp -rv src/github.com/mattermost/mattermost-plugin-jitsi/plugin.json %{buildroot}%{mattermost_home}/plugins/jitsi/ |
|
sed 's/"executables": {/"executables": { "server\/plugin.exe"/' -i %{buildroot}%{mattermost_home}/plugins/jitsi/plugin.json |
|
sed '/"darwin-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/jitsi/plugin.json |
|
sed '/"linux-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/jitsi/plugin.json |
|
sed '/"windows-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/jitsi/plugin.json |
|
cp -rv src/github.com/mattermost/mattermost-plugin-jitsi/plugin.exe %{buildroot}%{mattermost_home}/plugins/jitsi/server/ |
|
cp -rv src/github.com/mattermost/mattermost-plugin-jitsi/webapp/dist/main.js %{buildroot}%{mattermost_home}/plugins/jitsi/webapp/ |
|
|
|
|
|
%files |
|
%{mattermost_home}/plugins/jitsi/plugin.json |
|
%{mattermost_home}/plugins/jitsi/server/plugin.exe |
|
%{mattermost_home}/plugins/jitsi/webapp/main.js |
|
|
|
|
|
%changelog
|
|
|