Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 40d39e9d92491d1ce810f54a00628cd8 > files > 1

apache2-mod_mono-2.0.53_1.0.6-3mdk.src.rpm

%define mod_version 1.0.6
%define apache_version 2.0.53

%define xsp_mod_version %mod_version
%define module_path %{_libdir}/apache2-extramodules
%define module_name mod_mono

Summary:	Mono module for Apache 2
Name:		apache2-mod_mono
Version:	%{apache_version}_%{mod_version}
Release:	%mkrel 3
License:	Apache License
Group:		System/Servers
URL:		http://www.mono-project.com/downloads/
Source0:	http://go-mono.com/archive/%{mod_version}/%{module_name}-%{mod_version}.tar.bz2
Source1:	http://go-mono.com/archive/%{xsp_mod_version}/xsp-%{xsp_mod_version}.tar.bz2
Patch0:		mod_mono-1.0.4-avoid-version.diff.bz2
#gw disable .NET 2.0 stuff, it's disabled on our mono package too
Patch1:		xsp-1.0.6-no-dotnet2.0.patch.bz2
BuildRequires:	apache2-devel >= %{apache_version}-1mdk
BuildRequires:	mono-devel
BuildRequires:	automake1.7
BuildRequires:	autoconf2.5
BuildRequires:  file
Requires:	apache2 >= %{apache_version}
Requires:	mono
BuildRequires:	file
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

%description
This is an experimental module that allows you to run ASP.NET
pages on Unix with Apache and Mono.
It includes some aspx C# scripts for testing.
Please read the included INSTALL file for how to get the mod-mono
server running.

%prep

%setup -q -n %{module_name}-%{mod_version} -a 1
%patch0 -p0
cd xsp-%mod_version
%patch1 -p1
autoconf
cd ..

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

# Build sample ASP.NET pages from xsp distribution
pushd xsp-%{xsp_mod_version}
%configure2_5x
make
popd

# Build Apache Module
%configure2_5x \
    --with-apxs=%{_sbindir}/apxs2 \
    --with-apr-config=%{_bindir}/apr-config
make

%install
rm -fr %{buildroot}

pushd xsp-%{xsp_mod_version}
install -d 755 %{buildroot}%{_bindir}
install -d 755 %{buildroot}%{_mandir}/man1
install server/mod-mono-server.exe %{buildroot}%{_bindir}
install server/xsp.exe %{buildroot}%{_bindir}
install tools/asp_state/asp-state.exe %{buildroot}%{_bindir}
install man/*.1 %{buildroot}%{_mandir}/man1
popd

install -d 755 %{buildroot}%{_sysconfdir}/httpd/conf.d
install -d 755 %{buildroot}%{module_path}
install -d 755 %{buildroot}%{_var}/www/mono
install -d 755 %{buildroot}%{_var}/www/.wapi

# Mono Configuration for Apache
cat > %{buildroot}%{_sysconfdir}/httpd/conf.d/91_mod_mono.conf << EOF
AddType application/x-asp-net .aspx .ashx .asmx .ascx .asax .config .ascx
LoadModule mono_module extramodules/mod_mono.so
MonoUnixSocket /tmp/mod_mono_server
Listen 8080
Alias /mono "%{_defaultdocdir}/%{name}-%{mod_version}/test"
EOF

install src/.libs/mod_mono.so %{buildroot}%{module_path}/mod_mono.so
install -D man/mod_mono.8 %{buildroot}%{_mandir}/man8/mod_mono.8

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

%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 COPYING INSTALL NEWS README xsp-%{xsp_mod_version}/test
%attr(0755,root,root) %{_bindir}/*
%attr(0644,root,root) %config(noreplace)  %{_sysconfdir}/httpd/conf.d/91_mod_mono.conf
%attr(0755,root,root) %{module_path}/mod_mono.so
%attr(0644,root,root) %{_mandir}/man1/*
%attr(0644,root,root) %{_mandir}/man8/mod_mono.8*
%defattr(-,apache,apache)
%dir %{_var}/www/mono
%dir %{_var}/www/.wapi

%changelog
* Sun Mar 20 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_1.0.6-3mdk
- use the %%mkrel macro

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

* Sun Feb 20 2005 Götz Waschk <waschk@linux-mandrake.com> 2.0.53_1.0.6-1mdk
- fix build
- New release 1.0.6

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

* Mon Feb 14 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_1.0.5-2mdk
- new url
- strip away annoying ^M

* Tue Feb  8 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_1.0.5-1mdk
- rebuilt for apache 2.0.53
- fix versioning
- misc spec file fixes

* Thu Dec  9 2004 Götz Waschk <waschk@linux-mandrake.com> 1.0.5-1mdk
- fix installation
- New release 1.0.5

* Tue Nov 23 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0.4-3mdk
- make it compile on 10.0 too
- added P0

* Tue Nov 09 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0.4-2mdk
- rebuilt for apache 2.0.52

* Fri Nov  5 2004 Goetz Waschk <waschk@linux-mandrake.com> 1.0.4-1mdk
- New release 1.0.4

* Wed Sep 22 2004 Götz Waschk <waschk@linux-mandrake.com> 1.0.2-1mdk
- fix build and installation
- fix source URLs
- New release 1.0.2

* Wed Aug 11 2004 Götz Waschk <waschk@linux-mandrake.com> 1.0.1-1mdk
- new mod_version

* Mon Jul 19 2004 Götz Waschk <waschk@linux-mandrake.com> 1.0-1mdk
- fix configure calls
- New release 1.0

* Mon Feb 16 2004 Marcel Pol <mpol@mandrake.org> 0.7-2mdk
- fix description

* Sun Feb 08 2004 Marcel Pol <mpol@mandrake.org> 0.7-1mdk
- 0.7, it even works now
- require mono
- from Quel Qun <kelk1@hotmail.com>
    - drop source2, generate inside specfile
    - several spec changes

* Tue Aug 05 2003 Marcel Pol <mpol@gmx.net> 0.3.7-3mdk
- build for apache 2.0.47
- own dir

* Sat Jun 07 2003 Marcel Pol <mpol@gmx.net> 0.3.7-2mdk
- build for apache 2.0.46

* Tue May 13 2003 Marcel Pol <mpol@gmx.net> 0.3.7-1mdk
- 0.3.7

* Fri Apr 25 2003 Marcel Pol <mpol@gmx.net> 0.3.6-2mdk
- autoconf2.5
- build for apache 2.0.45

* Sun Mar 23 2003 Marcel Pol <mpol@gmx.net> 0.3.6-1mdk
- src.rpm from Quel Qun <kelk1@hotmail.com>
- more informative description

* Mon Feb 03 2003 Daniel Lopez Ridruejo <daniel @ rawbyte.com>
- Use --with-apxs
- License is Apache-style
- Change ownership to apache user
- Create .wapi directory
* Mon Feb 03 2003 David Hollis <dhollis@davehollis.com>
- 0.3.4
* Wed Jan 15 2003 David Hollis <dhollis@davehollis.com>
- Initial spec