Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
>
icinga-web
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 5
[-]
[+]
Changed
icinga-web.spec
@@ -1,7270 +1,188 @@ -%define pkgname icinga-web -%define pkgversion 1.0.1 - -%define nsusr icinga -%define nsgrp icinga -%define cmdgrp icingacmd -%define wwwusr wwwrun -%define wwwgrp www - -Summary: New Icinga Web interface -Name: %{pkgname} -Version: 1.0.1 -Release: 0 -Group: Application/System -Url: http://www.icinga.org -License: GPL -Source0: %{pkgname}-%{pkgversion}.tar.bz2 -Patch0: %{pkgname}-%{pkgversion}-makefile.patch -BuildRequires: icinga -BuildRequires: apache2 php5 -%if 0%{?suse_version} > 1020 -BuildRequires: fdupes +# $Id$ +# Authority: michael.friedrich(at)univie.ac.at +# Upstream: The icinga devel team <icinga-devel at lists.sourceforge.net> +# Needs icinga-api +# ExcludeDist: el4 el3 + +%if "%{_vendor}" == "suse" +%define apacheconfdir %{_sysconfdir}/apache2/conf.d +%define apacheuser wwwrun %endif +%if "%{_vendor}" == "redhat" +%define apacheconfdir %{_sysconfdir}/httpd/conf.d +%define apacheuser apache +%endif + +Summary: Open Source host, service and network monitoring Web UI +Name: icinga-web +Version: 1.0.1 +#Release: 1%{?dist} +Release: 1 +License: GPL +Group: Applications/System +URL: http://www.icinga.org/ + +Source0: icinga-web-1.0.1.tar.gz + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +Requires: php >= 5.2.3 +Requires: php-pear +Requires: php-gd +Requires: php-xml +Requires: php-ldap +Requires: php-pdo +Requires: php-dom +Requires: php-common +Requires: php-spl +Requires: pcre >= 7.6 -BuildRoot: %{_tmppath}/%{name}-%{version}-root +Requires: icinga-api +############################## %description +############################## +Icinga Web for Icinga Core, requires Icinga API. +############################## %prep -%setup -n %{pkgname}-%{version} -%patch0 +############################## +%setup -n %{name}-%{version} + +############################## %build -%configure --prefix=%{_datadir}/%{pkgname} \ - --with-web-user=%{nsusr} \ - --with-web-group=%{nsgrp} \ - --with-bin-user=%{wwwusr} \ - --with-bin-group=%{wwwgrp} \ - PHP=%{_bindir}/php5 +############################## -%install -%__make INSTALL_OPTS="" DESTDIR=%{buildroot} install -#/usr/share/icinga-web/pub/js/ext3 -> /var/tmp/icinga-web-0.9.0.99.2-root/usr/share/icinga-web/lib/ext3 -cd %{buildroot}/%{_datadir}/%{pkgname}/pub/js -ln -sf ../../lib/ext3 +# before we start, make sure that $(MAKE) fix-priv fix-libs will be kicked out +# we'll apply that ourselves in %post +# instead this is in make install - patch in the copying of etc/build.properties :D +%{__perl} -pi -e ' + s|\$\(MAKE\)\sfix-priv\sfix-libs|\$\(INSTALL\) -m 664 \$\(INSTALL_OPTS\) etc\/build\.properties \$\(DESTDIR\)\$\(prefix\)\/etc\/build\.properties|; + ' Makefile.in + + +%configure \ + --prefix="%{_datadir}/icinga-web" \ + --datadir="%{_datadir}/icinga-web" \ + --datarootdir="%{_datadir}/icinga-web" \ + --with-web-user='%{apacheuser}' \ + --with-web-group='%{apacheuser}' \ + --with-icinga-api='%{_datadir}/icinga-api' \ -%if 0%{?suse_version} > 1020 -# create hardlinks for the rest -%fdupes $RPM_BUILD_ROOT -%endif +# --with-db-type, --with-db-host, --with-db-port, --with-db-name, --with-db-user, --with-db-pass +# resolve possible wrong files for makefile +#%{__make} devclean + +############################## +%install +############################## + +%{__rm} -rf %{buildroot} +%{__make} install \ + DESTDIR="%{buildroot}" \ + INSTALL_OPTS="" \ + COMMAND_OPTS="" \ + INIT_OPTS="" + +############################## +%pre +############################## + +#uncomment if building from git +#%{__rm} -rf %{buildroot}%{_datadir}/icinga-web/.git + +############################## +%preun +############################## + +#uncomment if having problems with cache dir +#%{__rm} -rf %{buildroot}%{_datadir}/icinga-web/app/cache + +############################## +%post +############################## + +### apply fixes after install +#mkdir %{_datadir}/icinga-web/app/cache + +### fix-privs taken from Makefile.in +chown -R %{apacheuser}.%{apacheuser} \ + %{_datadir}/icinga-web/app/cache \ + %{_datadir}/icinga-web/app/data/log +chmod -R 775 %{_datadir}/icinga-web/app/cache +chmod +x \ + %{_datadir}/icinga-web/bin/agavi \ + %{_datadir}/icinga-web/bin/create-makefile.sh \ + %{_datadir}/icinga-web/bin/create-rescuescheme.sh \ + %{_datadir}/icinga-web/bin/doctrinemodels.php \ + %{_datadir}/icinga-web/bin/phing \ + %{_datadir}/icinga-web/bin/testdeps.php \ + %{_datadir}/icinga-web/bin/loc-create-catalog.pl \ + %{_datadir}/icinga-web/bin/loc-create-json.sh \ + %{_datadir}/icinga-web/bin/loc-create-mo.sh \ + %{_datadir}/icinga-web/bin/loc-merge-template.sh \ + %{_datadir}/icinga-web/bin/rmtmp-files.sh + +### fix-libs taken from Makefile.in +rm -rf %{_datadir}/icinga-web/pub/js/ext3 +ln -fs %{_datadir}/icinga-web/lib/ext3 %{_datadir}/icinga-web/pub/js +ln -fs %{_datadir}/icinga-api %{_datadir}/icinga-web/lib/ -%clean -rm -rf %{buildroot} +############################## %files -%defattr(-,%{wwwusr},%{wwwgrp}) -%dir %{_datadir}/%{pkgname} -%dir %{_datadir}/%{pkgname}/app/lib -%dir %{_datadir}/%{pkgname}/app/modules -%dir %{_datadir}/%{pkgname}/app/modules/AppKit -%dir %{_datadir}/%{pkgname}/app/modules/AppKit/lib -%dir %{_datadir}/%{pkgname}/app/modules/Cronks -%dir %{_datadir}/%{pkgname}/app/modules/Cronks/actions -%dir %{_datadir}/%{pkgname}/app/modules/Cronks/cache -%dir %{_datadir}/%{pkgname}/app/modules/Cronks/lib -%dir %{_datadir}/%{pkgname}/app/modules/Cronks/models -%dir %{_datadir}/%{pkgname}/app/modules/Cronks/templates -%dir %{_datadir}/%{pkgname}/app/modules/Cronks/validate -%dir %{_datadir}/%{pkgname}/app/modules/Cronks/views -%dir %{_datadir}/%{pkgname}/app/modules/Web -%dir %{_datadir}/%{pkgname}/app/modules/Web/lib -%dir %{_datadir}/%{pkgname}/etc/database -%dir %{_datadir}/%{pkgname}/etc/database/deltas -%dir %{_datadir}/%{pkgname}/etc/database/deploy -%dir %{_datadir}/%{pkgname}/etc/database/rescue -%dir %{_datadir}/%{pkgname}/lib
Added
icinga-web-1.0.1.tar.gz
^