File errbit.spec of Package errbit

# spec file for package errbit
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           errbit
Version:        0
Release:        0
%define vhosts_dir     /srv/www/vhosts/
%define app_dir        %{vhosts_dir}/%{name}/
%define home_dir       %{app_dir}
License:        MIT
Summary:        The open source error catcher that's Airbrake API compliant
Group:          Internal
Source:         %{name}-%{version}.tar.xz
Source1:        %{name}-rpmlintrc
Source2:        %{name}-update
Source3:        %{name}-puma.service
Source4:        %{name}-sidekiq.service
Source5:        %{name}.target
Source6:        %{name}-update.service
Patch:          errbit-no-dev.patch
Patch1:         errbit-fix-deps.patch
Patch2:         add-bundle.patch
Patch4:         errbit-uuid-logging.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:  rsync
BuildRequires:  ruby-common-rails
BuildRequires:  timezone
Requires:       timezone
BuildRequires:  npm >= 8
Requires:       nodejs >= 8
BuildRequires:  pkgconfig(systemd)
Requires:       ImageMagick
%define rb_build_versions %{rb_default_ruby}
%define rb_build_abi      %{rb_default_ruby_abi}
%define rb_suffix         %{rb_default_ruby_suffix}
# generated!!!
BuildRequires:  %{rubygem actionmailer:4.2 >=}
BuildRequires:  %{rubygem actionpack:4.2 >=}
BuildRequires:  %{rubygem railties:4.2 >=}
BuildRequires:  %{rubygem rails:4.2 >=}
BuildRequires:  %{rubygem actionmailer_inline_css}
BuildRequires:  %{rubygem decent_exposure}
BuildRequires:  %{rubygem devise:4 >= 4.7}
BuildRequires:  %{rubygem dotenv-rails}
BuildRequires:  %{rubygem draper}
BuildRequires:  %{rubygem errbit_plugin}
BuildRequires:  %{rubygem errbit_github_plugin}
BuildRequires:  %{rubygem font-awesome-rails}
BuildRequires:  %{rubygem haml:5 >= 5.1}
BuildRequires:  %{rubygem htmlentities}
BuildRequires:  %{rubygem kaminari}
BuildRequires:  %{rubygem kaminari-mongoid}
BuildRequires:  %{rubygem mongoid:5 >= 5.4}
BuildRequires:  %{rubygem mongoid_rails_migrations}
BuildRequires:  %{rubygem omniauth}
BuildRequires:  %{rubygem omniauth-github}
BuildRequires:  %{rubygem omniauth-google-oauth2}
BuildRequires:  %{rubygem rack-ssl}
BuildRequires:  %{rubygem rack-ssl-enforcer}
BuildRequires:  %{rubygem rinku}
BuildRequires:  %{rubygem rails_autolink}
BuildRequires:  %{rubygem useragent}
BuildRequires:  %{rubygem hoptoad_notifier:2 >= 2.4}
BuildRequires:  %{rubygem campy}
BuildRequires:  %{rubygem mini_racer}
BuildRequires:  %{rubygem xmpp4r}
BuildRequires:  %{rubygem hoi}
BuildRequires:  %{rubygem rushover}
BuildRequires:  %{rubygem httparty}
BuildRequires:  %{rubygem flowdock}
BuildRequires:  %{rubygem ri_cal}
BuildRequires:  %{rubygem yajl-ruby}
BuildRequires:  %{rubygem json >= 2.3}
BuildRequires:  %{rubygem puma}
BuildRequires:  %{rubygem sass-rails}
BuildRequires:  %{rubygem uglifier}
BuildRequires:  %{rubygem jquery-rails}
BuildRequires:  %{rubygem pjax_rails}
BuildRequires:  %{rubygem underscore-rails}
BuildRequires:  %{rubygem sassc:2.0}
BuildRequires:  %{rubygem sucker_punch}
BuildRequires:  %{rubygem responders:2}
BuildRequires:  %{rubygem sprockets:3}
# /generated
The open source error catcher that's Airbrake API compliant

%setup -q
%patch -p1
%patch1 -p1
%patch2 -p1
#patch3 -p1
%patch4 -p1
%patch5 -p1

./bin/bundle exec rake assets:clean assets:precompile

mkdir -p tmp/{sockets,pids} log/ public/uploads/ public/plugins/
chmod -R u=rwX,g=rX,o= .
chmod -R o+rX public
chmod go+X .
chmod -R go+X tmp/
mkdir -p %{buildroot}%{app_dir}/
rsync -a $PWD/ %{buildroot}%{app_dir}/
install -D -m 0755 %{S:2} %{buildroot}%{_sbindir}/%{name}-update
install -D -m 0644 %{S:3} %{buildroot}%{_unitdir}/%{name}-puma.service
install -D -m 0644 %{S:6} %{buildroot}%{_unitdir}/%{name}-update.service
install -D -m 0644 %{S:5} %{buildroot}%{_unitdir}/%{name}.target

/usr/sbin/groupadd -r %{name} &>/dev/null || :
/usr/sbin/useradd  -g %{name} -s /bin/false -r -c "Errbit" -d %{home_dir} %{name} &>/dev/null || :
touch %{app_dir}/tmp/rebuild.txt
%service_add_pre %{name}-puma.service

%service_add_post %{name}-puma.service

%service_del_preun %{name}-puma.service %{name}-update.service

%service_del_postun %{name}-update.service

%dir %{vhosts_dir}
%dir %{app_dir}/
%config(noreplace) %{app_dir}/config/
%dir %{app_dir}/public/

openSUSE Build Service is sponsored by