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.

49 lines
1.3 KiB

%define mattermost_user mattermost
%define mattermost_group mattermost
%define mattermost_home /var/lib/mattermost
%define debug_package %{nil}
Name: mattermost-plugin-walltime
Version: 0.1.1
Release: 1%{?dist}
URL: https://github.com/mattermost/mattermost-plugin-walltime
Summary: Plugin for Mattermost to convert time
License: Apache
BuildRequires: golang
Requires: mattermost
%description
%prep
%setup -q -T -c %{name}-%{version}
export GOPATH=`pwd`
go get -u -v github.com/pkg/errors
mkdir -p src/github.com/mattermost/
cd src/github.com/mattermost/
git clone https://github.com/mattermost/mattermost-plugin-walltime
%build
export GOPATH=`pwd`
export PATH="bin:"$PATH
cd src/github.com/mattermost/mattermost-plugin-walltime
pushd webapp
npm install
npm run build
popd
%install
mkdir -p %{buildroot}%{mattermost_home}/plugins/com.mattermost.walltime/webapp/dist/
cp -rv src/github.com/mattermost/mattermost-plugin-walltime/webapp/dist/main.js %{buildroot}%{mattermost_home}/plugins/com.mattermost.walltime/webapp/dist/
cp -rv src/github.com/mattermost/mattermost-plugin-walltime/plugin.json %{buildroot}%{mattermost_home}/plugins/com.mattermost.walltime/plugin.json
%files
%{mattermost_home}/plugins/com.mattermost.walltime/plugin.json
%{mattermost_home}/plugins/com.mattermost.walltime/webapp/dist/main.js
%changelog