Browse Source

mattermost-plugin-rssfeed package creation

Signed-off-by: webbuilder_pel7x64builder0 <webbuilder@powerel.org>
master
webbuilder_pel7x64builder0 6 years ago
parent
commit
34c91724f1
  1. 56
      SPECS/mattermost-plugin-rssfeed.spec

56
SPECS/mattermost-plugin-rssfeed.spec

@ -0,0 +1,56 @@
%define mattermost_user mattermost
%define mattermost_group mattermost
%define mattermost_home /var/lib/mattermost
%define debug_package %{nil}

Name: mattermost-plugin-rssfeed
Version: 0.0.2
Release: 1%{?dist}
Summary: Plugin for Mattermost and RSS feed
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/wbernest/
cd src/github.com/wbernest/
git clone https://github.com/wbernest/mattermost-plugin-rssfeed


%build
export GOPATH=`pwd`
export PATH="bin:"$PATH
cd src/github.com/wbernest/mattermost-plugin-rssfeed
pushd server
$GOPATH/bin/dep ensure
pushd vendor/github.com/mattermost/
rm -rf mattermost-server
git clone https://github.com/mattermost/mattermost-server
popd
go build -o plugin.exe
popd


%install
mkdir -p %{buildroot}%{mattermost_home}/plugins/rssfeed/server
cp -rv src/github.com/wbernest/mattermost-plugin-rssfeed/plugin.json %{buildroot}%{mattermost_home}/plugins/rssfeed/
sed 's/"executables": {/"executables": { plugin.exe/' -i %{buildroot}%{mattermost_home}/plugins/rssfeed/plugin.json
sed '/"darwin-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/rssfeed/plugin.json
sed '/"linux-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/rssfeed/plugin.json
sed '/"windows-amd64"/d' -i %{buildroot}%{mattermost_home}/plugins/rssfeed/plugin.json
cp -rv src/github.com/wbernest/mattermost-plugin-rssfeed/server/plugin.exe %{buildroot}%{mattermost_home}/plugins/rssfeed/server/


%files
%{mattermost_home}/plugins/rssfeed/plugin.json
%{mattermost_home}/plugins/rssfeed/server/plugin.exe


%changelog
Loading…
Cancel
Save