#Module-Specific definitions %define mod_version 0.99 %define release 1mdk %define mod_name mod_ziplook %define mod_conf 87_%{mod_name}.conf %define mod_so %{mod_name}.so %define sourcename %{mod_name}-%{mod_version} #New ADVX macros %define ADVXdir %{_datadir}/ADVX %{expand:%(cat %{ADVXdir}/ADVX-build)} %{expand:%%global ap_version %(%{apxs} -q ap_version)} # Standard Module Definitions %define name %{ap_name}-%{mod_name} %define version %{ap_version}_%{mod_version} #Standard ADVX requires Prereq: %{ap_name} = %{ap_version} Prereq: %{ap_name}-conf BuildPreReq: ADVX-build >= 9.2 BuildRequires: %{ap_name}-devel >= 2.0.43-5mdk Provides: ADVXpackage Provides: AP20package Summary: Mod_ziplook is a DSO module for the %{ap_name} Web server. Name: %{name} Version: %{version} Release: %{release} Group: System/Servers Source0: %{mod_name}2-%{mod_version}.tar.bz2 Source1: %{mod_conf}.bz2 # http://www.winimage.com/zLibDll/unzip21.zip Source2: unzip21.zip License: BSD URL: http://pihl.kumpu.org/ziplook/index2.html BuildRequires: unzip BuildRequires: zip BuildRequires: zlib-devel BuildRequires: perl BuildRoot: %{_tmppath}/%{name}-buildroot %description With the mod_ziplook %{ap_name} module you can view zip-archive files directly in %{ap_name} without extracting them to filesystem. It's useful with large documentation zip-files which are not very often hit. %prep %setup -q -n ziplook unzip %{SOURCE2} zip README.zip README %build %{apxs} -c %{mod_name}.c -I. -lz %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %ADVXinstlib %ADVXinstconf %{SOURCE1} %{mod_conf} %ADVXinstdoc %{name}-%{version} # make the example work... (ugly, but it works...) NEW_URL=/addon-modules/%{name}-%{version}/ perl -pi -e "s|_REPLACE_ME_|$NEW_URL|g" %{buildroot}%{ap_confd}/%{mod_conf} %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %post %ADVXpost %postun %ADVXpost %files %defattr(-,root,root) %doc README* %config(noreplace) %{ap_confd}/%{mod_conf} %{ap_extralibs}/%{mod_so} %{ap_webdoc}/* %changelog * Wed Nov 05 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.48_0.99-1mdk - built for apache 2.0.48 * Thu Jul 10 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.47_0.99-1mdk - rebuilt against latest apache2, requires and buildrequires * Sat May 31 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.46_0.99-1mdk - rebuilt for apache v2.0.46 - buildprereq ADVX-build >= 9.2 * Wed May 14 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.45_0.99-1mdk - initial cooker contrib