SHA256
1
0
forked from pool/matomo
matomo/matomo.spec

169 lines
5.7 KiB
RPMSpec
Raw Normal View History

Accepting request 566583 from home:ecsos:server - Branch package from piwik, because piwik renamed to matomo. - update to 3.3.0 See https://matomo.org/changelog/matomo-3-3-0/ - update to 3.2.1 see https://piwik.org/changelog/piwik-3-2-1/ - update to 3.2.0 see https://piwik.org/changelog/piwik-3-2-0/ - update to 3.1.1 see https://piwik.org/changelog/piwik-3-1-1/ - update to 3.1.0 This release is rated important, two XSS issues have bin fixed. Also 120 tickets closed. see https://piwik.org/changelog/piwik-3-1-0/ - fix spec to use php7 too - fix errors in piwik.conf - update to 3.0.4 see https://piwik.org/changelog/piwik-3-0-4/ - update to 3.0.3 see https://piwik.org/changelog/piwik-3-0-3/ - update to 3.0.2 see https://piwik.org/changelog/piwik-3-0-2/ - update to 3.0.1 see https://piwik.org/changelog/piwik-3-0-1/ - update to 3.0.0 see https://piwik.org/changelog/piwik-3-0-0/ - update to 2.17.1 see https://piwik.org/changelog/piwik-2-17-1/ - update to 2.17.0 see https://piwik.org/changelog/piwik-2-17-0/ - update to 2.16.5 see https://piwik.org/changelog/piwik-2-16-5/ - update to 2.16.4 see https://piwik.org/changelog/piwik-2-16-4/ - update to 2.16.3 see https://piwik.org/changelog/piwik-2-16-3/ - This is a security release - update to 2.16.2 see https://piwik.org/changelog/piwik-2-16-2/ - This is a security release - update to 2.16.1 see http://piwik.org/changelog/piwik-2-16-1/ - This is a security release - Drop piwik-manifest_unneeded_files.patch: It's now in upstream - update to 2.16.0 see http://piwik.org/changelog/piwik-2-16-0/ - update to 2.15.0 see http://piwik.org/changelog/piwik-2-15-0/ - insert attention mark for php caches in README.SUSE - activate and update manifest patch - update to 2.14.3 - #8439 Install of 2.14.2 blocked by permissions check on piwik/config path [by @mnapoli] - #8431 Overlay improvements [by @sgiehl, @tsteur] - #8352 In Page Overlay sidebar, add icon to let me “Open segmented visitor log” [by @sgiehl] - #8403 Improve design of Trusted Piwik Hostname setting [by @barbushin, @tsteur] - #7835 Rename “Widgets & Dashboard” selector or change the selector [by @tsteur] - #8293 Piwik errors logged in server error log should not have HTML [by @mnapoli] - #8252 New config entry to set email name in email FROM field [by @tsteur] - #8472 Fix bug in notification angular directive, do not use data-binding for noclear attribute… [by @diosmosis] - #8285 UserCountryMap plugin shows wrong options in countries select [by @mnapoli] - #8432 [automatic translation update] Updated 195 strings in 32 languages (sk, ar, de, ja, nl, nb, sv, be, bg, ca, cs, da, el, es, fa, fi, fr, hi, hu, id, it, ko, pl, pt, ro, ru, sq, sr, th, tl, uk, vi) [by @sgiehl] - #8474 [automatic translation update] Updated 254 strings in 37 languages (gl, nb, cs, it, sk, de, el, fr, lt, ar, bg, ca, da, es, et, fa, fi, he, hi, hr, id, ja, ko, nl, nn, pl, ro, ru, sl, sq, sr, sv, ta, th, tl, tr, vi) [by @sgiehl] - update to 2.14.2 - #8304 Column not found: 1054 Unknown column ‘log_visit.location_browser_lang’ in ‘field list'” [by @tsteur] - #8365 renderer format is not valid – fatal php error after 2.14.0 - #8316 URL parameter for core:archive console command is ignored [by @diosmosis, @mattab] - #8307 Limit notifications of not authenticated sessions [by @tsteur] - #8370 Can’t update GrabGravatar plugin [by @tsteur] - #8346 node.className.split is not a function on tracking click on/near SVG element [by @dandv, @tsteur] - #8294 CLI plugin generator doesn’t intercept plugin description [by @tsteur] - #8257 Site Search report does not display tooltips with metrics documentation - #7768 Browser info tooltip doesn’t hide - #8411 Add System check that checks that shell_exec function is enabled [by @mattab] - #8407 The string General_Cancel was not loaded in javascript [by @tsteur] - #8400 Fix emails validation with unknown TLD [by @barbushin, @mnapoli] - #8379 Travis system extraction part 1 [by @diosmosis] - #8374 Tweaks to .travis.yml generator [by @diosmosis] - #8376 [automatic translation update] Updated 661 strings in 8 languages (nl, sv, de, es, ja, lt, pl, nb) [by @sgiehl] - initial version 2.13.1 OBS-URL: https://build.opensuse.org/request/show/566583 OBS-URL: https://build.opensuse.org/package/show/network:utilities/matomo?expand=0&rev=1
2018-01-24 01:44:33 +01:00
#
# spec file for package matomo
#
# Copyright (c) 2013 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 http://bugs.opensuse.org/
#
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
%define apxs %{_sbindir}/apxs2
%define ap_sysconfdir %(%{apxs} -q SYSCONFDIR)
%define ap_serverroot %(%{apxs} -q PREFIX)
%if 0%{?suse_version}
%define ap_usr wwwrun
%define ap_grp www
%else
%define ap_usr nobody
%define ap_grp nogroup
%endif
%if 0%{?suse_version} >= 1210
%define has_systemd 1
%endif
Name: matomo
Version: 3.3.0
Release: 0
Summary: Open Source web analytics
License: GPL-2.0
Group: Applications/Internet
Url: http://matomo.org/
Source0: http://builds.matomo.org/piwik.zip
Source1: %{name}.conf
Source2: %{name}-README.SUSE
Source99: %{name}.rpmlintrc
BuildArch: noarch
BuildRequires: apache2-devel
BuildRequires: cron
BuildRequires: fdupes
BuildRequires: mariadb
%if 0%{?has_systemd}
BuildRequires: systemd
%{?systemd_requires}
%else
PreReq: %insserv_prereq
%endif
BuildRequires: unzip
Requires: apache2
Requires: cron
Requires: mod_php_any >= 5.5.9
Requires: mariadb
Requires: php-json
Requires: php-mysql
Requires: php-curl
Requires: php-gd
Recommends: php-geoip
Recommends: apache2-mod_geoip
Conflicts: piwik
%description
Matomo, formerly Piwik, is the leading open source web analytics platform that gives
you valuable insights into your websites visitors, your marketing
campaigns and much more, so you can optimize your strategy and
online experience of your visitors.
%prep
%setup -q -n piwik
install -m644 %{SOURCE2} README.SUSE
# remove unwanted files
find . -type f -name .htaccess -delete
find . -type f -name .travis.sh -delete
#%%{__rm} -r `find . -name ".git*"`
%{__rm} `find . -name "*.c" -or -name "*.h"`
%build
#%%configure
#make %%{?_smp_mflags}
%install
# make directories
%{__install} -d -m0755 $RPM_BUILD_ROOT%{ap_serverroot}/%{name}
%{__install} -d -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
%{__install} -d -m0755 $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
# copy src from build to buildroot
%{__mv} *SUSE $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
%{__mv} LEGALNOTICE $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
%{__mv} LICENSE $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
%{__mv} "misc/How to install Matomo.html" $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
%{__mv} *md $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
%{__cp} -dR * $RPM_BUILD_ROOT%{ap_serverroot}/%{name}
# install matomo.conf to apache conf.d
%{__install} -D -m0640 %{SOURCE1} $RPM_BUILD_ROOT%{ap_sysconfdir}/conf.d/%{name}.conf
# move config to etc/matomo and make symlink
%{__mv} $RPM_BUILD_ROOT%{ap_serverroot}/%{name}/config/* \
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}
%{__rm} -d $RPM_BUILD_ROOT%{ap_serverroot}/%{name}/config
%{__ln_s} %{_sysconfdir}/%{name} $RPM_BUILD_ROOT%{ap_serverroot}/%{name}/config
# install cronscript
%{__install} -d -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
%{__install} -d -m0755 $RPM_BUILD_ROOT/var/log/%{name}
cat >> $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/%{name}-archive << EOF
# without CLI
#5 * * * * wwwrun %{_bindir}/php %{ap_serverroot}/%{name}/misc/cron/archive.php --url=http://localhost/matomo/ > /var/log/%{name}/%{name}-archive.log
# with CLI
5 * * * * wwwrun %{_bindir}/php %{ap_serverroot}/%{name}/console core:archive --url=http://localhost/matomo/ > /var/log/%{name}/%{name}-archive.log
EOF
%fdupes ${RPM_BUILD_ROOT}
%post
%{__chown} -R %{ap_usr}:%{ap_grp} %{ap_serverroot}/%{name}
%if 0%{?has_systemd}
%service_add_post apache2.service
%else
%restart_on_update apache2
%endif
# TODO
#if [ "$1" = 2 ]; then
# %%{_bindir}/php %%{ap_serverroot}/%%{name}/console core:update
#fi
%postun
%if 0%{?has_systemd}
%service_del_postun apache2.service
%else
%restart_on_update apache2
%endif
%files
%defattr(-,root,root,-)
#%%doc README.SUSE CHANGELOG.md CONTRIBUTING.md LEGALNOTICE README.md SECURITY.md
%dir %{_defaultdocdir}/%{name}
%{_defaultdocdir}/%{name}/*
%config(noreplace) %{_sysconfdir}/cron.d/%{name}-archive
%config(noreplace) %{ap_sysconfdir}/conf.d/%{name}.conf
%dir %attr(0750,%{ap_usr},%{ap_grp}) %{_sysconfdir}/%{name}
%dir %attr(0750,%{ap_usr},%{ap_grp}) %{_sysconfdir}/%{name}/environment
%defattr(640,%{ap_usr},%{ap_grp},750)
%dir %{ap_serverroot}/%{name}
%dir /var/log/%{name}
%config(noreplace) %attr(600,%{ap_usr},%{ap_grp}) %{_sysconfdir}/%{name}/*php
%{_sysconfdir}/%{name}/environment/*php
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/console
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/misc/cron/archive.sh
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/misc/log-analytics/import_logs.py
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/misc/composer/clean-xhprof.sh
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/misc/composer/build-xhprof.sh
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/vendor/leafo/lessphp/package.sh
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/vendor/leafo/lessphp/lessify
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/vendor/leafo/lessphp/plessc
%attr(0770,%{ap_usr},%{ap_grp}) %{ap_serverroot}/%{name}/vendor/pear/archive_tar/sync-php4
%{ap_serverroot}/%{name}/*
%changelog