# # 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 General Public Licence as published by the Free # Software Foundation; either version 2 of the Licence, 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 General Public Licence for # more details. # # You should have received a copy of the GNU General Public Licence along # with this program; if not, write to the Free Software Foundation, Inc., 59 # Temple Place, Suite 330, Boston, MA 02111-1307 USA # # 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: mod_spin Apache module Group: System Environment/Daemons License: GPL URL: http://www.rexursive.com/software/modspin/ Source: ftp://ftp.rexursive.com/pub/mod-spin/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: httpd >= 2.0.50, libapreq2 >= 2.06, mysql, postgresql-libs, libxml2 BuildPrereq: bison >= 1.875c, httpd-devel >= 2.0.50, libapreq2-devel >= 2.06, mysql-devel, postgresql-devel, libxml2-devel, doxygen, tetex-latex Requires: httpd-mmn = %(cat %{_includedir}/httpd/.mmn || echo missing) %define _libexecdir %(/usr/sbin/apxs -q LIBEXECDIR) %define _aclocaldir %(aclocal --print-ac-dir) %description mod_spin is an Apache module that provides (in conjunction with some other modules) a simple template language with data replacement capabilities only, persistent application and session data tracking, dynamic linking of applications into Apache 2 as shared libraries, parameters, cookies and multipart/form data parsing via libapreq2, simple API for (kind of) MVC controller functionality and simple API for pooled (or not) access to SQL databases. %package devel Summary: Development files for mod_spin Apache module Group: Development/Libraries Requires: %{name} = %{version}-%{release}, httpd-devel >= 2.0.50, libapreq2-devel >= 2.06, mysql-devel, postgresql-devel, libxml2-devel %description devel Libraries, headers, scripts and documentation required to develop applications based on mod_spin Apache module. %prep %setup -q -n %{name}-%{version} %build %configure --enable-packager --with-pgsql --with-mysql make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install # remove unneeded stuff rm -rf $RPM_BUILD_ROOT/%{_libdir}/debug rm -f $RPM_BUILD_ROOT/%{_libexecdir}/mod_spin.a rm -f $RPM_BUILD_ROOT/%{_libexecdir}/mod_spin.la # module configuration, Fedora style mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d install -m 644 spin.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d %clean rm -rf ${RPM_BUILD_ROOT} %post devel # Default location for documentation is on the Net aprdocsurl="http://apr.apache.org/docs/apr/@APRVMINOR@" apudocsurl="http://apr.apache.org/docs/apr-util/@APUVMINOR@" apreq2docsurl="http://httpd.apache.org/apreq/docs/libapreq2" # Find local location of apr-devel documentation p=apr-devel rpm --quiet -q $p if [ $? -eq 0 ]; then d="/usr/share/doc/`rpm -q --queryformat '%{NAME}-%{VERSION}' $p`/html" if [ -d "$d" ]; then aprdocsurl="$d" fi fi # Find local location of apr-util-devel documentation p=apr-util-devel rpm --quiet -q $p if [ $? -eq 0 ]; then d="/usr/share/doc/`rpm -q --queryformat '%{NAME}-%{VERSION}' $p`/html" if [ -d "$d" ]; then apudocsurl="$d" fi fi # Find local location of libapreq2-devel documentation p=libapreq2-devel rpm --quiet -q $p if [ $? -eq 0 ]; then d="/usr/share/doc/`rpm -q --queryformat '%{NAME}-%{VERSION}' $p`" if [ -d "$d" ]; then apreq2docsurl="$d" fi fi HTMLDIR="%{_docdir}/%{name}-%{version}/html" # Check if SELinux is enabled and remember context SEENA="`type -p selinuxenabled`" if [ -n "$SEENA" ]; then $SEENA if [ $? -eq 0 ]; then CHCON="`type -p chcon`" if [ -n "$CHCON" -a -x "$CHCON" ]; then ls -Zd >/dev/null 2>&1 if [ $? -eq 0 ]; then LSOUT="`ls -Zd $HTMLDIR`" read mode user group urt fpath </dev/null 2>&1 fi %files %defattr(-,root,root,-) %{_libdir}/librxv_spin.so* %{_libexecdir}/* %doc %dir %{_datadir}/doc/%{name}-%{version} %doc %{_datadir}/doc/%{name}-%{version}/[A-Z]* %config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf %files devel %defattr(-,root,root,-) %{_includedir}/* %{_bindir}/* %{_mandir}/* %{_libdir}/librxv_spin.*a %{_aclocaldir}/* %doc %{_datadir}/doc/%{name}-%{version}/mod_spin.* %verify (not size md5 mtime) %doc %{_datadir}/doc/%{name}-%{version}/html %changelog * Mon Nov 19 2007 Bojan Smojver - remove flex-reentrant dependency, not needed for Fedora 8 * Mon Aug 01 2005 Bojan Smojver - update the requirements to libapreq2 >= 2.06 - add tetex-latex to build dependencies - make it more Fedora Extras compliant - split up the devel package * Wed Mar 02 2005 Bojan Smojver - use configure to process the file for PACKAGE and VERSION - drop redefinition of _datadir - do explicit make install with DESTDIR - do versioning with lsb_release - do explicit chcon * Fri Jan 28 2005 Bojan Smojver - bump up to 1.0.8 * Wed Jan 19 2005 Bojan Smojver - bump up to 1.0.7 - ignore verification of doc files, these can be modified post installation - restore security contexts, if SELinux present * Wed Jan 05 2005 Bojan Smojver - bump up to 1.0.6 * Wed Nov 03 2004 Bojan Smojver - bump up to 1.0.5 - depend on libapreq2 2.04_dev-4.03 * Tue Oct 12 2004 Bojan Smojver - bump up to 1.0.4 - include version of FC into the release * Thu Sep 23 2004 Bojan Smojver - bump up to 1.0.3 - fix bogus installdox logic * Tue Aug 24 2004 Bojan Smojver - bump up to 1.0.2 - put back flex, bison and doxygen as build requirements (duh!) * Mon Aug 09 2004 Bojan Smojver - bump up to 1.0.1 - remove flex, bison and doxygen from build requirements - require Apache at or above 2.0.50 - make sure docs dir gets removed * Mon Jun 21 2004 Bojan Smojver - bump up to 1.0.0 - link Doxygen documentation locally if possible - require doxygen for building * Thu Jun 11 2004 Bojan Smojver - bump up to 0.9.13 - require new libapreq2-2.03_04 or better - include rxv_spin-config script * Thu Jun 10 2004 Bojan Smojver - bump up to 0.9.12 - split mod_spin and librxv_spin - libdir to libexecdir * Thu May 28 2004 Bojan Smojver - bump up to 0.9.11 * Thu May 27 2004 Bojan Smojver - bump up to 0.9.10 * Mon May 24 2004 Bojan Smojver - bump up to 0.9.9 * Mon May 17 2004 Bojan Smojver - bump up to 0.9.8 * Thu Apr 15 2004 Bojan Smojver - bump up to 0.9.7 - fix mod_spin URL * Thu Apr 08 2004 Bojan Smojver - bump up to 0.9.6 * Sat Apr 03 2004 Bojan Smojver - bump up to 0.9.5 - require libapreq2 * Thu Apr 01 2004 Bojan Smojver - bump up to 0.9.4 * Tue Mar 09 2004 Bojan Smojver - initial RPM spec for mod_spin 0.9.3