Sophie

Sophie

distrib > Mandriva > 2007.1 > x86_64 > by-pkgid > ee984266811ef5c25e19688a684daa29 > files > 2

apache-mod_benchmark-2.0.0-5mdv2007.1.src.rpm

%define webadminroot /var/www/html/admin

#Module-Specific definitions
%define mod_name mod_benchmark
%define mod_conf 93_%{mod_name}.conf
%define mod_so %{mod_name}.so

Summary:	Mod_benchmark is a DSO module for the apache Web server
Name:		apache-%{mod_name}
Version:	2.0.0
Release:	%mkrel 5
Group:		System/Servers
License:	GPL
URL:		http://www.trickytools.com/php/mod_benchmark.php
Source0:	%{mod_name}-%{version}.tar.bz2
Source1:	%{mod_conf}.bz2
Patch0:		mod_benchmark-2.0.0-no_cybase.diff
Patch1:		mod_benchmark-1.6-apr.diff
Patch2:		mod_benchmark-2.0.0-apache220.diff
PreReq:		rpm-helper
BuildRequires:	autoconf2.5
BuildRequires:	automake1.7
BuildRequires:	MySQL-devel
BuildRequires:	postgresql-devel
Requires:	apache-mod_php
Requires(pre): rpm-helper
Requires(postun): rpm-helper
Requires(pre):	apache-conf >= 2.2.0
Requires(pre):	apache >= 2.2.0
Requires:	apache-conf >= 2.2.0
Requires:	apache >= 2.2.0
BuildRequires:	apache-devel >= 2.2.0
BuildRequires:	file
Provides:	apache2-mod_benchmark
Obsoletes:	apache2-mod_benchmark
Epoch:		1
BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot

%description
mod_benchmark is an apache module that produces Performance
Statistics. It can help you find out which are the slower pages,
which are the system bottlenecks. It can also alert you when
thresholds are reached. Reports are displayed through a PHP fronte

NOTE: This software requires the SVG viewer by Adobe to make use
of the graphs produced. (MSIE only?)

%prep

%setup -q -n %{mod_name}-%{version}
%patch0 -p1
%patch1 -p0
%patch2 -p1


pushd benchmark
# fix dir perms
find . -type d | xargs chmod 755

# fix file perms
find . -type f | xargs chmod 644
popd

# strip away annoying ^M
find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//'
find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//'

%build
export WANT_AUTOCONF_2_5=1
rm -f missing
libtoolize --copy --force; aclocal-1.7; autoconf; automake-1.7 --add-missing

export CPPFLAGS="-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"

%configure2_5x \
    --with-apxs2=%{_sbindir}/apxs \
    --enable-mysql \
    --enable-pgsql \
    --disable-sybase \
    --disable-oracle

%make

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}%{_libdir}/apache-extramodules
install -d %{buildroot}%{_sysconfdir}/httpd/modules.d

cp -rp src/.libs .

install -m0755 .libs/*.so %{buildroot}%{_libdir}/apache-extramodules/
bzcat %{SOURCE1} > %{buildroot}%{_sysconfdir}/httpd/modules.d/%{mod_conf}

install -d %{buildroot}%{_var}/www/html/addon-modules
ln -s ../../../..%{_docdir}/%{name}-%{version} %{buildroot}%{_var}/www/html/addon-modules/%{name}-%{version}

# install other stuff
install -m755 .libs/benchmark-mysql.so %{buildroot}%{_libdir}/apache-extramodules/
install -m755 .libs/benchmark-pgsql.so %{buildroot}%{_libdir}/apache-extramodules/
install -m755 src/alerter.sh %{buildroot}%{_libdir}/apache-extramodules/
install -m755 src/sysstat2 %{buildroot}%{_libdir}/apache-extramodules/
install -m755 src/benchmark_rt %{buildroot}%{_libdir}/apache-extramodules/

install -d %{buildroot}/%{webadminroot}/%{mod_name}
cp -aRf benchmark/* %{buildroot}/%{webadminroot}/%{mod_name}/

%post
if [ -f %{_var}/lock/subsys/httpd ]; then
    %{_initrddir}/httpd restart 1>&2;
fi

%postun
if [ "$1" = "0" ]; then
    if [ -f %{_var}/lock/subsys/httpd ]; then
	%{_initrddir}/httpd restart 1>&2
    fi
fi

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog INSTALL README TODO plugins
%doc sql/mod_benchmark-mysql.sql sql/mod_benchmark-std.sql sql/mod_benchmark-pgsql.sql
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/%{mod_conf}
%attr(0644,root,root) %config(noreplace) %{webadminroot}/%{mod_name}/php/globals.inc.php
%attr(0644,root,root) %config(noreplace) %{webadminroot}/%{mod_name}/perl/globals.inc.pl
%attr(0755,root,root) %{_libdir}/apache-extramodules/%{mod_so}
%attr(0755,root,root) %{_libdir}/apache-extramodules/alerter.sh
%attr(0755,root,root) %{_libdir}/apache-extramodules/sysstat2
%attr(0755,root,root) %{_libdir}/apache-extramodules/benchmark_rt
%attr(0755,root,root) %{_libdir}/apache-extramodules/benchmark-mysql.so
%attr(0755,root,root) %{_libdir}/apache-extramodules/benchmark-pgsql.so
%{_var}/www/html/addon-modules/*
%{webadminroot}/%{mod_name}/*


%changelog
* Sat Mar 10 2007 Oden Eriksson <oeriksson@mandriva.com> 2.0.0-5mdv2007.1
+ Revision: 140650
- rebuild

* Thu Nov 09 2006 Oden Eriksson <oeriksson@mandriva.com> 1:2.0.0-4mdv2007.1
+ Revision: 79355
- Import apache-mod_benchmark



* Mon Sep 04 2006 Oden Eriksson <oeriksson@mandriva.com> 1:2.0.0-1mdv2007.0
- rebuilt against MySQL-5.0.24a-1mdv2007.0 due to ABI changes

* Sun Aug 06 2006 Oden Eriksson <oeriksson@mandriva.com> 1:2.0.0-3mdv2007.0
- rebuild

* Sun Dec 18 2005 Oden Eriksson <oeriksson@mandriva.com> 1:2.0.0-2mdk
- rebuilt against apache-2.2.0 (P1,P2)

* Sun Oct 30 2005 Oden Eriksson <oeriksson@mandriva.com> 1:2.0.0-1mdk
- rebuilt against MySQL-5.0.15
- fix versioning

* Sat Jul 30 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_2.0.0-2mdk
- fix deps

* Thu Jun 02 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_2.0.0-1mdk
- rename the package
- the conf.d directory is renamed to modules.d
- use new rpm-4.4.x pre,post magic

* Sun Mar 20 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_2.0.0-4mdk
- use the %%mkrel macro

* Mon Feb 28 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_2.0.0-3mdk
- fix %%post and %%postun to prevent double restarts
- fix bug #6574

* Wed Feb 16 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_2.0.0-2mdk
- spec file cleanups, remove the ADVX-build stuff

* Tue Feb  8 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_2.0.0-1mdk
- rebuilt for apache 2.0.53

* Tue Jan 25 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.52_2.0.0-2mdk
- rebuilt against MySQL-4.1.x and PostgreSQL-8.x system libs
- nuke redundant deps

* Tue Sep 28 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.52_2.0.0-1mdk
- built for apache 2.0.52

* Thu Sep 16 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.51_2.0.0-1mdk
- built for apache 2.0.51

* Tue Aug 31 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.50_2.0.0-1mdk
- 2.0.0
- fix P0

* Mon Jul 12 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.50_1.6a-1mdk
- built for apache 2.0.50
- remove redundant provides

* Mon Jun 14 2004 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.49_1.6a-1mdk
- built for apache 2.0.49
- added P1

* Wed Nov 05 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.48_1.6a-1mdk
- built for apache 2.0.48

* Sun Sep 14 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.47_1.6a-1mdk
- 1.6a
- added postgresql support
- fixed P0
- change back the url

* Fri Sep 12 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.47_1.5b-1mdk
- 1.5b
- use the %%configure2_5x

* Wed Sep 10 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.47_1.5a-2mdk
- fix S1
- fix description

* Wed Sep 10 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.47_1.5a-1mdk
- 1.5a (the actual contrib...)
- updated the url

* Sun Apr 13 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.45_1.5-1mdk
- initial cooker contrib, first attempt with this beast...