#
# Copyright (C) 2005 - 2007 Bojan Smojver, Rexursive
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 2.1 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
# for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see .
#
# Distro release from LSB
%define rcode %(lsb_release -si | tr -cd '[:upper:]')
%define rvers %(lsb_release -sr | cut -f 1 -d '.')
%define dvers %(test -n "%{rcode}%{rvers}" && echo ".%{rcode}%{rvers}" || echo)
# Use %{?dist} if defined, otherwise LSB
%define distro %(test -n "%{?dist}" && echo "%{?dist}" || echo "%{dvers}")
Name: @PACKAGE@
Version: @VERSION@
Release: 1%{distro}
Summary: Authentication provider for mod_spin
Group: Applications/Internet
License: LGPLv2+
URL: http://www.rexursive.com/software/modspin/applications.html
Source: ftp://ftp.rexursive.com/pub/spinapps/auth/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: mod_spin >= 1.1.8
BuildRequires: mod_spin-devel >= 1.1.8
Requires: httpd-mmn = %(cat %{_includedir}/httpd/.mmn || echo missing)
%define _libdir /usr/libexec/spinapps
%description
This mod_spin application provides authentication for other applications,
using some internal request trickery and session state. It is only valid for
spin macro files and it will not provide any protection against unauthorised
access to static (X)HTML or other types of files.
%prep
%setup -q -n %{name}-%{version}
%build
%configure --disable-static --enable-packager
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
# remove unneeded stuff
rm -f $RPM_BUILD_ROOT/%{_libdir}/spin_auth.la
rm -rf $RPM_BUILD_ROOT/%{_datadir}/spin_auth
# application configuration, Fedora style
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
install -m 644 spin_auth.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(-,root,root)
%{_libdir}/spin_auth*
%doc %{_docdir}/%{name}-%{version}
%config(noreplace) %{_sysconfdir}/spinapps/spin_auth.xml
%config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf
%changelog
* Fri Aug 24 2007 Bojan Smojver
- cleanup
* Tue Aug 22 2006 Bojan Smojver
- add apr-util and apr-util-devel >= 1.2.8 to dependencies
* Tue Jun 27 2006 Bojan Smojver
- update dependencies to httpd >= 2.2.0 and mod_spin >= 1.1.1
* Tue Nov 29 2005 Bojan Smojver
- remove libxml2 dependency, will be picked up by rpm
- drop build dependencies that depend on mod_spin-devel
- use %{?dist} if present
* Tue Nov 22 2005 Bojan Smojver
- improve extended release numbering
* Thu Oct 20 2005 Bojan Smojver
- update the requirements to mod_spin >= 1.1.0
* Mon Aug 01 2005 Bojan Smojver
- update the requirements to libapreq2 >= 2.06 and mod_spin >= 1.0.10
* Fri Apr 01 2005 Bojan Smojver
- use configure to process the file for PACKAGE and VERSION
- do explicit make install with DESTDIR
- do versioning with lsb_release
- require mod_spin 1.0.9 to build
* Wed Mar 02 2005 Bojan Smojver
- bump up to 1.0.1
* Fri Jan 28 2005 Bojan Smojver
- initial release