SHA256
1
0
forked from pool/matomo

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

- Join %service_* calls, find calls, everything that iterates
  (except for fdupes, where /usr files naturally should be
  separated from /srv).
- Require user/group package.

OBS-URL: https://build.opensuse.org/request/show/651441
OBS-URL: https://build.opensuse.org/package/show/network:utilities/matomo?expand=0&rev=16
This commit is contained in:
Eric Schirra 2018-11-23 21:32:38 +00:00 committed by Git OBS Bridge
parent 9dcd9f6993
commit 332f19e553
2 changed files with 21 additions and 16 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Nov 22 18:07:12 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
- Join %service_* calls, find calls, everything that iterates
(except for fdupes, where /usr files naturally should be
separated from /srv).
- Require user/group package.
-------------------------------------------------------------------
Tue Nov 20 06:49:47 UTC 2018 - ecsos@opensuse.org

View File

@ -12,7 +12,7 @@
# 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/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@ -46,8 +46,12 @@ Source11: %{name}-archive.service
Source12: %{name}-archive.timer
Source99: %{name}.rpmlintrc
BuildArch: noarch
#Requires(post): user(wwwrun)
#Requires(post): group(www)
%if 0%{?suse_version} >= 1500
Requires(pre): user(%ap_usr)
Requires(pre): group(%ap_grp)
%else
Requires(pre): aaa_base
%endif
BuildRequires: apache2-devel
BuildRequires: cron
BuildRequires: fdupes
@ -84,12 +88,11 @@ strategy and online experience of visitors may be optimized.
%setup -q -n matomo
install -m644 %{SOURCE4} README.SUSE
# remove unwanted files
find . -type f -name .htaccess -delete
find . -type f -name .travis.sh -delete
find . -type f "(" -name .htaccess -o -name .travis.sh ")" -delete
#find . -name ".git*" -exec rm -Rf "{}" "+"
find . -type f "(" -name "*.c" -o -name "*.h" ")" -delete
# env-script-interpreter
find . -type f -exec sed -i -e 's|\/usr\/bin\/env php|\/usr\/bin\/php|g' {} \;
find . -type f -exec sed -i -e 's|\/usr\/bin\/env php|\/usr\/bin\/php|g' {} +
%build
# nothing to build
@ -127,14 +130,11 @@ sed -i -e 's|@ap_serverroot@|%{ap_serverroot}|g' %{buildroot}%{_unitdir}/%{name}
%fdupes %{buildroot}/srv
%pre
%service_add_pre matomo-archive.timer
%service_add_pre matomo-archive.service
%service_add_pre matomo-archive.timer matomo-archive.service
%post
chown -R %{ap_usr}:%{ap_grp} %{ap_serverroot}/%{name}
%service_add_post matomo-archive.timer
%service_add_post matomo-archive.service
%service_add_post apache2.service
%service_add_post matomo-archive.timer matomo-archive.service apache2.service
# Update matomo if this is an upgrade $1 == 2
echo "matomo: Update matomo:core..."
if [ $1 -gt 1 ]; then
@ -147,13 +147,10 @@ if [ $1 -gt 1 ]; then
fi
%preun
%service_del_preun matomo-archive.timer
%service_del_preun matomo-archive.service
%service_del_preun matomo-archive.timer matomo-archive.service
%postun
%service_del_postun matomo-archive.timer
%service_del_postun matomo-archive.service
%service_del_postun apache2.service
%service_del_postun matomo-archive.timer matomo-archive.service apache2.service
%files
%defattr(-,root,root,-)