Accepting request 574270 from home:jengelh:branches:network:utilities

factory review points

OBS-URL: https://build.opensuse.org/request/show/574270
OBS-URL: https://build.opensuse.org/package/show/network:utilities/matomo?expand=0&rev=2
This commit is contained in:
Eric Schirra 2018-02-11 10:05:05 +00:00 committed by Git OBS Bridge
parent 3108dcf234
commit 0642bd9acd
2 changed files with 37 additions and 28 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Thu Feb 8 14:33:35 UTC 2018 - jengelh@inai.de
- Ensure neutrality of description.
- Fix unknown RPM category group.
- Replace old $RPM_ variables with macros.
- Avoid %__-type macro indirections.
- Do not let fdupes cross partitions.
-------------------------------------------------------------------
Sat Jan 13 19:12:02 UTC 2018 - ecsos@opensuse.org

View File

@ -37,9 +37,9 @@
Name: matomo
Version: 3.3.0
Release: 0
Summary: Open Source web analytics
Summary: Web analytics platform
License: GPL-2.0
Group: Applications/Internet
Group: Productivity/Networking/Web/Utilities
Url: http://matomo.org/
Source0: http://builds.matomo.org/piwik.zip
Source1: %{name}.conf
@ -71,10 +71,9 @@ 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.
Matomo, formerly Piwik, is a web analytics platform that gives
insights into a website's visitors and marketing campaigns, so the
strategy and online experience of visitors may be optimized.
%prep
%setup -q -n piwik
@ -82,8 +81,8 @@ 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"`
#find . -name ".git*" -exec rm -Rf "{}" "+"
find . -type f "(" -name "*.c" -o -name "*.h" ")" -delete
%build
#%%configure
@ -91,38 +90,39 @@ find . -type f -name .travis.sh -delete
%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}
install -d -m0755 %{buildroot}/%{ap_serverroot}/%{name}
install -d -m0755 %{buildroot}/%{_sysconfdir}/%{name}
install -d -m0755 %{buildroot}/%{_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 *SUSE %{buildroot}/%{_defaultdocdir}/%{name}
mv LEGALNOTICE %{buildroot}/%{_defaultdocdir}/%{name}
mv LICENSE %{buildroot}/%{_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}
mv "misc/How to install Matomo.html" %{buildroot}/%{_defaultdocdir}/%{name}
mv *md %{buildroot}/%{_defaultdocdir}/%{name}
cp -dR * %{buildroot}/%{ap_serverroot}/%{name}
# install matomo.conf to apache conf.d
%{__install} -D -m0640 %{SOURCE1} $RPM_BUILD_ROOT%{ap_sysconfdir}/conf.d/%{name}.conf
install -D -m0640 %{SOURCE1} %{buildroot}/%{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
mv %{buildroot}/%{ap_serverroot}/%{name}/config/* \
%{buildroot}/%{_sysconfdir}/%{name}
rm -d %{buildroot}/%{ap_serverroot}/%{name}/config
ln -s %{_sysconfdir}/%{name} %{buildroot}/%{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
install -d -m0755 %{buildroot}/%{_sysconfdir}/cron.d
install -d -m0755 %{buildroot}/var/log/%{name}
cat >>%{buildroot}%{_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}
%fdupes %{buildroot}/%{_prefix}
%fdupes %{buildroot}/srv
%post
%{__chown} -R %{ap_usr}:%{ap_grp} %{ap_serverroot}/%{name}
chown -R %{ap_usr}:%{ap_grp} %{ap_serverroot}/%{name}
%if 0%{?has_systemd}
%service_add_post apache2.service
%else
@ -159,7 +159,7 @@ EOF
%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/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