|
|
|
@ -2,11 +2,10 @@
@@ -2,11 +2,10 @@
|
|
|
|
|
%define mattermost_user mattermost |
|
|
|
|
%define mattermost_group mattermost |
|
|
|
|
%define mattermost_home /var/lib/mattermost |
|
|
|
|
%define mattermost_logdir /var/log/mattermost |
|
|
|
|
#%define debug_package %{nil} |
|
|
|
|
%define debug_package %{nil} |
|
|
|
|
|
|
|
|
|
Name : mattermost |
|
|
|
|
Version : 5.8.0 |
|
|
|
|
Version : 5.9.0 |
|
|
|
|
Release : 1%{dist} |
|
|
|
|
License : MIT |
|
|
|
|
URL : https://mattermost.io |
|
|
|
@ -29,6 +28,7 @@ export GOPATH=`pwd`
@@ -29,6 +28,7 @@ export GOPATH=`pwd`
|
|
|
|
|
mkdir -p src/github.com/mattermost/ |
|
|
|
|
cd src/github.com/mattermost/ |
|
|
|
|
git clone https://github.com/mattermost/mattermost-server/ |
|
|
|
|
git clone https://github.com/mattermost/mattermost-webapp/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build |
|
|
|
@ -40,23 +40,29 @@ go get -d ./...
@@ -40,23 +40,29 @@ go get -d ./...
|
|
|
|
|
sed 's/amd64/%{_arch}/g' -i build/release.mk |
|
|
|
|
%endif |
|
|
|
|
make build-linux |
|
|
|
|
cd ../mattermost-webapp |
|
|
|
|
git checkout tags/v%{version} |
|
|
|
|
make build |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install |
|
|
|
|
install -p -D -m 0644 bin/mattermost %{buildroot}%{_bindir}/mattermost |
|
|
|
|
install -p -D -m 0644 bin/platform %{buildroot}%{_bindir}/mattermost-platform |
|
|
|
|
install -p -D -m 0644 bin/interface_generator %{buildroot}%{_bindir}/mattermost-interface_generator |
|
|
|
|
mkdir -p %{buildroot}%{mattermost_home}/bin/ |
|
|
|
|
install -p -D -m 0555 bin/mattermost %{buildroot}%{mattermost_home}/bin/mattermost |
|
|
|
|
install -p -D -m 0555 bin/platform %{buildroot}%{mattermost_home}/bin/mattermost-platform |
|
|
|
|
install -p -D -m 0555 bin/interface_generator %{buildroot}%{mattermost_home}/bin/mattermost-interface_generator |
|
|
|
|
mkdir -p %{buildroot}%{mattermost_home}/config/ |
|
|
|
|
cp -r src/github.com/mattermost/mattermost-server/config/* %{buildroot}%{mattermost_home}/config/ |
|
|
|
|
cp -r %{buildroot}%{mattermost_home}/config/default.json %{buildroot}%{mattermost_home}/config/config.json |
|
|
|
|
cp -r src/github.com/mattermost/mattermost-server/templates/ %{buildroot}%{mattermost_home}/ |
|
|
|
|
cp -r src/github.com/mattermost/mattermost-server/fonts/ %{buildroot}%{mattermost_home}/ |
|
|
|
|
cp -r src/github.com/mattermost/mattermost-server/i18n/ %{buildroot}%{mattermost_home}/ |
|
|
|
|
cp -r src/github.com/mattermost/mattermost-webapp/dist/ %{buildroot}%{mattermost_home}/client/ |
|
|
|
|
mkdir -p %{buildroot}%{mattermost_home}/data/ |
|
|
|
|
mkdir -p %{buildroot}%{mattermost_home}/logs/ |
|
|
|
|
mkdir -p %{buildroot}%{mattermost_home}/plugins/ |
|
|
|
|
install -p -D -m 0644 %{SOURCE0} %{buildroot}%{_unitdir}/mattermost.service |
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/%{name} |
|
|
|
|
cp -r src/github.com/mattermost/mattermost-server/config/* %{buildroot}%{_sysconfdir}/%{name}/ |
|
|
|
|
cp %{buildroot}%{_sysconfdir}/%{name}/default.json %{buildroot}%{_sysconfdir}/%{name}/config.json |
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/%{name}/ |
|
|
|
|
cp -r src/github.com/mattermost/mattermost-server/templates/ %{buildroot}%{_datadir}/%{name}/ |
|
|
|
|
cp -r src/github.com/mattermost/mattermost-server/fonts/ %{buildroot}%{_datadir}/%{name}/ |
|
|
|
|
cp -r src/github.com/mattermost/mattermost-server/i18n/ %{buildroot}%{_datadir}/%{name}/ |
|
|
|
|
|
|
|
|
|
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/mattermost |
|
|
|
|
install -p -d -m 0700 %{buildroot}%{mattermost_home} |
|
|
|
|
install -p -d -m 0700 %{buildroot}%{mattermost_logdir} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%pre |
|
|
|
@ -80,16 +86,21 @@ exit 0
@@ -80,16 +86,21 @@ exit 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files |
|
|
|
|
%attr(775,%{mattermost_user},%{mattermost_group}) %{_sysconfdir}/%{name}/ |
|
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}/config.json |
|
|
|
|
%defattr(-,%{mattermost_user},%{mattermost_group},-) |
|
|
|
|
%attr(555,%{mattermost_user},%{mattermost_group}) %{mattermost_home}/bin/mattermost |
|
|
|
|
%attr(555,%{mattermost_user},%{mattermost_group}) %{mattermost_home}/bin/mattermost-platform |
|
|
|
|
%attr(555,%{mattermost_user},%{mattermost_group}) %{mattermost_home}/bin/mattermost-interface_generator |
|
|
|
|
%config(noreplace) %{mattermost_home}/config/config.json |
|
|
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} |
|
|
|
|
%{_bindir}/%{name} |
|
|
|
|
%{_bindir}/%{name}-platform |
|
|
|
|
%{_bindir}/%{name}-interface_generator |
|
|
|
|
%{_datadir}/%{name}/templates/ |
|
|
|
|
%{_datadir}/%{name}/fonts/ |
|
|
|
|
%{_datadir}/%{name}/i18n/ |
|
|
|
|
%{_unitdir}/mattermost.service |
|
|
|
|
%{mattermost_home}/config/ |
|
|
|
|
%{mattermost_home}/templates/ |
|
|
|
|
%{mattermost_home}/fonts/ |
|
|
|
|
%{mattermost_home}/i18n/ |
|
|
|
|
%{mattermost_home}/client/ |
|
|
|
|
%{mattermost_home}/data/ |
|
|
|
|
%{mattermost_home}/logs/ |
|
|
|
|
%{mattermost_home}/plugins/ |
|
|
|
|
%attr(644,root,root) %{_unitdir}/mattermost.service |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog |