Sophie

Sophie

distrib > Mandriva > 9.0 > i586 > media > contrib-src > by-pkgid > 9e44e23d65975421ca2f7450e348e542 > files > 2

apache2-mod_ruby-2.0.40ADVX_0.9.9-2mdk.src.rpm

#Module-Specific definitions
%define mod_version 0.9.9
%define release 2mdk
%define mod_name mod_ruby
%define mod_conf 85_%{mod_name}.conf
%define mod_so %{mod_name}.so
%define sourcename %{mod_name}-%{mod_version}

#New ADVX macros
%define ADVXdir %{_libdir}/ADVX
%{expand:%(cat %{ADVXdir}/ADVX-build)}
%{expand:%%global ap_version %(%{_sbindir}/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
BuildRequires:  ADVX-build
BuildRequires:	%{ap_name}-devel 

Summary:	Mod_ruby is a DSO module for the %{ap_name} Web server.
Name:		%{name}
Version:	%{version}
Release:	%{release}
Group:		System/Servers
Source0:	%{sourcename}.tar.bz2
Source1:	%{mod_conf}.bz2
License:	BSD
URL:		http://www.modruby.net/
BuildRequires:	ruby-devel
BuildRoot:	%{_tmppath}/%{name}-buildroot

%description
mod_ruby embeds the Ruby interpreter into the Apache web server,
allowing Ruby CGI scripts to be executed natively. These scripts
will start up much faster than without mod_ruby.

%prep

%setup -q -n %{sourcename}

%build
./configure.rb --with-apxs=%{_sbindir}/apxs
%make

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

mkdir -p %{buildroot}%{ap_libexecdir}
mkdir -p %{buildroot}%{ap_extralibs}
make DESTDIR="%{buildroot}" install

mv %{buildroot}%{ap_libexecdir}/%{mod_so} %{buildroot}%{ap_extralibs}
%ADVXinstconf %{SOURCE1} %{mod_conf}
%ADVXinstdoc %{name}-%{version}

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

%post
%ADVXpost

%postun
%ADVXpost


%files
%defattr(-,root,root)
%config(noreplace) %{ap_confd}/%{mod_conf}
%{ap_extralibs}/%{mod_so}
%{ap_webdoc}/*
%doc ChangeLog COPYING README*
%{_libdir}/ruby

%changelog
* Wed Sep  3 2002 Jean-Michel Dault <jmdault@mandrakesoft.com> 2.0.40ADVX_0.9.9-2mdk
- Comply with ADVX policy at http://advx.org/devel/policy.php

* Mon Aug 19 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 0.9.9-1mdk
- initial cooker contrib