#Module-Specific definitions %define apache_version 2.0.54 %define mod_version 4.0.1a %define mod_name mod_layout %define mod_conf 15_%{mod_name}.conf %define mod_so %{mod_name}.so %define sourcename %{mod_name}-%{mod_version} # Standard Module Definitions %define name apache-%{mod_name} %define version %{apache_version}_%{mod_version} Summary: Add custom header and/or footers for apache Name: %{name} Version: %{version} Release: %mkrel 3 Group: System/Servers License: BSD-style URL: http://software.tangent.org/ Source0: %{sourcename}.tar.bz2 Source1: %{mod_conf}.bz2 Patch0: %{mod_name}-%{mod_version}-register.patch.bz2 Patch1: mod_layout-4.0.1a-cvs_fixes.diff.bz2 Requires(pre): rpm-helper Requires(postun): rpm-helper Requires(pre): apache-conf >= 2.0.54 Requires(pre): apache >= %{apache_version} Requires: apache-conf >= 2.0.54 Requires: apache >= %{apache_version} BuildRequires: apache-devel >= %{apache_version} Provides: apache2-mod_layout Obsoletes: apache2-mod_layout BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %description Mod_Layout creates a framework for doing design. Whether you need a simple copyright or ad banner attached to every page, or need to have something more challenging such a custom look and feel for a site that employs an array of technologies (Java Servlets, mod_perl, PHP, CGI's, static HTML, etc...), Mod_Layout creates a framework for such an environment. By allowing you to cache static components and build sites in pieces, it gives you the tools for creating large custom portal sites. %prep %setup -q -n %{sourcename} %patch0 -p0 %patch1 -p1 %build %{_sbindir}/apxs -c mod_layout.c utility.c layout.c cat > index.html <<EOF <p>No documentation exists yet for this module, go to <a href="http://software.tangent.org/">tangent.org</a> for more information</p> <p>Meanwhile take a look at the %{_sysconfdir}/httpd/modules.d/%{mod_conf} file</p> <p>Also please take the time to check out the <a href=http://d-srv.com/modules_for_apache2.html>modules for apache2</a> repository for Mandriva Linux.</p> <-- replace_me --> EOF %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{_libdir}/apache-extramodules install -d %{buildroot}%{_sysconfdir}/httpd/modules.d 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} # make the example work... (ugly, but it works...) NEW_URL=/addon-modules/%{name}-%{version}/index.html perl -pi -e "s|_REPLACE_ME_|$NEW_URL|g" %{buildroot}%{_sysconfdir}/httpd/modules.d/%{mod_conf} %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 ChangeLog INSTALL README index.html %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/%{mod_conf} %attr(0755,root,root) %{_libdir}/apache-extramodules/%{mod_so} %{_var}/www/html/addon-modules/* %changelog * Fri Jul 29 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_4.0.1a-3mdk - added another work around for a rpm bug * Fri Jul 29 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_4.0.1a-2mdk - added a work around for a rpm bug, "Requires(foo,bar)" don't work * Thu May 26 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_4.0.1a-1mdk - rename the package - the conf.d directory is renamed to modules.d - use new rpm-4.4.x pre,post magic * Thu Mar 17 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_4.0.1a-6mdk - use the %%mkrel macro * Sun Feb 27 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_4.0.1a-5mdk - fix %%post and %%postun to prevent double restarts * Wed Feb 16 2005 Stefan van der Eijk <stefan@eijk.nu> 2.0.53_4.0.1a-4mdk - fix bug #6574 * Wed Feb 16 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_4.0.1a-3mdk - fix deps * Tue Feb 15 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_4.0.1a-2mdk - spec file cleanups, remove the ADVX-build stuff * Tue Feb 8 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_4.0.1a-1mdk - rebuilt for apache 2.0.53 * Tue Sep 28 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.52_4.0.1a-1mdk - built for apache 2.0.52 * Thu Sep 16 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.51_4.0.1a-1mdk - built for apache 2.0.51 * Tue Aug 10 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.50_4.0.1a-3mdk - rebuilt * Mon Jul 12 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.50_4.0.1a-2mdk - remove redundant provides * Wed Jun 30 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.50_4.0.1a-1mdk - built for apache 2.0.50 * Fri Jun 11 2004 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.49_4.0.1a-1mdk - built for apache 2.0.49 - added P1 * Wed Nov 05 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.48_4.0.1a-1mdk - built for apache 2.0.48 * Mon Jul 21 2003 David Baudens <baudens@mandrakesoft.com> 2.0.47_4.0.1a-2mdk - Rebuild to fix bad signature * Thu Jul 10 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.47_4.0.1a-1mdk - rebuilt against latest apache2, requires and buildrequires * Fri May 30 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.46_4.0.1a-1mdk - rebuilt for apache v2.0.46 - buildrequires ADVX-build >= 9.2 * Fri Apr 11 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.45_4.0.1a-1mdk - cosmetic rebuild for apache v2.0.45 * Tue Jan 21 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.44_4.0.1a-1mdk - rebuilt for apache v2.0.44 * Mon Jan 20 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.43_4.0.1a-5mdk - fix buildrequires apache-devel >= 2.0.43-5mdk, as pointed out by Olivier Thauvin * Sat Jan 18 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.43_4.0.1a-4mdk - rebuilt against rebuilt buildrequires * Mon Jan 13 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.43_4.0.1a-3mdk - Rebuilt with the new apache-devel that uses /usr/sbin/apxs2 and /usr/include/apache2 * Sat Nov 02 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.43_4.0.1a-2mdk - rebuilt for/against apache2 where dependencies has changed in apr * Tue Oct 22 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.43_4.0.1a-1mdk - extra modules needs to be loaded _before_ mod_ssl, mod_php and mod_perl in order to show up in the server string... - initial cooker contrib