Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > by-pkgid > 4104a9f4c0f618880d6f9ddf895820eb > files > 2

apache-mod_smtpd-2.0.54_0.9-0.r235759.2mdk.src.rpm

#Module-Specific definitions
%define mod_version 0.9
%define mod_name mod_smtpd
%define mod_conf A38_%{mod_name}.conf
%define mod_so %{mod_name}.so

%define snap r235759
%define apache_version 2.0.54

# Standard Module Definitions
%define name apache-%{mod_name}
%define version %{apache_version}_%{mod_version}

Summary:	A SMTP protocol enabled module for apache 2.x based on qpsmtpd
Name:		%{name}
Version:	%{version}
Release:	%mkrel 0.r235759.2
Group:		System/Servers
License:	Apache License
URL:		http://www.mail-archive.com/dev@httpd.apache.org/msg27099.html
# http://svn.apache.org/repos/asf/httpd/mod_smtpd/trunk/
Source0: 	%{mod_name}-%{mod_version}-%{snap}.tar.bz2
Source1:	%{mod_conf}.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}
BuildRequires:	file
BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot

%description
A SMTP protocol enabled module for apache 2.x based on qpsmtpd.

%package	devel
Summary:	Development files for %{mod_name}
Group:		Development/C

%description	devel
Development files for %{mod_name}.

%prep

%setup -q -n %{mod_name}

# 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

cp smtp_core.c mod_smtpd.c

%{_sbindir}/apxs -c mod_smtpd.c smtp_protocol.c

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

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

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 -m0644 mod_smtpd.h %{buildroot}%{_includedir}/

%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 CREDITS NOTICE STATUS
%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/*

%files devel
%defattr(-,root,root)
%{_includedir}/*.h

%changelog
* Tue Aug 23 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_0.9-0.r235759.2mdk
- forgot the header file

* Mon Aug 22 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_0.9-0.r235759.1mdk
- initial Mandriva package