#
# Copyright (C) 2004 - 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: Web site feedback mod_spin application
Group: Applications/Internet
License: LGPLv2+
URL: http://www.rexursive.com/software/modspin/applications.html
Source: ftp://ftp.rexursive.com/pub/spinapps/feedback/%{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
BuildRequires: libesmtp-devel >= 1.0.3r1, file-devel
Requires: httpd-mmn = %(cat %{_includedir}/httpd/.mmn || echo missing)
%define _libdir /usr/libexec/spinapps
%description
The application collects parameters of an (X)HTML form, as either
multipart/form-data or application/x-www-form-urlencoded, validates them,
stores them into an SQL database and e-mails to a designated e-mail address.
E-mailing of attachments is supported, but only the name of the uploaded file
is stored into the database.
%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_feedback.la
# application configuration, Fedora style
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
install -m 644 spin_feedback.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
# extra documentation and examples
install -m 644 create-feedback*.sql $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(-,root,root)
%{_libdir}/spin_feedback.*
%{_datadir}/%{name}
%doc %{_docdir}/%{name}-%{version}
%config(noreplace) %{_sysconfdir}/spinapps/spin_feedback.xml
%config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf
%changelog
* Fri Aug 24 2007 Bojan Smojver
- install HTML into data dir
* 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 PostgreSQL, MySQL, libxml2, libesmtp and file dependencies, will be
picked up by rpm
- drop build dependencies that depend on mod_spin-devel
- use %{?dist} if present
- include examples and tests
* 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
- make it more Fedora Extras compliant
* Thu Mar 31 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.4
* Fri Feb 4 2005 Bojan Smojver
- bump up to 1.0.3
* Thu Dec 9 2004 Bojan Smojver
- bump up to 1.0.2
- include feedback.sm example file
* Wed Oct 13 2004 Bojan Smojver
- bump up to 1.0.1
- include version of FC into the release
* Fri Aug 30 2004 Bojan Smojver
- bump up to 1.0.0
* Mon Aug 02 2004 Bojan Smojver
- bump up to 0.9.1
* Fri Jul 30 2004 Bojan Smojver
- fix the URL
* Thu Apr 15 2004 Bojan Smojver
- initial RPM spec for spin_feedback 0.9.0