rpm: Use a macro for the docs directory

refs #4075
This commit is contained in:
Eric Lippmann 2015-01-16 17:38:22 +01:00
parent dae3ccd90c
commit bab92b1b16
1 changed files with 5 additions and 4 deletions

View File

@ -64,6 +64,7 @@ Icinga Web 2
%define logdir %{_localstatedir}/log/%{name} %define logdir %{_localstatedir}/log/%{name}
%define phpdir %{_datadir}/php %define phpdir %{_datadir}/php
%define icingawebgroup icingaweb2 %define icingawebgroup icingaweb2
%define docsdir %{_datadir}/doc/%{name}
%package common %package common
@ -170,7 +171,7 @@ Icinga Web 2 vendor library Zend
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
mkdir -p %{buildroot}/{%{basedir}/{modules,library,public},%{bindir},%{configdir},%{logdir},%{phpdir},%{wwwconfigdir},%{_sysconfdir}/bash_completion.d,%{_datadir}/doc/%{name}} mkdir -p %{buildroot}/{%{basedir}/{modules,library,public},%{bindir},%{configdir},%{logdir},%{phpdir},%{wwwconfigdir},%{_sysconfdir}/bash_completion.d,%{docsdir}}
cp -prv application doc %{buildroot}/%{basedir} cp -prv application doc %{buildroot}/%{basedir}
cp -pv etc/bash_completion.d/icingacli %{buildroot}/%{_sysconfdir}/bash_completion.d/icingacli cp -pv etc/bash_completion.d/icingacli %{buildroot}/%{_sysconfdir}/bash_completion.d/icingacli
cp -prv modules/{monitoring,setup} %{buildroot}/%{basedir}/modules cp -prv modules/{monitoring,setup} %{buildroot}/%{basedir}/modules
@ -180,7 +181,7 @@ cp -prv public/{css,img,js,error_norewrite.html} %{buildroot}/%{basedir}/public
cp -pv packages/files/apache/icingaweb2.conf %{buildroot}/%{wwwconfigdir}/icingaweb2.conf cp -pv packages/files/apache/icingaweb2.conf %{buildroot}/%{wwwconfigdir}/icingaweb2.conf
cp -pv packages/files/bin/icingacli %{buildroot}/%{bindir} cp -pv packages/files/bin/icingacli %{buildroot}/%{bindir}
cp -pv packages/files/public/index.php %{buildroot}/%{basedir}/public cp -pv packages/files/public/index.php %{buildroot}/%{basedir}/public
cp -prv etc/schema %{buildroot}/%{_datadir}/doc/%{name} cp -prv etc/schema %{buildroot}/%{docsdir}
%pre %pre
getent group icingacmd >/dev/null || groupadd -r icingacmd getent group icingacmd >/dev/null || groupadd -r icingacmd
@ -206,8 +207,8 @@ rm -rf %{buildroot}
%{basedir}/public %{basedir}/public
%{wwwconfigdir}/icingaweb2.conf %{wwwconfigdir}/icingaweb2.conf
%attr(2775,root,%{icingawebgroup}) %dir %{logdir} %attr(2775,root,%{icingawebgroup}) %dir %{logdir}
%{_datadir}/doc/%{name} %{docsdir}
%docdir %{_datadir}/doc/%{name} %docdir %{docsdir}
%pre common %pre common