Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 41bd94b8b9c7a4364587a7820520923d > files > 2

apache2-mod_xslt2-2.0.53_1.3.8-0.2004112100.4mdk.src.rpm

#Module-Specific definitions
%define snap 2004112100
%define mod_version 1.3.8
%define mod_name mod_xslt2
%define mod_conf 25_%{mod_name}.conf
%define mod_so mod_xslt.so
%define sourcename %{mod_name}

%define apache_version 2.0.53

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

%define	major	0
%define libname	%mklibname modxslt %{major}

Summary:	Mod_xslt is a DSO module for the apache2 Web server
Name:		%{name}
Version:	%{version}
Release:	%mkrel 0.%{snap}.4
Group:		System/Servers
License:	GPL
URL:		http://www.mod-xslt2.com/
Source0:	modxslt-%{snap}.tar.bz2
Source1:	%{mod_conf}.bz2
Patch0:		modxslt-2004101700-no_root_check.diff.bz2
BuildRequires:	autoconf2.5
BuildRequires:	automake1.7
BuildRequires:	libxml2-devel
BuildRequires:	libxslt-devel
BuildRequires:	pcre-devel
BuildRequires:	pkgconfig
Conflicts:	apache2-mod_xslt
Prereq:		apache2 >= %{apache_version}
Prereq:		apache2-conf
BuildRequires:	apache2-devel >= %{apache_version}-1mdk
BuildRequires:	file
BuildRoot:	%{_tmppath}/%{name}-buildroot

%description
mod-xslt2 is a server side module able to apply stylesheets to xml
data on the fly. mod-xslt2 as it is today is almost a complete
rewrite of the original mod-xslt2 written by Philipp Dunkel, with
many new features added and a complete code clean up. mod-xslt2 is
Free Software, as it will always be, it is released under the
terms of the GPL and anybody is welcome to join its development. 

%package -n	%{libname}
Summary:	Shared libraries for %{name}
Group:          System/Libraries
Version:	%{mod_version}

%description -n	%{libname}
Shared libraries for %{name}

%package -n	%{libname}-devel
Summary:	Development library and header files for the %{name} library
Group:		Development/C
Version:	%{mod_version}
Requires:	%{libname} = %{mod_version}-%{release}
Provides:	%{name}-devel libmodxslt-devel
Obsoletes:	%{name}-devel libmodxslt-devel

%description -n	%{libname}-devel
This package contains the static %{libname} library and its header
files.

%prep

%setup -q -n modxslt-%{snap}
%patch0 -p1

# 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
export WANT_AUTOCONF_2_5=1
libtoolize --copy --force; aclocal-1.7; autoconf

%configure2_5x \
    --with-sapi=apache2 \
    --with-apxs=%{_sbindir}/apxs2

%make


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

install -d %{buildroot}%{_libdir}/apache2
install -d %{buildroot}%{_sysconfdir}/httpd/conf.d

%makeinstall_std

mv %{buildroot}%{_libdir}/apache2 %{buildroot}%{_libdir}/apache2-extramodules

# re-define version, rpm is so stupid...
%define version %{apache_version}_%{mod_version}

bzcat %{SOURCE1} > %{buildroot}%{_sysconfdir}/httpd/conf.d/%{mod_conf}

install -d %{buildroot}%{_var}/www/html/addon-modules
ln -s ../../../..%{_docdir}/%{name}-%{version} %{buildroot}%{_var}/www/html/addon-modules/%{name}-%{version}

# do we need these?
rm -f %{buildroot}%{_bindir}/modxslt-parse
rm -f %{buildroot}%{_bindir}/modxslt-perror

# cleanup docs
find doc -name "Makefile*" | xargs rm -f

%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

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

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

%files
%defattr(-,root,root)
%doc CREDITS LICENSE README
%doc doc/manual/manual doc/xslt/*
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{mod_conf}
%attr(0755,root,root) %{_libdir}/apache2-extramodules/%{mod_so}
%{_var}/www/html/addon-modules/*

%files -n %{libname}
%defattr(-,root,root)
%attr(0755,root,root) %{_libdir}/libmodxslt*.so.*

%files -n %{libname}-devel
%defattr(-,root,root)
%doc TODO
%doc doc/dev/*
%attr(0755,root,root) %{_bindir}/modxslt-config
%attr(0755,root,root) %{_libdir}/*.a
%attr(0644,root,root) %{_libdir}/*.la
%attr(0755,root,root) %{_libdir}/*.so
%{_includedir}/modxslt*
%{_mandir}/man1/*

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

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

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

* Tue Feb  8 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_1.3.8-0.2004112100.1mdk
- rebuilt for apache 2.0.53

* Mon Nov 22 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.52_1.3.8-0.2004112100.1mdk
- 2004112100

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

* Mon Oct 18 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.50_1.3.7-0.2004101700.1mdk
- 2004101700
- rediffed P0

* Mon Aug 30 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.50_1.3.6-0.2004083000.1mdk
- 2004083000

* Mon Aug 02 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.50_1.3.5-0.2004080100.1mdk
- 2004080100

* Wed Jul 28 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.50_1.3.4-0.2004072600.1mdk
- initial mandrake package
- added P0