Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
spins:invis:15:common
mattermost-server
_service:set_version:mattermost-server.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:set_version:mattermost-server.spec of Package mattermost-server
%define debug_package %{nil} Name: mattermost-server Version: 9.11.4 Release: 0 License: MIT Summary: Workplace messaging for the web, PCs and phones - Open Source Team Edition Url: https://about.mattermost.com/download/ Group: Productivity/Networking/Email/Servers Source: mattermost-team-%{version}-linux-amd64.tar.gz #Source: https://releases.mattermost.com/%{mattermost_release}/mattermost-team-%{mattermost_release}-linux-amd64.tar.gz #PATCH-FEATURE kopano.patch Patch1: kopano.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: shadow Requires(pre): shadow Conflicts: mattermost-server-enterprise %define mm_dir /opt/mattermost %description Modern, self-hosted messaging across web, PC and phones, built on open source software %if 0%{?suse_version} %define apache_dir %_sysconfdir/apache2 %else %if "%_repository" == "RHEL_6_PHP_56" || "%_repository" == "RHEL_7_PHP_56" %define apache_dir /opt/rh/httpd24/root/etc/httpd/ %else %define apache_dir %_sysconfdir/httpd %endif %endif %prep %setup -qn mattermost %patch -P 1 -p1 %build %install b="%buildroot"; bdir="$b/%mm_dir/"; mkdir -p "$bdir" "$bdir/data" "$b/%_localstatedir/log/mattermost" "$b/%_prefix/lib/systemd/system/" "$b/%_sysconfdir/mattermost" "$b/%_sysconfdir/nginx/vhosts.d" "$b/%_sbindir" "$b/%_sysconfdir/logrotate.d"; %if 0%{?suse_version} mkdir -p "$b/%apache_dir/vhosts.d" %else mkdir -p "$b/%apache_dir/conf.d" %endif sed -i -s 's#^ *"DataSource":.*# "DataSource": "mmuser:THISISMYMMDBPASSWORD@tcp\(localhost:3306\)\/mattermost?charset=utf8mb4,utf8\&readTimeout=30s\&writeTimeout=30s",#g' config/config.json sed -i -s 's#:8065#127.0.0.1:8065#' config/config.json # disable builtin tracking https://jira.kopano.io/browse/KM-1 sed -i '/EnableDiagnostics/ s/true/false/g' config/config.json # set some default values https://jira.kopano.io/browse/KM-15 sed -i '/EnablePostUsernameOverride/ s/false/true/g' config/config.json sed -i '/EnablePostIconOverride/ s/false/true/g' config/config.json sed -i '/EnableTeamCreation/ s/true/false/g' config/config.json # enable mail batching by default sed -i '/EnableEmailBatching/ s/false/true/g' config/config.json sed -i'' -e 's|"SiteURL": "",|"SiteURL": "http://mattermost.example.org",|g' config/config.json #cp -a ENTERPRISE-EDITION-LICENSE.txt NOTICE.txt README.md bin fonts i18n mattermost.nginx templates webapp "$bdir/" cp -a MIT-COMPILED-LICENSE.md NOTICE.txt README.md bin fonts i18n mattermost.nginx templates client "$bdir/" cp -a config/config.json "$b/%_sysconfdir/mattermost" cp -a config/README.md "$b/%_sysconfdir/mattermost" cp -a mattermost.service "$b/%_prefix/lib/systemd/system/" cp -a mattermost.nginx "$b/%_sysconfdir/nginx/vhosts.d/mattermost.conf" %if 0%{?suse_version} cp -a mattermost.apache2 "$b/%apache_dir/vhosts.d/mattermost.conf" %else cp -a mattermost.apache2 "$b/%apache_dir/conf.d/mattermost.conf" %endif cp -a mattermost.logrotate "$b/%_sysconfdir/logrotate.d/mattermost" cp -a mattermost-db-configure "$b/%_sbindir/mattermost-db-configure" cp -a mattermost-platform "$b/%_sbindir/mattermost-platform" ln -sfv /var/log/mattermost "$bdir/logs" ln -sfv /etc/mattermost "$bdir/config" %pre %{?_unitdir:%{?suse_version:%service_add_pre mattermost.service}} %_bindir/getent group mattermost >/dev/null 2>/dev/null || \ %_sbindir/groupadd -r mattermost %_bindir/getent passwd mattermost >/dev/null 2>/dev/null || \ %_sbindir/useradd -c "Mattermost unprivileged account" \ -g mattermost -r mattermost %post chown -Rh mattermost:mattermost /var/log/mattermost 2>/dev/null || : chown mattermost:mattermost /opt/mattermost 2>/dev/null || : %{?_unitdir:%{?suse_version:%service_add_post mattermost.service}} %{?_unitdir:%{!?suse_version:%systemd_post mattermost.service}} echo "If you want to create the mattermost database easily, you can use the command \"mattermost-db-configure\"." %preun %{?_unitdir:%{?suse_version:%service_del_preun mattermost.service}} %{?_unitdir:%{!?suse_version:%systemd_preun mattermost.service}} %{!?_unitdir:%stop_on_removal mattermost} %postun %{?_unitdir:%{?suse_version:%service_del_postun mattermost.service}} %{?_unitdir:%{!?suse_version:%systemd_postun_with_restart mattermost.service}} %{!?_unitdir:%insserv_cleanup} %{!?_unitdir:%restart_on_update mattermost} %files %defattr(-,root,root) %attr(0770,mattermost,mattermost) %dir /opt/mattermost %attr(0770,mattermost,mattermost) %dir /opt/mattermost/data %attr(0640,mattermost,mattermost) %config(noreplace) /etc/mattermost/config.json %attr(0640,mattermost,mattermost) /etc/mattermost/README.md %attr(0770,mattermost,mattermost) %dir %_localstatedir/log/mattermost %attr(0755,root,root) %_sbindir/mattermost-db-configure %attr(0755,root,root) %_sbindir/mattermost-platform %dir %_sysconfdir/nginx %dir %_sysconfdir/nginx/vhosts.d %dir %_sysconfdir/mattermost %dir %_sysconfdir/logrotate.d %config(noreplace) %_sysconfdir/nginx/vhosts.d/mattermost.conf %config(noreplace) %_sysconfdir/logrotate.d/mattermost /opt/mattermost/bin/ /opt/mattermost/config /opt/mattermost/fonts/ /opt/mattermost/i18n/ /opt/mattermost/logs /opt/mattermost/templates/ /opt/mattermost/client/ /opt/mattermost/MIT-COMPILED-LICENSE.md #/opt/mattermost/ENTERPRISE-EDITION-LICENSE.txt /opt/mattermost/NOTICE.txt /opt/mattermost/README.md /opt/mattermost/mattermost.nginx %_prefix/lib/systemd/system/mattermost.service %dir %apache_dir %if 0%{?suse_version} %dir %apache_dir/vhosts.d %config(noreplace) %attr(0640,root,www) %apache_dir/vhosts.d/mattermost.conf %else %dir %apache_dir/conf.d %config(noreplace) %attr(0640,root,apache) %apache_dir/conf.d/mattermost.conf %endif %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor