Name: logtrend-visuapache Version: 0.82.2 Release: 4mdk License: GPL Group: Monitoring Summary: The Apache's module part of LogTrend's visualization %define realname LogTrend-Visu-Apache Source: http://www.logtrend.org/dist/%{realname}-%{version}.tar.gz URL: http://www.logtrend.org Patch0: LT-Visu-Apache-%{version}-redir.patch.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildArch: noarch BuildPrereq: perl-devel perl-base perl-libapreq mod_perl-common perl-Apache-Session Requires: perl Requires: mod_perl-common Requires: apache-mod_perl Requires: perl-libapreq Requires: perl-Apache-Session %description The Apache's module part of LogTrend's visualization. You have to change the login/password using the following command: htpasswd -c /etc/LogTrend/Visu/htpasswd logtrend You will be asked for a password. To connect to the LogTrend's pages, you can go on: http://localhost:8200/LogTrendVisu/ And use the login logtrend, and the password you've given. For further informations about how to setup the LogTrend environment, read the documents from the package logtrend-doc. %prep %setup -q -n %{realname}-%{version} %patch0 -p1 -b .redir %build CFLAGS="$RPM_OPT_FLAGS" %{__perl} Makefile.PL INSTALLDIRS=vendor %make PREFIX=%{_prefix} %install rm -rf %{buildroot} %makeinstall PREFIX="%{buildroot}%{_prefix}" SYSCONFDIR="%{buildroot}%{_sysconfdir}" %post if grep -i -q LogTrend::Visu::ApacheModule /etc/httpd/conf/commonhttpd.conf; then echo -e "<IfModule mod_perl.c>\n\ # configuration by URL :\n\ <Location /LogTrendVisu>\n\ # Perl-handler :\n\ SetHandler perl-script\n\ PerlHandler LogTrend::Visu::ApacheModule\n\ # For name resolution :\n\ HostNameLookups on\n\ # Authentification :\n\ AuthUserFile /etc/LogTrend/Visu/htpasswd\n\ AuthName "LogTrendVisu"\n\ AuthType Basic\n\ <limit GET POST>\n\ require valid-user\n\ </limit>\n\ </Location>\n\ </IfModule>\n"\ >> /etc/httpd/conf/commonhttpd.conf fi %preun # If we found the string LogTrend::Visu::ApacheModule in a mod_perl Module then we remove it perl -ni -e 'if ($m = m|<IfModule mod_perl\.c>| .. m|</IfModule>|) { $s .= $_; $found ||= /LogTrend::Visu::ApacheModule/i; if ($m =~ /E0/) { print $s if !$found; $s = ""; $found = 0; } } else { print }' /etc/httpd/conf/commonhttpd.conf %clean rm -rf %{buildroot} %files %defattr(-,root,root) %{perl_vendorlib}/LogTrend/Visu/* %{_docdir}/LogTrend/Visu-Apache/ %changelog * Mon Jul 22 2002 Pixel <pixel@mandrakesoft.com> 0.82.2-4mdk - cleanup (esp. remove the creation of a symlink LogTrend in /usr/lib/perl5 which is not used in %%files) - rebuild for new perl * Tue Apr 9 2002 Arnaud de Lorbeau <adelorbeau@mandrakesoft.com> 0.82.2-3mdk - Specfile creation for Mandrake Linux.